Right now, Rotten Soup uses an older OOP paradigm of managing entities. Here's a visual example how the files are laid out from an inheritance perspective.
There are several good resources out there that break down why this pattern is bad - I highly suggest watching this presentation by Brian Buckley (creator of Caves of Qud) https://www.youtube.com/watch?v=U03XXzcThGU).
The tldr is that when we define entities via inheritance, we eventually find areas where the same functionality is duplicated over and over again. Consider in the example above if I wanted both a bow & a sword that caused fire damage and costed mana everytime I attacked with it. The sensible approach is designing a master Entity base class, then adding pieces of data or components to that entity class.
My vision for Rotten Soup is not to embrace an "ECS" framework - because I don't personally think this is the right solution. I think we should take ideas of making entities data, and making it so that their characteristics and functionality is defined by modular components!
I have written some experimental code in the items-overhaul branch that toys with some of these ideas. I would love for folks to contribute here and figure out ways that we can redesign the way Rotten Soup handles entities - and if we can solve this problem, then it opens up the game for a massive content push where folks can rapidly create new item types with wild effects to make this game more fun and interesting.
Right now, Rotten Soup uses an older OOP paradigm of managing entities. Here's a visual example how the files are laid out from an inheritance perspective.
There are several good resources out there that break down why this pattern is bad - I highly suggest watching this presentation by Brian Buckley (creator of Caves of Qud) https://www.youtube.com/watch?v=U03XXzcThGU).
The tldr is that when we define entities via inheritance, we eventually find areas where the same functionality is duplicated over and over again. Consider in the example above if I wanted both a bow & a sword that caused fire damage and costed mana everytime I attacked with it. The sensible approach is designing a master
Entity
base class, then adding pieces of data or components to that entity class.My vision for Rotten Soup is not to embrace an "ECS" framework - because I don't personally think this is the right solution. I think we should take ideas of making entities data, and making it so that their characteristics and functionality is defined by modular components!
I have written some experimental code in the items-overhaul branch that toys with some of these ideas. I would love for folks to contribute here and figure out ways that we can redesign the way Rotten Soup handles entities - and if we can solve this problem, then it opens up the game for a massive content push where folks can rapidly create new item types with wild effects to make this game more fun and interesting.