guenis
guenis

Reputation: 2538

How to support multiple games in a gamecenter app

I'm implementing a bundle app consisting of several games. I want to add multiplayer support through gamecenter to each and every game, and right now I started implementing multiplayer for one of them which is going good. But every time I sent a request to a friend or automatch, it is paired up with another device who is using the same app not necessarily the same game in my app. A similar thing should apply to apps with different multiplayer modes (deathmatch, goal run etc) so I guess it is possible. How can I differentiate multiplayer requests of users in gamecenter?

Upvotes: 1

Views: 220

Answers (1)

Joachim Isaksson
Joachim Isaksson

Reputation: 180887

You can use GKMatchRequest's playerGroup property to match only against players using the same game mode (in your case, game).

If your game sets the playerGroup property, only players whose requests share the same playerGroup value are automatched by Game Center.

Upvotes: 3

Related Questions