LDtkMonogame 0.2.0
These are no longer compatible with the latest ldtk version as it introduced a new csv Intgrid format.
See the version list below for details.
dotnet add package LDtkMonogame --version 0.2.0
NuGet\Install-Package LDtkMonogame -Version 0.2.0
<PackageReference Include="LDtkMonogame" Version="0.2.0" />
paket add LDtkMonogame --version 0.2.0
#r "nuget: LDtkMonogame, 0.2.0"
// Install LDtkMonogame as a Cake Addin
#addin nuget:?package=LDtkMonogame&version=0.2.0
// Install LDtkMonogame as a Cake Tool
#tool nuget:?package=LDtkMonogame&version=0.2.0
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 | Versions 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. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- MonoGame.Framework.DesktopGL (>= 3.8.0.1641)
- Newtonsoft.Json (>= 12.0.3)
-
net5.0
- MonoGame.Framework.DesktopGL (>= 3.8.0.1641)
- Newtonsoft.Json (>= 12.0.3)
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.2.0 | 347 | 1/25/2024 | |
1.1.2 | 664 | 9/8/2023 | |
1.1.1 | 608 | 7/15/2023 | |
1.1.0 | 575 | 6/8/2023 | |
1.0.1 | 903 | 1/15/2023 | |
1.0.0 | 807 | 1/3/2023 | |
0.7.0 | 1,031 | 7/26/2022 | |
0.6.5 | 1,042 | 7/20/2022 | |
0.6.4 | 1,033 | 6/14/2022 | |
0.6.3 | 1,056 | 6/14/2022 | |
0.6.2 | 1,062 | 5/10/2022 | |
0.6.1 | 1,087 | 5/10/2022 | |
0.6.0 | 1,072 | 5/10/2022 | |
0.5.0 | 1,087 | 5/9/2022 | |
0.4.0 | 951 | 12/23/2021 | |
0.3.1 | 863 | 2/27/2021 | |
0.3.0 | 795 | 2/22/2021 | |
0.2.0 | 918 | 2/9/2021 | |
0.1.1 | 948 | 2/1/2021 | |
0.1.0 | 828 | 1/27/2021 | |
0.0.1 | 865 | 1/24/2021 |
- Added class/struct based Entities
- Added intgrid support
- Added Documentation