This is driving me crazy. I have a "sophisticated" storage system that seems tidy in theory but in reality introduces a lot of bugs.
This is all of the player's data, scattered around several objects:
* Player: Health, ammo, etc; resets every level
* PlayerStats (Global Dictionary): Equipped items, number of upgrades, current money; saved to WebStorage as JSON every level/change
* BoughtItems (Global Dictionaty): Which items have been bought in the store (only one per category can be equipped; that's saved in PlayerStats); saved to WebStorage after every purchase
* LevelScores (Global Array): Highest score on each level; saved after every level
* LevelStats (Global Array): Current in-level stats (kills, damage, etc) used to calculate your score. NOT saved to Webstorage.
Is this a good way to manage a large assortment of data? Or is there a better way to keep track of all these numbers?