Tiled map export to defold collection has wrong tiles position

Greetings everyone!
I tried using Tiled for making a test map but after exporting it as a Defold Collection it seems that the tiles are wrongly positioned. The editor seems to acknowledge that 2 of the 3 tile sources are 32x32 and one of them is 16x16 but makes weird spaces between the tiles anyway.



Any ideas on how to fix it?

As far as I know, Defold doesn’t support multiple tile sizes per tile map.

1 Like

Thanks for the reply. The city.collection showed in my previous post actually contains 3 tile maps:

  1. city-beach
  2. city-exterior
  3. city-nature
    each of those tile maps has respective tile source inside the tilesources folder and tile sources for 1 and 3 have tile height and tile width set to 32x32 and 2 has is set to 16x16.

The messy tile placement you see in my previous post is all of those tile maps layered over each other and not a single tile map.

In fact when I look at the tilemap number 2 (that has tile source of 16x16) the positioning looks completely fine.

But when I look at the tile positioning of the maps that are created from the 32x32 tile source (number 1 and 3) the tiles are completely off. However there are exceptions… :confused:


It seems that I managed to find a culprit of this problem. The map in Tiled was set to use 16x16 tile width and height but since Defold knows that two of the tile sources are 32x32 it sets the plane tilemap to be 32x32.

This is yields the same result when I set the map’s tile width and height to 32x32 in Tiled:

I however need to somehow tell Defold to use 16x16 coordinates for every tile map (even when it has a 32x32 tile source) as it does in Tiled… :confused: