samcodes-gamecircle 1.0.4

Amazon GameCircle achievements and leaderboards for Kindle/Android

Released 2015-07-27.

To install, run:

haxelib install samcodes-gamecircle 1.0.4

See using Haxelib in Haxelib documentation for more information.

Current version1.0.4
StatisticsInstalled 22 times
Tags achievements, amazon, android, game, gamecircle, leaderboards

Haxe GameCircle

Unofficial Amazon GameCircle 2.x leaderboards and achievements support for OpenFL Android target.


Supports: GameCircle sign-in. Showing leaderboards and achievement popover screens. Submitting leaderboard scores, unlocking and updating achievement progress. React to player login or logout with a custom listener.

Doesn't Support: iOS target. Whispersync. * Fetching leaderboard/achievement/player data from the Amazon servers.

If there is something you would like adding let me know. Pull requests welcomed too! Here it is in action:

Screenshot of it working


haxelib install samcodes-gamecircle



<haxelib name="samcodes-gamecircle" />

<!-- Add your GameCircle API key. Refer to the Amazon documentation: API Keys
<template path="android/debug_gamecircleapikey.txt" rename="assets/api_key.txt" if="debug" />
<template path="android/release_gamecircleapikey.txt" rename="assets/api_key.txt" unless="debug" />

Example usage:

// Your wrapper of the GameCircle leaderboards functionality
class GameCircleLeaderboards {
	public static var get(default, never):GameCircleLeaderboards = new GameCircleLeaderboards();
	private var leaderboards:GameCircle;
	private function new() {
		leaderboards = new GameCircle();
	public function setListener(listener:GameCircleListener):Void {
	public function openLeaderboard(id:String):Void {;
	public function openAchievements():Void {;
	public function isSignedIn():Bool {
	public function signIn():Void {;
	public function submitScore(id:String, score:Int):Void {, score, "");
	public function updateAchievementProgress(id:String, percent:Float):Void {, percent, "");
	public function setPopUpLocation(location:PopUpLocation):Void {;

// Your game
class MyGame {
	public var leaderboards:GameCircleLeaderboards;
	public function create():Void {
		leaderboards = GameCircleLeaderboards.get;
		if (!leaderboards.isSignedIn()) {
	public function onLevelEnd() {
  		if (leaderboards.isSignedIn()) {
  			// Create your leaderboards and achievements and set their ids through the Amazon developer console
  			leaderboards.submitScore("my_leaderboard_id", 1000);
			leaderboards.updateAchievementProgress("my_achievement_id", 50); // 50% complete
			leaderboards.updateAchievementProgress("my_other_achievement_id", 100); // Unlocks/100% complete