How to use JSON format


Just got started with tiled. I created a map with 2 layers, 1 with my background grass and then another layer with some road tiles. I saved the map as json. When I look at the json I can’t see how I’ll be able to tell what graphic a specific tile should have in my game.

In layers there is data, a long array of numbers but what do these numbers correlate to? For example 12 is in the array repeatedly but there is noting else in the file that 12 could correlate to.

tilesets have something called firstgid but I wasn’t able to understand from the TMX documentation what it’s good for. I tried saving my map as TMX as well and it became huge. Is there a manual for JSON or only for TMX?

Found the answer after a bit further reading in the documentation. It was a bit too sophisticated for me but now I understand :-).

For anyone who have the same question as me read the whole section on data especially the last part.

1 Like

Yeah, sorry for hiding that information only on the TMX format page. The JSON format documentation really needs more love (and should be moved from that old location), and the system with the global tile IDs could probably use its own section entirely.