-1

I have an idea for a multiplayer game which I want to develop for android, except I have no idea how to make multiplayer games.

My problem is I don't know how to network the game, ie. stuff like matchmaking.

I've designed the game (in my head) to be much like "draw something", so player one takes a turn, that data is sent to player two, player two takes his turn...

1) Do I need a server with a database with tables of users and sessions/games?

I've been looking at Google Play Games Services, some places say it supports matchmaking, some places don't mention it. I've also looked at Google Cloud Messaging. Would that be of any use?

Thanks in advance!

dlee
  • 78
  • 9
  • GCM can definitely be of use, if you plan an asynchronous game like this. It will reduce your server load, because your clients don't have to query the server periodically. – tilpner Sep 14 '13 at 16:30
  • So I'll definitely need a server of my own? – dlee Sep 14 '13 at 16:39
  • If you don't want your users to have to know each others IP's (given they have a unique IP, no NAT), you'll need a third party for sure. If this is a paid hoster like [this](http://www.skiller-games.com/developers.aspx), or the [Google App Engine](https://developers.google.com/appengine/). The GAE is free below a certain limit, and possibly you make enough money to pay Google once you exceed their limit... Notice that I don't know about Google Play Game Services, which would also be a *third party*! – tilpner Sep 14 '13 at 16:45
  • Though [this](https://developers.google.com/games/services/common/concepts/realtimeMultiplayer) site really looks like they do the hosting for you... – tilpner Sep 14 '13 at 16:48
  • What should happen if one user finishes his turn, but the other app is not running? Is this not planned to happen? Will it *end* the game? Or will you *store* the turn on a server to later resend it? – tilpner Sep 14 '13 at 16:52
  • I guess this is where push messages come in. I wouldn't want both players to be forced into keeping the app open and waiting for the other player to take their turn, I think it'd be better if player 1 takes a turn, then whatever p2 is doing on their phone, they'd get a notification saying "Your turn" or something. Also I want to avoid skiller, I've read some bad things! – dlee Sep 14 '13 at 16:59
  • So, then P1 finishes his turn, P2 is offline. P1 pushes his turn to P2. P2 doesn't respond. P1 waits and pushes periodically. P1's battery runs out. You save the turn to disk? Is the game *lost/ended*? I think a server *inbetween* is more robust... – tilpner Sep 14 '13 at 17:25
  • I think for coordination (ie IPs/userIDs/matchIDs) I'll always need an inbetween, but couldn't the message pushed to player 2 be stored locally by player 2 until they take a turn and the notification stay there until they either take a turn or give up? – dlee Sep 14 '13 at 17:32
  • In my opinion Google Play Game Services are not suited that well for async. games as well, because all message types (reliable/unreliable/stream) require both clients to be online. You should really have a look at Google App Engine... – tilpner Sep 14 '13 at 17:43

1 Answers1

1

You can easily make turn based game by using Google Cloud Messaging in your android application to get Push Notification , that shows the status game.

  1. I have used this link to make my first turn Base game on android turn base sample
  2. This sample uses Push Notification to notify users about game status.