So far I've been using multiple objects OUTSIDE the game screen with local variables to store my in-game values in. I found that way to be quite clear for me, even when exiting a project and coming back months later.
So basically I do:
Object "playerStats" contains things like: "health", "speed", "currentWeapon" etc.
Object "weaponStats" contains things like: "name", "damage", "bulletSpeed", "range" etc.
When the player picks a certain weapon with name x, the stats are set in that weaponStats object.
Those objects obviously are in a layer (usually my HUD layer) that is gloal.
I tried solving this via Arrays, but found it overly complicating to always look up which value is meant with a certain X and Y. Dictionaries are more clear on that side but they lack the dimensions that arrays have.
An array could contain all weapons on the X position and their stats on Y. WIth dictionaries I would still need a global variable for example to solve this.
What do you use to store your values? Is the method I use any good perfomance wise, or should I rather use something else?