Class Monsters

What is the best way for you to create class for monsters?
In one script like:
class monsters
class goblin:monsters
Or in separated scripts but with the same way?

Or something else?
I need some inspiration to work comfortable.

Probably depend on what the difference should be between the classes. Eg. if only the attacks differ it might be a more clean approach to have the attacks as separate objects and have the monsters all share the same code that contain references to what attacks they should be allowed to use.

If there are to be alot of differences for each class though I’ld say polymorphism. Have the monsters share the same base class and derive it into a sub-class for every monster class/type, considering that no matter what monster type you are creating it will most likely share atleast a few basic methods with every other monster.

1 Like