📚 A .NET library for loading Tiled maps and tilesets
Find a file
2024-07-27 23:53:04 +02:00
DotTiled Add tests and some test cases 2024-07-26 00:37:47 +02:00
DotTiled.Tests Add tests and some test cases 2024-07-26 00:37:47 +02:00
.editorconfig First initial modelling, going to move serialization away from model 2024-07-26 00:37:40 +02:00
.gitignore First initial modelling, going to move serialization away from model 2024-07-26 00:37:40 +02:00
DotTiled.sln First initial modelling, going to move serialization away from model 2024-07-26 00:37:40 +02:00
Makefile First initial modelling, going to move serialization away from model 2024-07-26 00:37:40 +02:00
README.md Initial README update, rebase and amend this commit 2024-07-27 23:53:04 +02:00

📚 DotTiled

DotTiled is a simple, lightweight, and easy-to-use library for loading, saving, and managing Tiled maps and tilesets in your .NET projects. After TiledCS unfortunately became unmaintained (since 2022), I aimed to create a new library that could fill its shoes. DotTiled is the result of that effort.

Quickstart

Loading a map with external tilesets

using DotTiled;

TmxSerializer tmxSerializer;

// Tiled can store tilesets in external files or in a map itself
// When they are stored externally, you need to provide a way 
// to resolve them given their source path
Func<string, Tileset> externalTilesetResolver = (string path) => 
{
  // Load the tileset from however you want
  var tilesetXml = fileSystem.ReadAllText(path);
  var xmlStringReader = new StringReader(tilesetXml);  
  var xmlReader = XmlReader.Create(xmlStringReader);
  var tmxSerializer = tmxSerializer.DeserializeTileset(xmlReader);
};