Gio or Foxcode,
I am developing a zaxxon like game.
In the game, there is a dragon who flies throught isometric space.
The dragon can go up or down (by modifying the y offset) to fly over various obstacles.
I can generate a height map and then calculate whether the dragon has hit or can pass over something.
My current problem has to do with the visual sorting of the sprites as the dragon flies around.
If I say have a tower and I set the offset for the tower so that it looks correct in the center of the grid.
Then, if I try to put an archer on top of the tower, the offset has to be different. Also, if the tower is to the left of a lower height wall it requires a different sort point, and if it is to the right of a lower height wall, it requires yet a different sort point.
I don't think that keeping multiple object descriptions will work (i.e. tower, tower with archer, tower left, tower right) in all conditions
My question, is how do I make it so that visually, it looks correct ?
Right now, I'm thinking I will get the objects in the cell where the dragon is, sort them according to height from lowest to highest and then reorder their sprites accordingly using bring to front / send to back. ?
I'm hoping you've run into this sort of thing before and can give me some advice.
As usual, any help is always appreciated.
cheers,
Shri