[ANSWERED/notsolved] How do I implement tilemaps correctly? Correct Atlas File?

Hello,

Hello,

I would soon start building the game world, but unfortunately I’m struggling with a problem understanding how to integrate the tilemaps into Gdevelop.

I have a small test map in Tiled that also contains some animated tiles. Of course, exporting as JSON is not the problem. BUT:
What I don’t understand is how do I get a valid atlas file?

Can this be done directly from Tiled? And what rules, if any, do you have to adhere to here?
And is it even possible, if I have more than one tileset in use, as seen at the bottom right of the screenshot?

There’s a full guide here on implementing tilemaps from Tiled and LDTK. Tilemap - GDevelop documentation

I will call out that it only mentions it briefly, but ensure your tilemap is not set to Infinite size. It must have a defined size (like 2500x2500) to work.

As far as your last question, only one atlas (and tileset) per Tilemap object. You can change the atlas, but you cannot have multiple atlases at once. You’d have to merge your tilesets into one atlas. (Note that the max tileset atlas size is the same as any other sprite, ~2000x2000).

1 Like

Ah okay.
Thanks for your answer.

But then in my case it’s already clear that I won’t be able to get it to work that way.

It’s a shame that Gdevelop doesn’t simply support tilesets directly here.

But then I have to do it differently, i.e. without tileset animations and the collision queries can also be solved differently.

Do you know that this support will ever be available in Gdevelop?

little addition.
My main requirement is to build a map that uses a lot of tilemaps.

I already understood - this is not supported anyway, there is no way to integrate these tilemaps directly into the JSON file or Gdevelop does not read them and needs exactly ONE atlas file.

It is an open source engine, anything is possible. There is nothing announced by the GDevelop company devs or anything though, so no I can’t say it it ever will be added.

If you are going to have different regions with different tilesets, you should just have separate maps for each region.

If you are going to have one region with multiple tileset pieces mixed in, you should just merge the atlas images.

If you are going to have one region where the tileset changes suddenly from an event, you could just change the atlas file for the map via events (so long as your atlases are set up with the same tile positions)

1 Like