-1
I made a little game in Java and the players' dice are in the database, when a player enters, he is placed in a ArrayList<PlayerData>
where it contains the getters and setters of level, money and etc.
When the player leaves the game, the dice are saved in the database and every 60 seconds all player data within the game is also saved.
I modify the level, money in ArrayList<PlayerData>
instead of modifying directly in the database (within Java).
The "game" would go faster if instead of me changing by ArrayList<PlayerData>
and then save in the database, I modify directly in the database? Or would it be the same thing? Would there be some way to improve this?
Did any of the answers solve your question? Do you think you can accept one of them? Check out the [tour] how to do this, if you haven’t already. You would help the community by identifying what was the best solution for you. You can accept only one of them. But you can vote on any question or answer you find useful on the entire site (when you have enough score).
– Maniero