VOOZH about

URL: https://www.nuget.org/packages/LDtkMonogame/

⇱ NuGet Gallery | LDtkMonogame 1.8.1




👁 Image
LDtkMonogame 1.8.1

dotnet add package LDtkMonogame --version 1.8.1
 
 
NuGet\Install-Package LDtkMonogame -Version 1.8.1
 
 
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="1.8.1" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LDtkMonogame" Version="1.8.1" />
 
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 1.8.1
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LDtkMonogame, 1.8.1"
 
 
#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@1.8.1
 
 
#: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=1.8.1
 
Install as a Cake Addin
#tool nuget:?package=LDtkMonogame&version=1.8.1
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

<p align="center"> <img src="https://raw.githubusercontent.com/IrishBruse/LDtkMonogame/main/Icon.png" height="128px" data-no-zoom/> </p>

<p align="center"> Looking for support join the discord<br><br> <a href="https://discord.gg/ZzV7tmqvtH"><img src="https://img.shields.io/badge/Discord-LDtkMonogame-yellow" alt="Discord Link"></a> </p> <p align="center"> <a href="https://github.com/deepnight/ldtk"> <img alt="LDtk Version Support" src="https://img.shields.io/github/v/release/deepnight/ldtk?&label=Supports%20LDtk&color=yellow"></a> <a href="https://www.nuget.org/packages/LDtkMonogame/"><img src="https://img.shields.io/nuget/v/LDtkMonogame?" /></a> <a href="https://www.nuget.org/packages/LDtkMonogame/"><img alt="Nuget" src="https://img.shields.io/nuget/dt/LDtkMonogame"></a> </p> <br> LDtkMonogame is a level importer for the LDtk level editor

Getting Started

The easiest way to start using LDtkMonogame is to import it into the project using NuGet package.

Make sure to import the namespace at the top

using LDtk;
// Optional
using LDtk.Renderer;

LDtk.Renderer is a premade renderer for the levels, you can create your own if you have more specific needs ExampleRenderer.cs is an example of how to make one. Or you can inherit it and extend it.

To get started loading ldtk files load the file in Initialize.

LDtkFile file = LDtkFile.FromFile("World", Content);
LDtkFile file = LDtkFile.FromFile("Data/World.ldtk");

Then load the world right after for now ldtk only supports one file but make sure to enable the multiworlds flag in the project settings under advanced.

LDtkWorld world = file.LoadWorld(Worlds.World.Iid);

The Worlds.World.Iid is generated from the ldtkgen tool and is recommended that you use it for static typing of entities and levels.
It is a class within in a class that represents the world name and the levels name and holds the iid you can use to load that specific level.

Create the renderer in Initialize.

ExampleRenderer renderer = new ExampleRenderer(spriteBatch, Content);
ExampleRenderer renderer = new ExampleRenderer(spriteBatch);

Prerender Levels

foreach (LDtkLevel level in world.Levels)
{
 renderer.PrerenderLevel(level);
}

Now to render the level and entities we loaded in Draw

GraphicsDevice.Clear(world.BgColor);

spriteBatch.Begin(samplerState: SamplerState.PointClamp);
{
 foreach (LDtkLevel level in world.Levels)
 {
 renderer.RenderPrerenderedLevel(level);
 }
}
spriteBatch.End();

Showcase

Unnamed

👁 screenshot

by Fypur

Play the game on Itch

Example Game

👁 screenshot

by IrishBruse

Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
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.1 629 11/16/2025
1.8.0 651 6/9/2025
1.7.1 377 6/9/2025
1.7.0 272 5/4/2025
1.6.0 649 10/14/2024
1.6.0-beta 204 10/9/2024
1.5.0 272 9/26/2024
1.5.0-beta 206 9/20/2024
1.4.0 290 9/9/2024
1.3.3 327 7/7/2024
1.3.2 401 5/28/2024
1.3.1 234 5/26/2024
1.3.0 254 5/24/2024
1.2.0 569 1/25/2024
1.1.2 848 9/8/2023
1.1.1 810 7/15/2023
1.1.0 763 6/8/2023
1.0.1 1,110 1/15/2023
1.0.0 999 1/3/2023
0.7.0 1,257 7/26/2022
Loading failed