I'm working on a game (in libGDX) that would allow multiple player accounts. I need to store some simple user data (several key-value pairs). I think JSON is the best for my needs, but I'm wondering how this data should be organised. I'm thinking about two possibilities:
- single file for each player seems better design-wise, but I'm not sure if real-time file creation won't lead to issues
- one big file with player id as key and organised array of values - safer, but would require loading data for all players on initial read and each update (although there shouldn't be that many accounts on a single game instance). Also harder to maintain due to necessity of keeping values in proper order, etc.
Perhaps there are better ways to do it, that I didn't think about.