It's all relatively simple, but I'll be explaining a lot of the programming as I go. I chose Corona/Lua for this project because it'll be easy to port to iOS in the future. The tradeoff here is that it's aggressively
Usually I let objects just draw themselves; This time I need to sort objects, and corona lacks a built in depth sort. I have to sort them myself and then add them to groups in the proper order.
To simplify things, there will only be three layers. Everything below (Tiles, grass, etc), sortable objects (Walls, characters, bullets) and everything above (particles and clouds).
Object sorting is simple, though. The further up something is on the screen, the more 'behind' that object is.
This means I just have to sort objects by their y-coordinate, and draw them in the list's order. Removing objects is easy, and if I have to add an object I can just shove it in the middle and sort it again.
Tune in next week where I google "Sorting algorithim" and then ultimately decide to go with one someone else has written for me.