While playing my game the player has the option to purchase different upgrades to boost stuff like movement speed or to alter the behaviour of the weapon he carries. I need conceptual help on how to best implement such a system.
So far, I have three Master scriptbtable object scripts (Player, Weapon, Enemy) of which I can generate SOs for every new weapon, enemy or player character I want to implement. These SOs stay static aka won’t be altered and will be used to initialize the scene in a C# script. From there a runtime stats tracker takes the initialized values but also communicates via a delegate system with other game systems to keep track of enemy and player stats (HP, speed, etc.) Below is a small conceptual drawing of a solution I think about right now:
Safe to say, this gets complicated fairly fast. And here I don’t even have the full functionality drawn. For instance it would also be nice to alter the shop or the powerup system via permanent Roguelike upgrades. The number of connections between the different systems gets hard to oversee especially as additional systems need to be implemented. My main goal is to start with a scalable framework now so that it is easy to implement more content later. I am fairly certain that a runtime stats tracker coupled with an events/Delegate system is a good solution, however, I am also fairly new to OOP in general so if anybody has a better solution or other tips and tricks I would appreciate it.