Quentamia
Quentamia

Reputation: 3294

GKTurnBasedMatch ignores playerAttributes

When I create the following GKRequest object to create a turn based game:

GKMatchRequest *gameRequest = [[GKMatchRequest alloc] init];
gameRequest.minPlayers = 2;
gameRequest.maxPlayers = 2;
gameRequest.playerAttributes = MY_ROLE_1;

This request should not be matched with another request with the same playerAttributes, but it is. Does anyone know if playerAttributes are ignored for turn based games?

Upvotes: 2

Views: 145

Answers (1)

Quentamia
Quentamia

Reputation: 3294

According to this page: http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/MatchmakingwithGameCenter/MatchmakingwithGameCenter.html#//apple_ref/doc/uid/TP40008304-CH12-SW6

Your game defines a complete set of roles; all roles defined by your game must be filled by the time the match is created. This means there is a careful coordination between the roles that you define and the number of players allowed in the match. Thus, player attributes require additional design and testing effort.

Turn based games can be created with empty seats and players are found when it is their turn. If the above statement is true, then playerAttributes are ignored for turn based games because they can't all be filled by the time the match is created otherwise.

Upvotes: 1

Related Questions