MBS Xojo Developer Conference and Training
Join us from 11th to 14th September 2013 in Koblenz.
Join us from 11th to 14th September 2013 in Koblenz.
Platforms to show: All Mac Windows Linux Cross-Platform
GKMatchMBS class
class, GameKit,
MBS Real Studio MountainLion Plugin
(GameKit),
class GKMatchMBS,
Plugin version: 12.3, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.
Function: A GKMatch object provides a peer-to-peer connection between a group of players that are connected through Game Center.
Notes:
Matches provide both data and voice services. Your application never directly allocates GKMatch objects. Instead, your application uses the GKMatchmaker class to programmatically find a match with other interested players or a GKMatchmakerViewController object to display a user interface to the player.
After your application receives a match object, you must set a delegate and then wait until the other participants are connected to the match. You can read the expectedPlayerCount property to determine how many players have not connected to the match.
Your application transmits data to other players by calling either the sendDataToAllPlayers method or the sendDataToPlayer method. To transmit and receive voice data, call voiceChatWithName to create one or more voice channels.
When you are finished with the match, call the match's disconnect method.
Plugin version: 12.3, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.
Function: A GKMatch object provides a peer-to-peer connection between a group of players that are connected through Game Center.
Notes:
Matches provide both data and voice services. Your application never directly allocates GKMatch objects. Instead, your application uses the GKMatchmaker class to programmatically find a match with other interested players or a GKMatchmakerViewController object to display a user interface to the player.
After your application receives a match object, you must set a delegate and then wait until the other participants are connected to the match. You can read the expectedPlayerCount property to determine how many players have not connected to the match.
Your application transmits data to other players by calling either the sendDataToAllPlayers method or the sendDataToPlayer method. To transmit and receive voice data, call voiceChatWithName to create one or more voice channels.
When you are finished with the match, call the match's disconnect method.
- property Handle as Integer
- shared method Available as boolean
- method chooseBestHostPlayer(tag as variant = nil)
- method Constructor
- method disconnect
- method expectedPlayerCount as integer
- method playerIDs as string()
- method rematch(tag as variant = nil)
- method sendDataToAllPlayers(data as Dictionary, mode as integer, byref error as NSErrorMBS) as boolean
- method sendDataToPlayers(players() as string, data as Dictionary, mode as integer, byref error as NSErrorMBS) as boolean
- method voiceChatWithName(name as string) as GKVoiceChatMBS
- const GKMatchSendDataReliable = 0
- const GKMatchSendDataUnreliable = 1
- const GKPlayerStateConnected = 1
- const GKPlayerStateDisconnected = 2
- const GKPlayerStateUnknown = 0
This class has no sub classes.
Some methods using this class:
- GKMatchmakerMBS.addPlayersToMatch(match as GKMatchMBS, matchRequest as GKMatchRequestMBS, tag as variant = nil)
- GKMatchmakerMBS.finishMatchmakingForMatch(match as GKMatchMBS)
- GKMatchmakerViewControllerMBS.addPlayersToMatch(match as GKMatchMBS)
Some events for this class:
- GameKitMBS.addPlayersToMatchCompleted(MatchMaker as GKMatchmakerMBS, match as GKMatchMBS, matchRequest as GKMatchRequestMBS, error as NSErrorMBS, tag as variant)
- GameKitMBS.chooseBestHostPlayerCompleted(match as GKMatchMBS, playerID as string, tag as variant)
- GameKitMBS.findMatchForRequestCompleted(MatchMaker as GKMatchmakerMBS, request as GKMatchRequestMBS, match as GKMatchMBS, TurnBasedMatch as GKTurnBasedMatchMBS, error as NSErrorMBS, tag as variant)
- GameKitMBS.matchConnectionWithPlayerFailed(match as GKMatchMBS, playerID as string, error as NSErrorMBS)
- GameKitMBS.matchDidChangeState(match as GKMatchMBS, playerID as string, state as integer)
- GameKitMBS.matchDidFailWithError(match as GKMatchMBS, error as NSErrorMBS)
- GameKitMBS.matchDidReceiveData(match as GKMatchMBS, data as Dictionary, playerID as string)
- GameKitMBS.matchForInviteCompleted(Matchmaker as GKMatchmakerMBS, invite as GKInviteMBS, match as GKMatchMBS, error as NSErrorMBS, tag as variant)
- GameKitMBS.matchmakerViewControllerDidFindMatch(viewController as variant, match as GKMatchMBS)
- GameKitMBS.matchShouldReinvitePlayer(match as GKMatchMBS, playerID as string) as boolean
- GameKitMBS.rematchCompleted(TurnMatch as GKTurnBasedMatchMBS, match as GKMatchMBS, error as NSErrorMBS, tag as variant)
The items on this page are in the following plugins: MBS Real Studio MountainLion Plugin.
Links
MBS Xojo Chart Plugins