Platforms to show: All Mac Windows Linux Cross-Platform

GKTurnBasedMatchMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The GKTurnBasedMatch class allows your game to implement turn-based matches between sets of players on Game Center.

A turn-based match uses a store-and-forward approach to share data between the participants. When a player participating in the match performs actions to advance the state of the match, your game uploads data to Game Center that defines the new state of the match and tells Game Center which player act next in the match. Later, when the next player launches your game, it downloads the match data from Game Center and continues the match. Players continue to take turns acting (based on whatever internal logic your game implements) until the match ends. A key advantage of turn-based matches is that a player may participate in multiple matches simultaneously.

see also
https://developer.apple.com/library/mac/#documentation/GameKit/Reference/GKTurnBasedMatch_Ref/Reference/Reference.html

Constants

Constant Value Description
GKTurnBasedMatchStatusEnded 2 One of the states a match can enter. The match has been completed.
GKTurnBasedMatchStatusMatching 3 One of the states a match can enter. The match is currently being played.
GKTurnBasedMatchStatusOpen 1 One of the states a match can enter. Game Center is still searching for other players to join the match.
GKTurnBasedMatchStatusUnknown 0 One of the states a match can enter. The match is in an unexpected state.
GKTurnBasedParticipantStatusActive 4 One of the states the participant is in during the match. The participant has joined the match and is an active player in it.
GKTurnBasedParticipantStatusDeclined 2 One of the states the participant is in during the match. The participant declined the invitation to join the match. When any participant declines an invitation to join a match, the match is automatically terminated.
GKTurnBasedParticipantStatusDone 5 One of the states the participant is in during the match. The participant has exited the match. Your game sets the matchOutcome property to state why the participant left the match.
GKTurnBasedParticipantStatusInvited 1 One of the states the participant is in during the match. The participant was invited to the match, but has not responded to the invitation.
GKTurnBasedParticipantStatusMatching 3 One of the states the participant is in during the match. The participant is an unfilled position in the match that Game Center promises to fill when needed. When your game sets this participant as the current participant in the match, Game Center fills the position and updates the status and playerID properties.
GKTurnBasedParticipantStatusUnknown 0 One of the states the participant is in during the match. The participant is in an unexpected state.

This class has no sub classes.

Some events using this class:

Xojo Developer Magazine


The items on this page are in the following plugins: MBS MacFrameworks Plugin.


GKTurnBasedMatchmakerViewControllerMBS   -   GKTurnBasedParticipantMBS


The biggest plugin in space...