Original Post
I'm working on an isometric game where the tiles are squares, and having a hard time figuring out how to depth-sort objects. Have a look: http://mail.rochester.edu/~mabernet/isometric.swf (use arrow keys to move the red box, space to jump). At the moment, it sorts from front to back, then top to bottom where there are ties. If you jump on the low wall to the right and move towards the back, you'll see the problem: the wall gets displayed over the box, even though it ought to be the other way around. The problem is that since the box's front-back coordinate is at that point less than the wall's, it gets sorted behind. What's the proper way of computing depth in a situation like this? Is there any linear ordering of objects based on their coordinates that gives what should be in front of what? [Edited by - _Flecko on June 10, 2006 12:09:28 AM]