Comment on page
Actors, Players, NPCs
How to organize our actors
Using game modules, all things that might have stats, conditions, give conditions, have an inventory, and so on, will benefit from having an
actorclass which inherits from
GameModulesInventoryActor. Just because it has an actor class on it, does not mean it's going to walk around and do things in the world.
All entities will be interactable, implementing
IAmInteractable. They will have to decide for themselves what happens when they are interacted with. And all will have a
public actor Actoron them.
Actoris a class which inherits from
GameModulesInventoryActor, and may have additional functionality on it in the future, shared by all
An entity can be the Player, or a townsperson, or a dragon. It can also be a treasure box, a secret wall that can be destroyed, or a barrel that explodes causing massive damage.
This is one of the main player characters. These are special. For Legend of the Stones, there will be 4 players, each of whom does not have an in-game body. Instead, we have a first person view with four portraits. However, each player will be a
Entity), and can do things with
Update()and other similar methods.
This is an
Entitywhich can move around the world. It doesn't mean that it's an
NPC, it just means that it may wander around the world in some way. While it can be interacted with, it does not have all the engagement mechanics that an
This is a
Characterwhich engages with the player. It may be an enemy or a friend.
NPCswill also be able to join the party as a "hireling" or follower.
While the chart below shows the basic flow of inheritance, we will likely have additional classes added. For sure we will have specific classes for specific NPC/Enemies such as "Slime", which has unique methods and properties to that specific character.
We may also add new classes for specific non-character entities. One may imagine a "
Barrel" class which inherits from Entity, and handles all the aspects of being a barrel. Even then, we may have "
LootBarrel", etc to further segment things out.