+91 9591117915 info@pixtell.net

Muliplayer player count

Pixtell Labs Android, gamedev, ios Muliplayer player count
Muliplayer player count

Android gamedev ios

Muliplayer player count

Posted By Kirti P

Player count , the holy grail of all Multiplayer online matches for Turn-based and Realtime Games has a few gotcha’s when it comes to Google Game Services ( GPG ) and Apple Game Center.

Before we go into details , some abbreviations i cooked up to make it cleaner to read ūüėČ

GPG – GooglePlayGame Services
GC – Game Center
TB – Turnbased Match
RT – Realtime Match
minPlayers Рthe minimum player count to kickstart a match
maxPlayers Рthe maximum players allowed for a match
API – just a sample , please see the GPG and GC documentation online

For example lets create a match



TB.CreateMatch(minPlayers,maxPlayers); Does not count the player calling the API Counts the player calling the API
RT.CreateMatch(minPlayers,maxPlayers); Does not count the player calling the API Counts the player calling the API

As you can see the two API’s from Google and Apple do the same thing but can actually trip you if not careful!! The problem is that if you pass in for example

You are in for a treat..

GPG would go ahead and create a 2 player match ( does not count you ) , while Game Center would silently fail ( you cant play with yourself naughty boy , we control everything ūüėĬ†) or in our case saw the matchmaker dialog do a fancy appear and hide . ¬†I was in for a surprise because i had experience creating TB and RT matches for GPG but GC was my first attempt.

So the right way for a 2 player match for GC would be

Spent several hours trying to figure out what was going on¬†and turned out¬†to be the player count dilemma that the 2 API’s have . Not sure who is correct , but surely can¬†trip you.

p.s: There are other API’s in GC that fetch the players in a game excluding current player. Be wary¬†of them¬†too ;).

Hope this post helps the brave souls getting into Multiplayer using Google Play or Game Center services.

Tagged ,

Leave a Reply

Your email address will not be published. Required fields are marked *