1) Store all your sprite objects in a TList (or Array if you have a lot of them).
2) Make a compare() method in your sprite object that works on the Y coordinate.
3) Sort the TList before you draw it.
2) Make a compare() method in your sprite object that works on the Y coordinate.
3) Sort the TList before you draw it.