7 November 2024 - The Entity System
<<< Previous Post
Next Post >>>
I briefly mentioned this in the previous blog post, but my goal now is to formalize and create the entity system - the system which is responsible for making NPCs and animals work.
All around, this system is a big goal for me, but it's one that I consider to be very important to my design and so I have made sure to very carefully plan how it should work as to prevent accidents during development and feature creep.
Design
In general, though, I have the following concrete "rules" for entities:
Outdated Goals!
These design goals are no longer being followed exactly as written (or, there have been some tweaks). They are kept here for historical purposes of the blog. The next post contains updated information.
- All living entities should have an agnostic controller which works off of a set of common, universal actions.
- This allows a basic abstract controller which can have more added onto it if needed - this includes the player controller, effectively adding a native ability to be any entity in the game.
- Entities should provide an identity which allows them to recognize allies/foes not by type but instead by attribute.
- This goes hand in hand with the above, where an entity (including players) which is registered as a certain species will be treated as a member of that species.
- Modders will be urged to never check the class type when checking entity identity.
- Entities with physical bodies should have physical bodies. This is largely inspired by Rain World which physically simulates every single character model in the game.
- This system makes a significant impact on the player's actions as it allows them to feel like they are truly interacting with the world. If you critically damage someone's limb, it should be unresponsive to their body and limp.
- This system doubles as a physics bone (jiggle bone, dynamic bone, whatever) system.
- Entities should have a framework to react to simple stimulus, and an even simpler emotional memory. Perhaps the most vital rule in extension with above, and also inspired by Rain World. This is probably what earns the game its praise for having such a "well-simulated ecosystem". It solves one of the oldest problems in gaming.
- This doesn't have to be realistic, it just has to be believable, characters have to react to what happens. In essence, we are taking advice from Gabe Newell.
- If you hurt something, it should remember that and not like you.
- If you set off an explosive or even a sudden loud sound, people and animals should run away or be prompted to investigate.
- If you give something to someone, they should remember this.
Most importantly, I have a plan to get all of these implemented. A lot of this idea, especially points 3 and 4, are pretty stretchy goals, but I am very confident that they are attainable and I am certain people will enjoy it. They are a lot simpler than they sound, and that is important to remember.
All around I am very excited, as the design of the game is truly coming together. I'll keep you all posted (ideally)!