Best way to use TileMapLayer?

Godot Version

4.5.1

Question

Hello everybody

I’ve started experimenting with the TileMapLayer node for my upcoming project and I’d like to know from more experienced users whether I’m on the right track.

At the moment, I’ve created a very basic room with a floor and two walls using these assets: https://kenney.nl/assets/isometric-miniature-prototype

While building my walls, I had some problems of “overlaps” as you can see below

To solve that, I found 2 ways to put together: changing the Tile layout, and also the z-index on some parts, increasing the z-index for upper parts solved the final problem.

And there I changed the Tile Layout to Diamond Right, because If I stay on Diamond Down. Of course I should rebuild my wall when I change the layout, but it solve the initial problem.

Final result with “my method”

So, am I on the right track by doing it this way?

1 Like

There’s a better way to do this:

  • For creating the tiles of your TileSet, each png of the asset pack should only result in one tile, not multiple. You can either change the “Texture Region Size” of the atlas (before creating the tiles) or hold Shift while creating the tiles to make a bigger one.
  • Then you need to set the texture origins accordingly. (When using the whole 256x512 png to create a tile, the texture origin should be set to (0, 192).)
  • Now you can just enable Y-sort of the TileMapLayer to solve the overlaps. You can also use the same TileMapLayer for both walls this way.
1 Like

Thanks a lot !

It’s really look better like that without an hesitation :heart_eyes:

It was also my fault, yesterday I didn’t pay attention to the “Hold Shift to create big tiles”

1 Like