jpGameCenter

jpGameCenter

Apple's social gaming network.
Version : 1.4
Prix : $50
Etat : Épuisétvosipadiphone

Téléchargements

Liste des modifications

v1.4

  • range min and max are now optional in function jpGameCenter.retrieveScores.

v1.3

Added the following functions:

  • nValue = jpGameCenter.getRetrievedLocalPlayerScoreValue ( )
  • nRank = jpGameCenter.getRetrievedLocalPlayerScoreRank ( )
  • sFormattedValue = jpGameCenter.getRetrievedLocalPlayerScoreFormattedValue ( )
  • sDate = jpGameCenter.getRetrievedLocalPlayerScoreDate ( sFormat )

v1.2

  • Improved backward compatibility with iOS6

v1.1

  • Optimized for ShiVa 1.9.2

API

--jpGameCenter API jpGameCenter.activate ( sUserToken, sActivationKey ) --Banner jpGameCenter.showBanner ( sTitle, sMessage ) "onGameCenterBannerDismissed" ( ) --Authenticate local player jpGameCenter.authenticateLocalPlayer ( ) "onGameCenterAuthenticateLocalPlayerFailed" ( sError ) "onGameCenterAuthenticateLocalPlayerSucceed" ( ) bYes = jpGameCenter.isLocalPlayerAuthenticated ( ) --STARTING FROM HERE, THE PLAYER AUTHENTICATION IS REQUIRED -- Game Center UI jpGameCenter.showGameCenter ( ) "onGameCenterInterfaceDismissed" ( ) jpGameCenter.showAchievements ( ) "onGameCenterInterfaceDismissed" ( ) jpGameCenter.showLeaderboard ( sLeaderboardIdentifier, kTimeScope ) "onGameCenterInterfaceDismissed" ( ) -- Local player and friends sPlayerIdentifier = jpGameCenter.getLocalPlayerIdentifier ( ) bYes = jpGameCenter.isLocalPlayerUnderAge ( ) jpGameCenter.loadLocalPlayerFriends ( ) "onGameCenterLoadLocalPlayerFriendsFailed" ( sError ) "onGameCenterLoadLocalPlayerFriendsSucceed" ( ) -- When "onGameCenterLoadLocalPlayerFriendsSucceed" is called, you can use the following functions: tPlayersIdentifier = jpGameCenter.getLocalPlayerFriends ( ) sDisplayName = jpGameCenter.getPlayerDisplayName ( sPlayerIdentifier ) sAlias = jpGameCenter.getPlayerAlias ( sPlayerIdentifier ) bYes = jpGameCenter.isPlayerFriend ( sPlayerIdentifier ) jpGameCenter.inviteFriends ( tPlayersIdentifiers ) "onGameCenterInviteFriendsDidFinish" ( ) -- Leaderboards and scores jpGameCenter.loadLeaderboardInfo ( ) "onGameCenterLoadLeaderboardInfoFailed" ( sError ) "onGameCenterLoadLeaderboardInfoSucceed" ( ) -- When "onGameCenterLoadLeaderboardInfoSucceed" is called, you can use the following functions: nCount = jpGameCenter.getLeaderboardCount ( ) sLeaderboardIdentifier = jpGameCenter.getLeaderboardIdentifierAt ( nIndex ) sLeaderboardGroupIdentifier = jpGameCenter.getLeaderboardGroupIdentifier ( sLeaderboardIdentifier ) sTitle = jpGameCenter.getLeaderboardTitle ( sLeaderboardIdentifier ) jpGameCenter.reportScore ( nScore, sLeaderboardIdentifier ) "onGameCenterReportScoreFailed" ( sError ) "onGameCenterReportScoreSucceed" ( ) jpGameCenter.retrieveScores ( sLeaderboardIdentifier, kPlayerScope, kTimeScope, nOptRangeMin, nOptRangeMax ) "onGameCenterRetrieveScoresFailed" ( sError ) "onGameCenterRetrieveScoresSucceed" ( ) -- When "onGameCenterRetrieveScoresSucceed" is called, you can use the following functions: nCount = jpGameCenter.getRetrievedScoresCount ( ) sPlayerIdentifier = jpGameCenter.getRetrievedScoresPlayerIdentifierAt ( nIndex ) nValue = jpGameCenter.getRetrievedScoresValueAt ( nIndex ) nRank = jpGameCenter.getRetrievedScoresRankAt ( nIndex ) sFormattedValue = jpGameCenter.getRetrievedScoresFormattedValueAt ( nIndex ) sDate = jpGameCenter.getRetrievedScoresDateAt ( nIndex, sFormat ) nValue = jpGameCenter.getRetrievedLocalPlayerScoreValue ( ) nRank = jpGameCenter.getRetrievedLocalPlayerScoreRank ( ) sFormattedValue = jpGameCenter.getRetrievedLocalPlayerScoreFormattedValue ( ) sDate = jpGameCenter.getRetrievedLocalPlayerScoreDate ( sFormat ) -- Achievements jpGameCenter.loadAchievements ( ) "onGameCenterLoadAchievementsFailed" ( sError ) "onGameCenterLoadAchievementsSucceed" ( ) -- When "onGameCenterLoadAchievementsSucceed" is called, you can use the following functions: nCount = jpGameCenter.getAchievementCount ( ) sAchievementIdentifier = jpGameCenter.getAchievementIdentifierAt ( nIndex ) nPercentComplete = jpGameCenter.getAchievementPercentComplete ( sAchievementIdentifier ) jpGameCenter.reportAchievement ( sAchievementIdentifier, nPercentComplete ) "onGameCenterReportAchievementFailed" ( sError ) "onGameCenterReportAchievementSucceed" ( ) jpGameCenter.reportMultipleAchievements ( tIdentifiers, tPercentsComplete ) "onGameCenterReportMultipleAchievementsFailed" ( sError ) "onGameCenterReportMultipleAchievementsSucceed" ( ) jpGameCenter.resetAchievements ( ) "onGameCenterResetAchievementsFailed" ( sError ) "onGameCenterResetAchievementsSucceed" ( ) jpGameCenter.retrieveAchievementsMetadata ( ) "onGameCenterRetrieveAchievementsMetadataFailed" ( sError ) "onGameCenterRetrieveAchievementsMetadataSucceed" ( ) -- When "onGameCenterRetrieveAchievementsMetadataSucceed" is called, you can use the following functions: sTitle = jpGameCenter.getAchievementTitle ( sAchievementIdentifier ) sAchievedDescription = jpGameCenter.getAchievementAchievedDescription ( sAchievementIdentifier ) sUnachievedDescription = jpGameCenter.getAchievementUnachievedDescription ( sAchievementIdentifier ) nMaximumPoints = jpGameCenter.getAchievementMaximumPoints ( sAchievementIdentifier ) bYes = jpGameCenter.isAchievementReplayable ( sAchievementIdentifier ) bYes = jpGameCenter.isAchievementHidden ( sAchievementIdentifier ) sAchievementGroupIdentifier = jpGameCenter.getAchievementGroupIdentifier ( sAchievementIdentifier ) -- Constants jpGameCenter.kPlayerScopeGlobal jpGameCenter.kPlayerScopeFriendsOnly jpGameCenter.kTimeScopeAllTime jpGameCenter.kTimeScopeToday jpGameCenter.kTimeScopeWeek

Description

Game Center is an online multiplayer social gaming network released by Apple. It allows users to invite friends to play a game, track their achievements, and compare their high scores on a leader board.

Information about the plugin

  • Work on iPhone, iPad and iOS simulator.
  • You can report scores and achievements
  • You can display the Game Center interface
  • You can get information about the local player
  • You can get the friend list of the local player and their information
  • You can retrieve the leaderboards scores with several parameters (playerScope, timeScope, range, ...) and get information about each score (player, rank, score, date, ...)
  • You can retrieve the achievements the local player has unlocked or partially unlocked and get informations about these achievements (replayable, title, descriptions, ...)

Requirements

  • The jpEventQueue plugin is required (free)
  • The jpTools plugin is required (free)