Game-Center-iconReady to invite your friends to play your latest game? You’re in luck!

Starting in Daily Build #1172, you can develop iOS games that take full advantage of turn-based multiplayer features in Game Center.

We’ve built all these features into the ‘gameNetwork’ library so whether you have existing code or new code, it’ll be a cinch to use.

There’s a full sample available: https://github.com/coronalabs/gameNetwork-iOS-turnbased-multiplayer.

Here’s a quick tour:

To invite players, you create a match with specific player id’s:

To auto-match players, you also create a match but you specify the number of players you want to match:

You can also mix and match, inviting some some players and then also auto match players to the same match:

When the request listener is fired, the events contain a property ‘event.type’ that takes on the following values:

  • invitationReceived
  • matchEnded
  • playerTurn

Perhaps the coolest thing is that notifications that tell you it’s your turn are automatic, so you don’t need to do anything!

Happy coding!

See the article here¬†–¬†

Corona weekly update: Turn-based multiplayer support