I am starting to work on a game with a 3/4 overhead viewpoint (think Final Fight or Streets of Rage) and I plan to use a lot of active objects for scenery and interactive stuff. I have always had issues in the past with sorting objects properly, especially when the player and moving enemies/objects are constantly changing their Y (depth) positions. Can anyone offer a low overhead solution for managing the sort order of things in a scene?
I have tried using the Layer Object's "Sort Descending Y" in the past, but found out it is a very costly operation to always perform, especially on mobile. Is this something that ForEach loops would be better at handling? I had considered a system where objects are laid out in the scene with preset depth values stored in a var. Then leave large gaps in the depth value ranges to allow for a lot of moving objects to exist inside without mucking up the static scenery's depth arrangement.
I searched around but can't find any good examples or suggestions on best practices. Anyone have any ideas?