Most games have some sort of static data, such as a list of weapon types and all their associated parameters, like damage, ammo type, range, etc… This sort of data normally never changes during game play and just needs to be accessed by various systems in the game. My game has a whole bunch of this sort of data and I’ve got to the point where I’m trying to figure out the best place to keep it all so that it is easily accessible by any system in the game at any time.
So far, I’ve just been dumping it all in the game state. The problem with doing this though is that I need to pass a reference to the game state (or cast a reference to it) in every single system or actor that needs to access it. All my classes and blueprints are becoming littered with game state references for this purpose. So it got me thinking, there has to be a better way.
I’m looking for feedback from other people on where they store their global game data and how they access it throughout their game classes and blueprints?