Amazon GameCircle



Amazon's official extension to cocos2d-x allowing you to quickly set up leaderboards, achievements, and Whispersync for Games.


Amazon offers an extension to the open source Cocos2d-x game engine allowing you to quickly set up leaderboards, achievements, and Whispersync for Games. This extension is free to all developers as part of the Amazon Mobile App SDK.


Expanding this archive into the root subdirectory of a Cocos2d-x v2 installation adds a new project generation script that pre-enables new Android projects for Amazon GameCircle support. Since Cocos2d-x relies on JNI libraries to interface with Java, this script automatically configures the new project to include AmazonGamesJni, the JNI bridge to Amazon Game Services’ GameCircle Java library.


To install, simply uncompress the archive into \$COCOS_ROOT, merging its contents with the existing files. The Amazon GameCircle include files and JNI library will be copied to the default HelloCpp sample project (the basis for new project creation when using the Cocos2d-x convenience scripts). In addition, create-gamecircle-android-project.bat will be written to Cocos2d’s root directory.


Use the script as you would any Cocos2d-x project generation script, such as create-android-project.bat or create-blackberry-project.bat. You will be prompted for package name, project name, and target as usual. When complete, the resultant project may be compiled using Android’s NDK and Java tools in a manner similar to other Cocos2d-x projects. The project’s main class will include stub initialization of the GameCircle service.

Note: Projects generated by create-gamecircle-android-project.bat must link to the GameCircle JAR; the AmazonGamesJni file simply makes that library visible to your game’s C++ code built on Cocos2d-x. In Eclipse, for example, this typically means linking the amazon-gamecircle-1.2.2.jar to the ‘libs’ folder of the project. This will cause it to appear automatically in the virtual “Android Dependencies” project folder.


Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.