issues
search
TruncateGame
/
Truncate
67
stars
5
forks
source link
Improve handling of network drops in daily puzzles
#274
Closed
bglw
closed
3 months ago
bglw
commented
4 months ago
Sequence of operations:
Playing daily puzzle, sending moves to server
Each move receives the current "daily stats" from the server
Connection dies (network change, etc)
Sending moves to server silently fails
Win the game, which opens up the splash screen with the most recent "daily stats" (from a few turns ago)
Does not show the win
Click replay, new attempt is tracked as of whenever connection comes back
High level fixes:
[x] Stop requesting / storing the daily stats ahead of time
[x] At the end of the game require that all moves are synced to the server (wait for successful response)
[x] Show some kind of loading screen / spinner until this comes back
[x] Only request daily stats when pulling up splash screen
[x] Likewise, show some loading spinner while waiting for the latest stats
[x] Make the loading text fit better
[x] Add nonces to all outgoing messages
[x] Send acknowledgements from the server
[x] Store messages in a new queue for "unacknowledged"
[x] Remove from this queue on ack
[x] On a new ws connection setup, re-send all unacknowledged messages
Sequence of operations:
High level fixes: