Question

Currently once the client has been interrupted by phone calls or home button has been pressed by the user, the client will be disconnected.

p.s. I am implementing google play game service real time multiplayer in a real time but turn based game, for example, pokers, worms. These are real time games but did not need the players response or inside in the whole game because it is turn-based. The turn-based api does not suit this situation since the same reason said before.

Is there any way to let the player reconnect to the room which has not been over yet after being interrupted?

Was it helpful?

Solution

If you are using Google Play Services, it is NOT possible for a player to re-enter a room after being disconnected.

From https://developers.google.com/games/services/common/concepts/realtimeMultiplayer#4_participant_connection_phase:

  1. Gameplay phase

Once the required number of participants for a game have been connected, your app can start a gameplay session. After all participants have joined a game and the room is "full", players can leave your game, but no other players can join; not even to fill a spot that another player has vacated.

OTHER TIPS

You can record the information of all the players in the game (IMEI,IMSI ,UID) by server. When a user get connected to the server,the server should check whether the user is a new one or a reconnect one.If it is figured out the user is a reconnected player,just return the information of the player in this game(level,weapons,enemyś data and so one).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top