Skip to main content
edited title
Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345

How to Structure my Database for a HTML turn-based strategy game?

Bumped by Community user
Source Link

How to Structure my Database for HTML game?

I'm making simple HTML socket game that I want to record over time.

It's a "risk" type game where individual tiles can be conquered, and the team with the most tiles is winning.

As of right now, I've finished most of the game, but the problem is that every time the server restarts all the server data is lost.

I want to use the database to store all the different teams and also of all the tiles that have been conquered, but I am also thinking of storing all the tile conquerings with timestamps so I can see the progression of how the map was conquered. (so I can theoretically play it back in time and see how the map began to evolve).

I also want it so on the event that the server crashes, the server can retrieve data from the database and go back to a previous world state (with which tile has been conquered by whom, etc.)

I'm very new to databases, and have only learned SQL in school because I had to. I was considering using MongoDB (noSQL) for this, and seeing that I will only write at most every few seconds to the board, is this the right approach?