Hi guys,
I’m working with a small 8x8 tileset in Tiled. It has a few empty tiles in each column and 48 of the tiles have graphics. Clicking the tiles in the tileset editor, they all have the appropriate ID, even the empty tiles.
However, After exporting my tileset as a .tsx file, I notice that the tile ID’s go straight from 0 to 47, skipping all the empty tiles. How am I supposed to extract the correct graphics from this map now?
As I’m writing my own tilemap assembler in AS3, I don’t know if this is a problem with other API’s, but it seems very strange indeed that the tile ID’s show up correctly in Tiled, but then export as different IDs in the end.
There is nothing in Tiled that skips empty tiles, so I think you’re seeing something else than what you are describing.
A TSX file will generally only include explicit tile elements for tiles that have some kind of data associated with them that you have specified in Tiled. For example when they have custom properties defined. When a tile hasn’t been touched, there won’t be a tile element but the tile still implicitly exists based on the size of the tileset image and the tile width, height, spacing and margin parameters. Could that explain what you are seeing?
Thanks for your response bjorn!
Seems like my empty tiles had a custom property associated with them,
which were throwing the exporter for a loop since it was expecting only 47 export tiles and therefore exported the first 47 which all had data tied to them. Removing the property from the empty ones seem to have fixed it!
Thanks dude!