Hey all, just kind of playing around making simple games at the moment, and was wondering about player stats.
If I have a party-based game, with a few characters controlled by the main player, what is the best way to track their stats?
For example, if I have two characters with some stats:
Health
Resource
Strength
Speed
etc.
What is the best way to track these stats? I would need them to calculate when battle occurs, as well as when not in a state of battle, to see interactions with items that can be equipped, as well as using items in inventory to affect these stats (think health potions or perhaps speed potions). I would want to be aware of their values throughout the game. From my past programming experience (limited as it is) I know that having a ton of global variables isn't usually a good idea.
I know that one approach to tracking enemy stats is to use families because they won't be used outside of a combat instance, but I don't think this would work for what I am doing.