Do you know how the GKMatchmakerViewController handles a decline from a player (friend) who was listed in the "request.recipient" array?
Does Game Center then automatically hunt for some random player or does the match request fail?
Do you know how the GKMatchmakerViewController handles a decline from a player (friend) who was listed in the "request.recipient" array?
Does Game Center then automatically hunt for some random player or does the match request fail?
I believe I found my answer in the Game Center Programming Guide under "Real Time Matches" (see below),
I guess a "match" will be returned after calling "findMatchForRequest" and I can then check whether the "match.expectedPlayerCount == 0" . If not zero then I guess I know some players provided in the "request.recipient" array did not accept the invitation. I can then either invite more friends (ie: call addPlayersToMatch and providing a new request.recipient array) or simply fill in the empty slots with random players (ie: call addPlayersToMatch but do not provide any request.recipient array information)
GAME CENTER PROGRAMMING GUIDE (REAL-TIME MATCH)
Because some of the invitations may not be accepted, it is possible you may receive a match that still needs more players. With this in mind, your custom user interface should implement the following behavior:
findMatchForRequest:withCompletionHandler:
method. Wait for the match to be returned (or cancel the request if the player cancels the invitations).addPlayersToMatch:matchRequest:completionHandler:
method instead.addPlayersToMatch:matchRequest:completionHandler:
method to fill the remaining slots. You must wait until all invited players have connected as all pending match requests are cancelled when automatching the remaining player slots.finishMatchmakingForMatch:
method to end matchmaking entirely.If you want to create a match that contains both invited players and automatched players, you must first create the match with the invited players. After all invited players have connected, you can then add players through automatching.
I believe I found my answer in the Game Center Programming Guide under "Real Time Matches" (see below),
I guess a "match" will be returned after calling "findMatchForRequest" and I can then check whether the "match.expectedPlayerCount == 0" . If not zero then I guess I know some players provided in the "request.recipient" array did not accept the invitation. I can then either invite more friends (ie: call addPlayersToMatch and providing a new request.recipient array) or simply fill in the empty slots with random players (ie: call addPlayersToMatch but do not provide any request.recipient array information)
GAME CENTER PROGRAMMING GUIDE (REAL-TIME MATCH)
Because some of the invitations may not be accepted, it is possible you may receive a match that still needs more players. With this in mind, your custom user interface should implement the following behavior:
findMatchForRequest:withCompletionHandler:
method. Wait for the match to be returned (or cancel the request if the player cancels the invitations).addPlayersToMatch:matchRequest:completionHandler:
method instead.addPlayersToMatch:matchRequest:completionHandler:
method to fill the remaining slots. You must wait until all invited players have connected as all pending match requests are cancelled when automatching the remaining player slots.finishMatchmakingForMatch:
method to end matchmaking entirely.If you want to create a match that contains both invited players and automatched players, you must first create the match with the invited players. After all invited players have connected, you can then add players through automatching.
I recommend you experiment with Game Center by simply downloading the app "Go Game Connect" and trying it. The local WiFi system is a roll-your-own match system that does not use Game Center. The Game Center system will allow you to experiment with various choices and see the view controllers.