Hi, I'm hoping there is something documentation wise that I'm just missing, but let's say a player puts their computer to sleep with the game open, other players take their turns overnight and then the player wakes their computer the next day.
How can I tell that the player is out-of-sync with the game, and once I know that, can I force reload the game for them, or do they have to refresh?
Off the top of my head, I thought the simplest would be to keep a lock-step variable that I check - server is on step 30 and client is on step 20-return an error that they need to refresh. I also thought maybe that's what the game progression could do (if it deals with fractions so 28.53% vs 28.59% since a 100 steps probably isn't going to be enough). Ideally too, instead of checking it with every move, maybe I run a special check when the message "you are connected" appears (if there is a hook into that?)?
What's the best practice for it? Thanks!
How can I tell that the player is out-of-sync with the game, and once I know that, can I force reload the game for them, or do they have to refresh?
Off the top of my head, I thought the simplest would be to keep a lock-step variable that I check - server is on step 30 and client is on step 20-return an error that they need to refresh. I also thought maybe that's what the game progression could do (if it deals with fractions so 28.53% vs 28.59% since a 100 steps probably isn't going to be enough). Ideally too, instead of checking it with every move, maybe I run a special check when the message "you are connected" appears (if there is a hook into that?)?
What's the best practice for it? Thanks!