Best way to associate tile maps with tiles? #341
-
So I have a map which I created with the "Tiled" editing software. I wrote a utility to convert the save format to a constant array in my rust agb game, but I am getting stuck in how to associate the tile index given by "Tiled" to the tile index assigned by the Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey! The quick answer is 0 is the top left, and it's row major. We use tiled for our examples, the best one is The Purple Night for this. The trick we use here is to make tile 0 be transparent because tiled, at least in this case, starts your tiles at 1 and uses 0 to represent no tile. So rather simply a saturating subtraction of 1 converts from tiled tile space to GBA tile space. |
Beta Was this translation helpful? Give feedback.
Hey!
The quick answer is 0 is the top left, and it's row major.
We use tiled for our examples, the best one is The Purple Night for this. The trick we use here is to make tile 0 be transparent because tiled, at least in this case, starts your tiles at 1 and uses 0 to represent no tile. So rather simply a saturating subtraction of 1 converts from tiled tile space to GBA tile space.