GameCircle has provided an Adobe Native Extension (ANE) since its first release, making it possible for mobile developers to create GameCircle-enabled games using Adobe AIR.
That ANE has now been updated to support features and improvements introduced in the latest version of GameCircle, including:
- Expanded coverage for Android, Kindle Fire, Fire TV and Fire phone devices
- The latest version of Whispersync for Games
- Support for UI string localization and other UI improvements
- Social APIs
- Analytics on player achievements
- Consistent Security Profiles and API Keys
Compatible with Flash Professional and Flash Builder 4.7, the GameCircle ANE can be used with the Adobe AIR SDK version 4.0 or higher.
The new GameCircle ANE is bundled in the Amazon Mobile App SDK. For more information, see the GameCircle 2.4 for Adobe Air documentation.
How to Upgrade
If you’re updating from the GameCircle ANE version 1.0 to 2.4, here’s a brief step by step. See the full documentation for additional help.
Step 1: Update the ANE File
Replace your local com.amazon.extensions.GameCircle.ane file with the latest version from the Amazon Mobile App SDK.
Step 2: Set the API Key
When building with the extension and targeting Android, you'll need to include a file named api_key.txt in the assets subfolder of your package. The contents of the file should be your project’s API Key.
Step 3: Change the Application Descriptor
Make sure that you are using the AIR 3.5 SDK or higher (set this in your application descriptor file, application.xml), include the extension in the app descriptor file, and add your GameCircle-specific data to the <android>/<manifestAdditions> element, as appropriate. For a working example, see example-src/app.xml.
Step 4: Update API Calls
Update your code to reflect these changes in the GameCircle API:
- The method create() no longer takes any parameters.
- The method submitAchievement() is now updateAchievementProgress().
- The method loadScores() no longer takes the parameters startRank and scoreCount.
- The GameCircleEvent class now has subclasses specific to each API call.
- The data type of all score-related values has changed from int to number. This includes GameCircleScore scoreValue; SubmitScoreCompleted score, newAllTimeScore, newDailyScore, and newWeeklyScore; GameCirclePercentile score; and LoadLocalPlayerScoreCompleted score.
Step 5: Update Whispersync for Games Event Handling
In version 1 of the AIR extension, when using the Whispersync SharedObject, you handled conflict resolution with the whisperSyncRevert() and whisperSyncSynchronizeProgress() methods. In version 2, progress syncs automatically in the background, and conflict resolution has been simplified. If you‘re working with Whispersync SharedObject, follow the instructions on how to use the SharedObject with Whispersync.
Step 6: Add New API Functionality
The new version includes these new methods:
- showSignIn() displays the GameCircle sign-in page.
- loadLocalPlayer() gets the current player’s GameCircle profile.
- showLeaderboards() displays the GameCircle overlay showing all leaderboards for a game.
- loadAchievement() gets data for a single achievement.
- loadPercentiles() gets percentile ranks for a leaderboard.
For More Information
There has been a lot of interest in an ANE supporting all the latest GameCircle features, and this update makes it that much easier to take advantage of them in games you create with Adobe AIR. See the online documentation for more information about the update, or explore the examples included in the Amazon Mobile SDK.