I’m working on a simple prototype of an RTS game. Currently I’m developing resource system where player can collect different types of resources, spend them on construction, get them back after solding a building etc.
And I need advice on the proper architecture of such a system with performance in mind.
Because I’ve found out recently how UE handles asset references and realized that my current approach is ugly considering that.
Currenty I store all of the resources values in the PlayerController class and pass them to the GameInstance before the level changes. Hence all my widgets store reference to the PlayerController, which has references to other things.
And such approach bloates both disk and memory sizes of my assets unmercifully.
Will greatly appreciate any advice.