3
\$\begingroup\$

I'm designing a multiplayer turn-based game for Android (over 3g). I'm thinking the clients will send data to a central server over a socket or http, and receive data via GCM push messaging. I'd like to know if anyone has practical experience with GCM for pushing 'real-time' turn data to game clients. What kind of performance and limitations does it have?

I'm also considering using a RESTful approach with GAE or Amazon EC2. Any advice about these approaches is appreciated.

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

I'm thinking the clients will send data to a central server over a socket or http, and receive data via GCM push messaging.

GCM push messaging strategy isn't appropriate for sending large amounts of data, for a few reasons:

  • Rate limits are in place to prevent malicious or poorly coded apps from spamming an individual device with messages.
  • Messages aren't guaranteed to arrive in-order.
  • Messages aren't guaranteed to arrive as fast as you send them out. Even if the device receives one GCM message a second, at a max of 1K, that's 8kbps, or about the speed of home dial-up internet in the early 1990's. Your app rating on Google Play will reflect having done that to your users.

I'm also considering using a RESTful approach with GAE or Amazon EC2.

Yes, it is good approach to use Cloud for turn-based mobile multiplayer server.

There are couple of ways to do multiplayer game:

  • Multiplayer on the same device: Make multiplayer logic for your game and allow multi touch controller for both players on the same screen. It can be turn based or simultaneous. For this game you do not have any dependency but the players should be near each other.
  • Bluetooth game: This the next stage of multiplayer games. A little bit trickier but can be done. The controller need to get and synchronize the game between two devices that are near each other. A short review of the Bluetooth android API and you are good to go.
  • Score comparison: This is not a real multiplayer but you can upload scores of the users and compare with other users. You can do it yourself with server side that will store all the scores for each user or use existing services that allow score comparison like Skiller SDK or scorelop SDK.
  • Real multiplayer games: This is the best one from my opinion. Everybody can play with everybody else in real time (as far as latency allows :D). This one is pretty difficult, if you want to do all by yourself. Here you will need a strong server side and a lot of server logic. But again you can use existing services that handle the server side for you. I went with the Skiller multiplayer SDK. Good support and monetization features.

If you want to create turn-based mobile multiplayer server, the follwoing resources may help you

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .