Correct depth position of Isometric 2D sprites with different side lenghts

Hi all!

I’m trying to make an Isometric city-builder (like Caesar 3 or Lethis) but I do not know how to properly make the graphics to work.

When I have sprites where the sides, the length and the width, are not equal I do not know hot to calculate/fix so that the whole sprites have the correct depth-position. So that the sprite is in front of or behind other sprites correctly for the whole sprite.

What I do now is that i calculate a mean depth-value for sprites (changing the Order in Layer), which works well for sprites with sides of equal length.

What options do I have? Would changing the order of the tiles help? Must I split the sprites and if so how do I do that properly?

Image below is from my game. Green circles show correct behavior, red circles show wrong behavior.

Thanks in advance!
//Knapp

It’s normally a case of organising your ‘sorting layer’ and ‘order in layer’ based on the tiles grid position. Then maybe make some tweaks to specific sprites manually if needed. That’s about the extent of my experience with 2D tilemaps. Search for something like iso tile map rendering techniques. Plenty of good information out there.

1 Like