I'm not entirely sure what you mean but if it's for a game with the same perspective like diablo but with NO third axis of movement (jumping) i find something like this usually works
For each (object that needs to be sorted, best to use a family) ordered by Familynamehere.Y - ascending
Hope that's understandable