GameCenter Turn-Based Wedding

I have a question about step-by-step GameCenter functionality. The free version of the application will allow users to create a maximum of 3 matches at a time and block any attempt to create auto-negotiation or invite another player. My problem is this: that if a player who has no restrictions on creating matches invites another player who has reached this limit, the game will go through, and I don’t want to.

Is there any property that I can set to a player who has reached the match limit? I know that I can create a match and disconnect players if the conditions are not met, but this is also something that I really would like to avoid.

+3
source share
3 answers

Game Center . , , .

. , (, " " ) ). , Letterpress - 2 , "+" . 1 0 , .

Letterpress, , , - Game Center . Game Center Letterpress, , , Matchmaking .

, , GKLocalPlayerListener. player: didRequestMatchWithPlayers: , " ".

+3

, API Matchmaking Game Center , , . , , -, , Game Center , .

0

playerGroup .   , playerGroup .

GKMatchRequest *request = [[GKMatchRequest alloc] init];
request.minPlayers = 2;
request.maxPlayers = 4;
request.playerGroup = MyMap_Dark | MyRulesCaptureTheFlag;

playerGroup, , playerGroup, Game Center. . , playerGroup :

. , , , . , - , , .

Setting playerGroup to 0 or not setting it at all means that there is no group of players for this, so anyone can connect to anyone. Please also read this Game-Center guide https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/GameKit_Guide/ImplementingaTurn-BasedMatch/ImplementingaTurn-BasedMatch.html

Hope this helps you.

0
source

All Articles