I'm figuring out how to handle the overlapping issues on a RPG game.
To make a screen, imagine a old RPG like Zelda 16bits.
Let's brainstorm about it and hit a final solution until the official Behavior don't come out.
The Problem: In Generic RPG Games, the hero overlap objects on the map, like trees, rocks, grass, houses, etc.
The First Alternative: Make a code for each object type on the canvas check if the player.X and Y is over or under his object.X and Y.
This way you will need to setup the X and Y origin always where you want the objects and player touch the ground. Many people handle this on Flash using a shadow, so, if something is below the middle point of the character shadow, it will overlap the player, if not, will go behind (one level).
The actual problem using this way is: you can't know if the player is the next object behind or on the front of the object, so, how do you setup it to go 1 level behind the player? You can't, it don't have an index (or I missed this part of study).
Do you did another solution? another way? share with us.