A more complicated but ultimately faster approach is using a structure like an Entity Component System. You build an entity (deer, person, plant) out of components that are just data (health, hunger, mood), and then each type of component has a corresponding system that updates all the components at once based on other values. It’s somewhat similar, but you save space on unnecessary components not being added, and it packs the data together in way that is faster for the computer to iterate through.
A more complicated but ultimately faster approach is using a structure like an Entity Component System. You build an entity (deer, person, plant) out of components that are just data (health, hunger, mood), and then each type of component has a corresponding system that updates all the components at once based on other values. It’s somewhat similar, but you save space on unnecessary components not being added, and it packs the data together in way that is faster for the computer to iterate through.