Skip to content

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.

  1. All living entities should have an agnostic controller which works off of a set of common, universal actions.
    1. 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.
  2. Entities should provide an identity which allows them to recognize allies/foes not by type but instead by attribute.
    1. 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.
    2. Modders will be urged to never check the class type when checking entity identity.
  3. 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.
    1. 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.
    2. This system doubles as a physics bone (jiggle bone, dynamic bone, whatever) system.
  4. 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.
    1. 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.
    2. If you hurt something, it should remember that and not like you.
    3. If you set off an explosive or even a sudden loud sound, people and animals should run away or be prompted to investigate.
    4. 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)!