How should I sort images in an isometric game so that they appear in the correct order?
- by Andrew
This seems like a rather simple problem but I am having a lot of difficulty with it.
What should I do to properly sort images in an isometric game?
In a normal 2d top-down game one could use the screen y axis to sort the images. In this example the trees are properly sorted but the isometric walls are not.
Example image: sorted by screen y
Wall2 is one pixel below wall1 therefore it is drawn after wall1.
If I sort by the isometric y axis the walls appear in the correct order but the trees do not.
Example image: sorted by isometric y