Hi! I’m creating a game where I’m planning on having multiple types of enemies.
Lets say I’ll have giants, dwarfs, humans (both melee and ranged), basic flying type enemies aswell. Thier AI will be controlled with FSM.
What’s a good way to design the class structure of the enemies. I’m a bit lost here.
I don’t know if it’s good or not but what I have right now looks s’thing like this:
- Abstract enemy core class wich contains all general variables needed for the enemies (HP, stats, etc…)
- Abstract ground type class extending the enemy core. This contains abstract methods and variables regarding movement
- Dwarf class extending ground type. This is the actual class of an enemy containing all methods needed like render(), update(), etc…