dcronqvist / DotTiled

📚 A .NET library for loading, saving, and handling Tiled maps and tilesets
https://dcronqvist.github.io/DotTiled
MIT License
12 stars 2 forks source link

DotTiled.MonoGame.Pipeline ?? #34

Open Serdan opened 2 weeks ago

Serdan commented 2 weeks ago

You mention DotTiled.MonoGame.Pipeline in the readme, but I can't find it anywhere.

dcronqvist commented 2 weeks ago

Yeah, I should remove that. I currently only have plans on creating a MonoGame.Pipeline nuget for MonoGame support.

There's currently nothing available like that for DotTiled, but we can keep this issue open until I have added that support.

Sorry if that caused a bit of confusion, I'll correct it in the README as soon as I have my workstation available.

TheBoneJarmer commented 1 week ago

If you are looking for MonoGame support, may I suggest not using the pipeline at all? It was not designed for that. The pipeline was meant to parse images, models and fonts since they are all external graphics files which needs to be converted to an internal format used by the graphics driver in order for the renderer to display them on the screen.

Tiled maps (and xml files in general for that matter) are data files and serve a different purpose. They need no parsing since they are stored in ASCII/UTF8 format already, readable by almost any file reader. And usually not as big as image or model files.

Serdan commented 5 days ago

Yeah, I came to the same conclusion and forged ahead. The only, minor, concern is that the image source in tsx files can't be trusted because it's an image file and goes through the pipeline.

TheBoneJarmer commented 5 days ago

You are right about the image source. But the way I handled those was by using a Dictionary<string, Texture2D> where the string was the filename of the tileset and the texture2d object the tileset itself. Saves you not only re-loading the tileset again and again but that way you can match the tileset as well with ease.