Hi,
I'm currently creating an isometric game and I have some problems with creating and destroying the square map objects and the projection objects at the same time.
At the moment I have only one enemy which has a solid map object for collision detection and the overall game logic. Also it has an isometric projection object which is only for the isometric graphics. When the game creates an enemy, an instance variable for the map object is set to a random number and the same one is set to the isometric objects instance variable. So when an enemy is destroyed (the map object) it will search for the iso object with the same random number and destroy that one aswell. This system works but has some problems when I try to destroy too many enemies at the same time. Sometimes the isometric object is still there when the map object is already destroyed. Also I had invisible enemies sometimes when the map object was still there although the isometric object was already gone.
Maybe someone has an idea of what the cause for this problem could be? Or even a better way to do this whole thing?
I already had a look at the containers, but I would like to have only one solid map object and one isometric enemy object with different animations, which will have parameters to adapt to different enemy types. This won't work with containers though I think. The goal is to have a dynamic system to easily add more and more different enemy types to the game.
Any help is appreciated!
Thanks!