Skip to main content

mergGK

Type

library

Description

mergGK is an iOS external that adds GameKit/Game Center commands and functions to LiveCode. The Game Center Programming Guide contains additional useful information.

Associated Syntax

Function

NameSummarySyntax
mergGKIsGameCenterAvailablemergGKIsGameCenterAvailable()
mergGKGetPeersGet a list of peers with specified connection statemergGKGetPeers(<pConnectionState>)
mergGKDisplayNameForPeerGet the display name for a peermergGKDisplayNameForPeer(<pPeer>)

Command

NameSummarySyntax
mergGKAuthenticateLocalPlayerAuthenticate the local playermergGKAuthenticateLocalPlayer
mergGKLoadFriendsRequest a list of the local player's friendsmergGKLoadFriends
mergGKLoadPlayersRequest the details of a list of playersmergGKLoadPlayers <pPlayerIDs>
mergGKPostScoreYour game should create the score object and report the score to Game Center immediately after the score is earned mergGKPostScore <pCategory>, <pScore>, [<pSetDefaultLeaderboard>], [<pContext>]
mergGKShowLeaderboardPresent the Game Center leaderboad modal dialogmergGKShowLeaderboard <pCategory>, [<pTimeScope>]
mergGKLoadScoresGet a leaderboard of scoresmergGKLoadScores <pCategory>, [<pTimeScope>], [<pPlayerScope>], [<pFrom>], [<pTo>], [<pPlayerIDs>]
mergGKPostAchievementYour game should report progress to Game Center whenever the player makes progress towards completing an achievement mergGKPostAchievement <pAchievement>, <pPercentComplete>, [<pShowBanner>]
mergGKShowAchievementsPresent the Game Center achievement modal dialogmergGKShowAchievements
mergGKLoadAchievementsGet the local player's achievementsmergGKLoadAchievements
mergGKLoadChallengesAchievements and leaderboards both allow players to measure their progress playing your game mergGKLoadChallenges
mergGKShowBannerAllows your game to display a notification banner that displays text to the player mergGKShowBanner <pTitle>, <pMessage>
mergGKStartPeerRegister as a peer in the GameKit peer-to-peer sessionmergGKStartPeer
mergGKSendToPeersSend data to other peersmergGKSendToPeers <pPeers>, <pData>
mergGKSendToAllPeersSend data to all peersmergGKSendToAllPeers <pData>
mergGKConnectToPeerConnect to a peermergGKConnectToPeer <pPeer>
mergGKStopPeerStop the peer-to-peer sessionmergGKStopPeer

Message

NameSummarySyntax
mergGKLocalPlayerAuthenticatedSent to the control that called mergGKAuthenticateLocalPlayer whenever a new local player is authenticated mergGKLocalPlayerAuthenticated <pPlayerID>, <pPlayerAlias>, <pPlayerDisplayName>, <pPlayerUnderAge>
mergGKFriendsSent to the control that called mergGKGetFriendsmergGKFriends <pLocalPlayerFriendIDs>
mergGKPlayersSent to the control that called mergGKGetPlayersmergGKPlayers <pPlayers>
mergGKScoresSent to the control that called mergGKGetScoresmergGKScores <pScores>
mergGKAchievementsSent to the control that called mergGKLoadAchievementsmergGKAchievements <pAchievements>
mergGKChallengesSent to the control that called mergGKLoadChallengesmergGKChallenges <pScoreChallenges>, <pAchievementChallenges>
mergGKScoreChallengeSent when the player clicks on a Game Center banner to select a score challenge mergGKScoreChallenge <pIssuingPlayerID>, <pIssueDate>, <pCategoryID>, <pValue>, <pContext>
mergGKAchievementChallengeSent when the player clicks on a Game Center banner to select a score challenge mergGKAchievementChallenge <pIssuingPlayerID>, <pIssueDate>, <pAchievementID>, <pPercentComplete>
mergGKBannerShownSent to the object that requested the banner be shown after it is shownmergGKBannerShown
mergGKDataReceivedSent to the control that called mergGKStartPeer when a peer sends some data mergGKDataReceived <pPeerID>, <pData>
mergGKPeerChangedStateSent to the control that called mergGKStartPeer when a peer changes state mergGKPeerChangedState <pPeerID>, <pState>
mergGKConnectionWithPeerFailedSent to the control that called mergGKStartPeer when a connection to a peer fails mergGKConnectionWithPeerFailed <pPeerID>, <pError>
mergGKSessionFailedSent to the control that called mergGKStartPeer when a session failsmergGKSessionFailed <pError>
Thank you for your feedback!

Was this page helpful?