LDtkMonogame 0.2.0

Additional Details

These are no longer compatible with the latest ldtk version as it introduced a new csv Intgrid format.

There is a newer version of this package available.
See the version list below for details.
dotnet add package LDtkMonogame --version 0.2.0
                    
NuGet\Install-Package LDtkMonogame -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LDtkMonogame" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LDtkMonogame" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="LDtkMonogame" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LDtkMonogame --version 0.2.0
                    
#r "nuget: LDtkMonogame, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LDtkMonogame@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LDtkMonogame&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=LDtkMonogame&version=0.2.0
                    
Install as a Cake Tool

Ldtk Monogame

C# Monogame renderer for https://github.com/deepnight/ldtk
Nuget https://www.nuget.org/packages/LDtkMonogame/
Art used in the example by https://pixelfrog-store.itch.io/kings-and-pigs

Example code snippet

Project projectFile;
Level startLevel;
Level[] neighbours;

override void Initialize()
{
    projectFile = new Project(spriteBatch, "PATH TO THE LDTK FILE");
    projectFile.Load(0);

    startLevel = projectFile.GetLevel("Level1");
    neighbours = (from neighbour in startLevel.Neighbours select projectFile.GetLevel(neighbour)).ToArray();

    base.Initialize();
}

override void Update(GameTime gameTime)
{

}

override void Draw(GameTime gameTime)
{
    GraphicsDevice.Clear(startLevel.BgColor);

    spriteBatch.Begin(SpriteSortMode.Texture, samplerState: SamplerState.PointClamp);
    {
        for(int i = 0; i < startLevel.Layers.Length; i++)
        {
            spriteBatch.Draw(startLevel.Layers[i], startLevel.WorldPosition, Color.White);
        }

        for(int i = 0; i < neighbours.Length; i++)
        {
            for(int j = 0; j < neighbours[i].Layers.Length; j++)
            {
                spriteBatch.Draw(neighbours[i].Layers[j], neighbours[i].WorldPosition, Color.White);
            }
        }
    }
    spriteBatch.End();

    base.Draw(gameTime);
}

Better code examples LDtkMonogame.Examples

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on LDtkMonogame:

Package Downloads
LDtkMonogame.ContentPipeline

LDtk contentpipeline extension for importing .ldtk and .ldtkl files

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.8.2 176 7/17/2026
1.8.1 910 11/16/2025
1.8.0 1,007 6/9/2025
1.7.1 396 6/9/2025
1.7.0 286 5/4/2025
1.6.0 673 10/14/2024
1.6.0-beta 213 10/9/2024
1.5.0 294 9/26/2024
1.5.0-beta 214 9/20/2024
1.4.0 305 9/9/2024
1.3.3 341 7/7/2024
1.3.2 426 5/28/2024
1.3.1 247 5/26/2024
1.3.0 268 5/24/2024
1.2.0 580 1/25/2024
1.1.2 859 9/8/2023
1.1.1 820 7/15/2023
1.1.0 770 6/8/2023
1.0.1 1,119 1/15/2023
0.2.0 1,301 2/9/2021 0.2.0 is deprecated because it is no longer maintained.
Loading failed

- Added class/struct based Entities
- Added intgrid support
- Added Documentation