Tiled leaves all values 1 too high

52 Views Asked by At

Not sure if this is the best place to ask about tiled, but I know it does have very quick responses so off I go. I am using tiled to generate a tile map for the Ludum Dare, but whenever I export it, it always leaves all of the values 1 too high. What is the quickest way to move all of theses values one down?

1

There are 1 best solutions below

0
On

You are referring to the tile numbers of that appear in an array of tiles in .TMX files produced with the Tiled program. There is a simple reason for this: typically, arrays are stored with [0] being the first index; Tiled stores those tiles beginning with [1]. This means that when you are integrating these files into whatever game engine you are using, you will need to keep this in mind. Whether it's iterating beginning at 1 or simply subtracting 1 from every tile value you retrieve, it's easiest to just use TMX files with this in mind rather than trying to rewrite the TMX files themselves.