Hi. I m working on a game project and still trying to learn. I need some informations about creating enemies or npc's.
For instance I created an enemy class.
There will be different types enemies or npc's and they will have their own hit points, stats etc.
They will do different actions in a time for example one of them will stay and another one will move (randomly) …
When one enemy or npc dies i have to delete its sprite or sometimes will add new enemies… actions like this.
İmportant note: I need to detect collision between enemies from same class. if a zombie touchs another zombie i need to detect this action and i tried with arrays and vectors but i cant do that.
My question is:
What is the best way to do that? What kind a container i need to use like array or vector or another" type?
And if you know tutorial links about this matter please share, i would appreciate it. Thanks for every help and advice.