"Il y a peu de choses qui me soient impossibles..."
"Il y a peu de choses qui me soient impossibles..."
what happens when player statistics need to be updated and then read back...that's a lot of MYSQL queries
...loading/saving database states
Darren Estcourt wrote:I have gone down the route of reading about timestamps and I can't find anything which suggests what type of field should have a timestamp.
My objective is just to version tables, so that when the user loads a saved game, the correct version of the table(s) are loaded.
I figured I wouldn't import a whole database, which might take a long time, given this database will be relatively large. Instead I would version tables with a timestamp and just load the tables required.
Stevens Miller wrote:
First, make it run.
Second, make it work.
Third, make it fast.
These days, that last one is amended to read, "make it fast (if you need to)."
Darren Estcourt wrote:
My objective is just to version tables, so that when the user loads a saved game, the correct version of the table(s) are loaded.
I figured I wouldn't import a whole database, which might take a long time, given this database will be relatively large. Instead I would version tables with a timestamp and just load the tables required.
Can anyone offer me their insight on this issue?
Junilu Lacar wrote:
Stevens Miller wrote:
First, make it run.
Second, make it work.
Not sure what the nuance is between the first and second one.
Did you mean Make it work, make it right, make it fast?
"Il y a peu de choses qui me soient impossibles..."
Version | Player | Score | Last Move |
---|---|---|---|
1 | 10 | 4 | 10 |
1 | 23 | 9 | 42 |
2 | 10 | 7 | 11 |
2 | 23 | 12 | 48 |
Darren Estcourt wrote:Thanks all
![]()
My requirements are simply to allow the user to click "save game" in my Java gui, and it will load their previous game. I started out using serialization, but then realised two things.
1. Serialization is limited, I can't create relationships per se, and I cannot read data from multiple sections aka there are no joins in serialization.
2, I felt it would useful to learn another language other then Java and my game will require some form of storage. I opted for mysql because it is open source. It might not be the most suitable RDBMS but I am a newb to back end code.
The point of the snapshot, was to simply save the game at a specific point, such that, the game can be re-loaded when the Java event is triggered by clicking the "load game" button.
Now then, I already know how to backup and re-load a mysql database using mysqldump and as Dave pointed out, this is one strategy which has been used in commercial software before. BUT it surely isn't the most elegant solution. In terms of level of details, I want the detail to be comprehensive, so I am anticipating a large database.
Oh sure, it's a tiny ad, but under the right circumstances, it gets bigger.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|