recover crashed game state
Closed this issue · 1 comments
related to #248 ....
It seems game state is well-defined at any point in time, so a way to recover a crashed game would be nice. Not sure if this could be done through a JSON state file or the local DB, but the 'requirements' would be something like:
- set a 'save game state' option in game setup for the current game code
- could passcode protect if it's a public server
- be able to load last game state (current hands, awesome points, likes, turn order, and card czar) given a game code
- game creator can assign saved hands to current players to solve the issue of username differences and different number of players (new players would have a new hand dealt as normal)
While I appreciate the idea, I think this is probably an investment in the wrong direction: this offers a hack-y solution, but it's a real pain for users. The Postgres backend basically does this invisibly and automatically, so that would be the preferred way of ensuring consistency.
I get this could be used in other ways, but overall I think it would be a lot of work and generally not a great user experience. I'll close this now in favour of investing that development time in other, more user-friendly recovery options.
If you have other specific use cases that the postgres backend doesn't solve (e.g: game rollback of some kind), then I would suggest making issues for them and I think there might be better solutions.