I’ve hit a bit of a snag with some of the logic for a game I’m creating, perhaps someone here can help.
In the game you can move around a map, when you move the map and the objects on the map is the only thing moving, so you’re always centered. For this reason I decided to separate things into 2 layers (Sprites):
- You
- Everything else (other people, objects, the map, etc…)
Now this seemed like a good idea, because when you move I can just tween the the second layer as a whole. The only problem is every time certain events happen (ie. a player moves) I need to reorder all the objects to make sure everything is layered correctly. But this won’t work because… lets say for example:
Layer 1: You
Layer 2: Person 1, Person 2, Person 3
Say I need to to layer things in the order of: Person 1, You, Person 2, Person 3, it’s impossible to place Layer 1 somewhere in the middle of Layer 2.
So does anyone have any ideas on how I could do this instead?
This is hard to explain, so if you didn’t quite follow, or think I didn’t do a good enough job of explaining post and say so and I’ll try my best to clarify.