I've been developing a card game that uses the google play real time multiplayer api for allowing players to compete in card tournaments against one another. I've gotten to the latter stages of the development process but I recently came across an issue that I'd love to resolve soonest.
The tournaments consists of rounds, and if a player disconnects during a round, the others are notified through the onPeerLeft
method, and the round ends, with the remaining players moving to the next round. Simple enough, but in cases whereby a users network/wifi fluctuates or goes off (which is quite common in my country), the multiplayer room become non responsive for that player alone. Sometimes, it recovers, but some times, it doesn't and the game is just on hold (when it comes to that users turn).
The room doesn't disconnect the player, as mentioned in the comments on the first answer in this previous post: Detect if other player left unintentionally (e.g. internet disconnection) and reconnect - Google play real time multiplayer
So I have to make a hard decision of disconnecting a player automatically, if they don't make a move within 15 secs (apparently this is the time limit a player's network can go down before it no longer receives messages from that room when the network comes back online). But the google play games connection is P2P and I can't establish a server to time each user when it gets to their turn. Any help or direction concerning this dilemma would be much needed.