Game Design

Hi all.

This thread is for the discussion of game design.

Game Design

Creatures / Characters - How do you design a system consisting of humans and other creatures with extending classes for offspring and the sort?

So lets say they are not just simple wandering AIs/NPCs that either run away or chase and then kill or be killed. Lets say they do more than that, they have stats like HP and Stamina, they interact with other systems based on their individual characteristics, stats, etc. They are slightly different by group and maybe even as individuals, but should contain similar general feats.

So, how do you go about building a structure for creatures/characters? Especially if you plan to have a lot of different kinds. Do you build a class like ‘object’ or ‘creature’, and then make child classes from those and then some of those might have additional child classes and whatever else?

I was wondering, does Unity already have a structure like that built in? If not then i can build my own right? But what other systems are there? How does the world go about it? Do you have any better ideas / systems for such a game design? Share it please.

What you are describing is called object oriented programming. (OOP)

So as an example:
class: animal
class: dog, inherits from animal
class: duck, inherits from animal

in the animal class you define everything that all the animals have in common. But keep in mind that in the dog class you can overwrite something you defined in the animal class.

Also please, dont define a class called ‘object’. It’s like defining a class called ‘instance’ -_-

Here you go: Object-oriented programming - Wikipedia

Yep classes is the way to go. one of the WalkerBoys tutorials describes classes.