Hello there!
I'm wondering what's the best way to have all the data of a "typical RPG" stored.
I really like the modularity of javascript objects. So is there anything wrong with using JSON to store most, if not all of the data instead of using arrays, dictionaries or global variables?
Some time ago I worked with RPG Maker MV and liked the way the battle system handled the battle formulas. I'm thinking of a similar system where I can do things like
player1.hp = player1.hp - (player2.atk-player1.def)
(Just a very basic/bad formula for easy demonstration.)
Sure I could use dictionaries for this and call them player1, player2 etc. . But with JSON I imagine to be a lot more flexible with storing the data.
Are there any downsides in using JSON as a database and for runtime calculations (turn-based rpg)?
As always, thank you in advance!