Imagine a multi player game for android which is turn based (multiplayer like ruzzle): The user should get invitation, accept, send finished game to other players, etc at any time, even if the game/activity is not open. Each game last more than a day.
At the I/O google mentioned that Google Play Game Services will support "turn based multiplayer" gaming experience as well. What do they mean by this?
When I was reading about it on developers website, I did not see "turn based" anywhere. Also the title of the page was:
Developing a Real-time Multiplayer Game in Android
Can what I need be accomplished using google play game services and an IntentService
? What would the drawback of this be compared to using GoogleCloudMessaging
?
Can I hook up onActivityResult
to an IntentService
so invitation, game messages, etc will be handled by the IntentService
if the game/activity is not running?
If I understand you correctly, you are thinking about developing an asynchronous game. This has been previously discussed here e.g.
https://stackoverflow.com/questions/17423461/example-of-google-play-service-for-creating-a-turn-by-turn-asynchronous-multip
Google Play Game Services is not well-suited to this type of game at the moment.
Of course, you can write your own intent service, but to make it work (e.g. maintaining "connections" between devices across power downs) you will effectively have to write your own version of Game Services.
Re. reconnecting to a room (assuming Google's back end has not "housekept" the room due to inactivity):
Google gaming services, obtain list of rooms
Today I read Google Play Services 4.1 and it looks promising. I wanted to share this with whoever stumbles upon this question.
Turn Based Multiplayer
Play Games now supports turn-based multiplayer! Developers can build asynchronous games to play with friends and auto-matched players, supporting 2-8 players per game. When players take turns, their turn data is uploaded to Play Services and shared with other players automatically.
TurnbasedMultiplayer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With