I am working on a game that has six "game modes". What that means is, when playing there are different rules established for the way the game is played. All the game modes are intended for multiplayer gaming.
For example,
One mode is a timed race between 2 players.
Another mode is not timed; instead you are trying to score the highest score possible with a certain number of moves.
Let's call these "Time Battle" and "Move Battle"
My problem is this. I have the game set up for Multiplayer using the Game Center. I am able to find a match right now using
- (void)findMatchWithMinPlayers:(int)minPlayers maxPlayers:(int)maxPlayers viewController:(UIViewController *)viewController delegate:(id<GameKitHelperDelegate>)delegate;
But how would I go about searching and matching players dependent on the game mode they want to play? Is there any way to add another parameter so if the player selects "Time Battle" it will match him/her to someone else looking for "Time Battle"?
Look at GKMatchRequest documentation and in particular at playerGroup instance property “If your game sets the playerGroup property, only players whose requests share the same playerGroup value are automatched by Game Center. Setting the playerGroup property to 0 allows the player to be matched into any waiting match. Set the playerGroup property to a nonzero number to match the player only with players whose match request shares the same player group number. The value of a player group is arbitrary. For example, you could define different playerGroup values to implement any of the following filters: - A game could restrict players based on skill level. - etc.”