Reputation:
I would like to allow users who have already joined a match to agree on what level of my game to play the match on before anyone takes a turn. The process would look like this:
User selects opponents using Google Play Games default UI.
Once all users have joined the match, provide them with a UI that allows any of them to suggest a level to play on.
Once a user suggests a level, all other users agree or suggest a different one.
Once all users have agreed on a level, the actual match starts and a user takes the first turn.
Now, in order to implement the level selection UI, I have to somehow notify the other users when a user has made a suggestion. The only API call I see that can send data is the takeTurn()
method call. How can I allow any client to send data to the other clients at any time without waiting for its turn?
If I can't do this at all with Google Play Games turn based APIs, what other options should I look at?
Upvotes: 0
Views: 93
Reputation: 4572
In turn based multiplayer, the first player takes the first turn before the other players get access to the game. So the easiest way to solve your problem is to have each player call takeTurn to vote on the game level (either propose a new level or accept the proposed level). Once a level is agreed upon, then present the actual game to the players and play accordingly.
Upvotes: 1