Ragath / TiledLib.Net

Cross-platform Tiled map parsing utilities.
MIT License
26 stars 8 forks source link

Tilesets with individual image files for each tile #3

Open danielscherzer opened 6 years ago

danielscherzer commented 6 years ago

If one uses tilesets with individual image files for each tile, like ground.zip These image files have no representation (especially no filePath) in the ITileset or possibly Tile data structures. What is the recommended way of handling such use cases?

Ragath commented 6 years ago

This is currently an unsupported use-case. Normally you want to bundle images together on the same texture to make in-game rendering faster, hence why this has not been handled previously.

When you have a pre-processing step using this to automatically bundle images together this feature becomes more relevant. I do intend to support the entire Tiled spec though, so you can expect to see the missing pieces added in the near future.

danielscherzer commented 6 years ago

Thank's for the info. So its more of a feature request for the future. Regarding speed: For this use case I use 2d texture arrays (OpenGL) wich handle filtering on the tile borders and roughly the same speed as with one big texture atlas. But loading is probably still slower.