Note that there are some explanatory texts on larger screens.

plurals
  1. PODefault number of players in a turn-based game? (OS X)
    primarykey
    data
    text
    <h2>Q: How do we set the default number of players?</h2> <hr> <h3><strong>Let's create a GKTurnBasedMatchmakerViewController with a match request:</strong></h3> <pre><code>GKMatchRequest *request = [GKMatchRequest new]; request.minPlayers = 2; request.maxPlayers = [GKMatchRequest maxPlayersAllowedForMatchOfType:GKMatchTypeTurnBased]; request.defaultNumberOfPlayers = 2; GKTurnBasedMatchmakerViewController *controller = [GKTurnBasedMatchmakerViewController.alloc initWithMatchRequest:request]; controller.turnBasedMatchmakerDelegate = self; [GKDialogController sharedDialogController].parentWindow = self.view.window; [[GKDialogController sharedDialogController]presentViewController:controller]; </code></pre> <h2><strong>Expected: 2 default players</strong></h2> <p><img src="https://i.stack.imgur.com/r9gUv.jpg" alt="Expected"></p> <h2><strong>Actual: 16 default players</strong></h2> <p><img src="https://i.stack.imgur.com/FQ2ge.jpg" alt="Actual"></p> <h1><strong>GKMatchRequest Class Reference</strong></h1> <p>A GKMatchRequest object is used to specify the parameters for a new live or turn-based match. You initialize a match request object, then pass it to another object to actually create the match. The kind of object you pass it to depends on which kind of match you want and whether you want to display the standard matchmaking user interface.</p> <p><a href="https://developer.apple.com/library/mac/#documentation/GameKit/Reference/GKMatchRequest_Ref/Reference/Reference.html" rel="nofollow noreferrer">https://developer.apple.com/library/mac/#documentation/GameKit/Reference/GKMatchRequest_Ref/Reference/Reference.html</a></p> <pre><code>@property(nonatomic, assign) NSUInteger defaultNumberOfPlayers </code></pre> <p>The default number of players for the match.</p> <p>If this property is not set, then the default number of players is equal to the value stored in the maxPlayers property. The default number of players determines the number of invitees shown in the standard matchmaking user interface. The player can choose to override this to add or remove slots.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload