All Projects → MrStahlfelge → gdx-gameanalytics

MrStahlfelge / gdx-gameanalytics

Licence: Apache-2.0 license
Gameanalytics.com client implementation for libGDX

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to gdx-gameanalytics

Libgdx
Туториалы по LibGDX
Stars: ✭ 143 (+410.71%)
Mutual labels:  libgdx
Destinationsol
Official continuation of Destination Sol, the great fun little arcade space shooter from http://sourceforge.net/projects/destinationsol/ Modules live at https://github.com/DestinationSol/
Stars: ✭ 214 (+664.29%)
Mutual labels:  libgdx
ForgE
Simple clone of RPG maker using LibGdx
Stars: ✭ 17 (-39.29%)
Mutual labels:  libgdx
Gdx Lml
LibGDX utility libraries.
Stars: ✭ 152 (+442.86%)
Mutual labels:  libgdx
Unciv
Open-source Android/Desktop remake of Civ V
Stars: ✭ 2,744 (+9700%)
Mutual labels:  libgdx
Martianrun
An Open-Source Running Game with libGDX
Stars: ✭ 242 (+764.29%)
Mutual labels:  libgdx
Gdx Setup
Alternative gdx-setup application - create your LibGDX projects with ease!
Stars: ✭ 130 (+364.29%)
Mutual labels:  libgdx
kickoff
Open Kick-Off is a fun rewriting attempt of the cult football game Kick Off 2 designed by Dino Dini and released in 1990 by Anco for the Atari ST and the Commodore Amiga. It is written in Java with the help of libGDX.
Stars: ✭ 32 (+14.29%)
Mutual labels:  libgdx
Gdx Pay
A libGDX cross-platform API for InApp purchasing.
Stars: ✭ 195 (+596.43%)
Mutual labels:  libgdx
libgdx-transitions
libgdx screen transitions/fading
Stars: ✭ 43 (+53.57%)
Mutual labels:  libgdx
Gaiasky
Mirror of Gaia Sky repository hosted on Gitlab: https://gitlab.com/langurmonkey/gaiasky
Stars: ✭ 162 (+478.57%)
Mutual labels:  libgdx
Mundus
A 3D world/level editor built with Java, Kotlin & libGDX.
Stars: ✭ 164 (+485.71%)
Mutual labels:  libgdx
EasyStage
A stage profile tool for libgdx
Stars: ✭ 17 (-39.29%)
Mutual labels:  libgdx
Gdx Liftoff
A modern setup tool for libGDX Gradle projects
Stars: ✭ 148 (+428.57%)
Mutual labels:  libgdx
Koru
A 2D multiplayer sandbox game.
Stars: ✭ 78 (+178.57%)
Mutual labels:  libgdx
Ore Infinium
Ore Infinium, Open Source multiplayer Terraria-inspired Sci-fi game, focused on technology, devices and researching. Written in Kotlin (JVM), LibGDX. Cross platform
Stars: ✭ 139 (+396.43%)
Mutual labels:  libgdx
Gdx Rpg
java & libgdx制作的RPG游戏! an RPG by java and LibGDX
Stars: ✭ 239 (+753.57%)
Mutual labels:  libgdx
pixelwheels
A top-down retro racing game for PC (Linux, macOS, Windows) and Android.
Stars: ✭ 315 (+1025%)
Mutual labels:  libgdx
tripeaks-gdx
A simple tri peaks solitaire game using libGDX.
Stars: ✭ 45 (+60.71%)
Mutual labels:  libgdx
DoubleHelix
A live wallpaper and daydream for Android featuring stylized glassy-looking DNA structures
Stars: ✭ 86 (+207.14%)
Mutual labels:  libgdx

gdx-gameanalytics

gameanalytics.com REST API client implementation for libGDX

Checkout gameanalytics.com for information about their service.

Why you should use this implementation instead of official implementations?

This implementation works without changes on Android, Desktop, iOS/RoboVM and GWT. The official Android implementation needs Play Services to work, which are not available on Amazon devices and bloat your apk file.

Besides, this implementation does not send any identifiable user data. For returning user recognition, a random UUID specific for your game is generated and used.

Installation

This project is published to the Sonatype Maven repository. You can integrate the lib into your project by just adding the dependencies to your build.gradle file.

Define the version of this API right after the gdxVersion:

gdxVersion = '1.9.6' //or another gdx version you use
gaVersion = '1.0.0'

Then add the needed dependencies to each subproject:

Core:

compile "de.golfgl.gdxgameanalytics:gdx-gameanalytics-core:$gaVersion"

Desktop:

compile "de.golfgl.gdxgameanalytics:gdx-gameanalytics-desktop:$gaVersion"

Android:

compile "de.golfgl.gdxgameanalytics:gdx-gameanalytics-android:$gaVersion"

HTML:

compile "de.golfgl.gdxgameanalytics:gdx-gameanalytics-core:$gaVersion:sources"
compile "de.golfgl.gdxgameanalytics:gdx-gameanalytics-html:$gaVersion"
compile "de.golfgl.gdxgameanalytics:gdx-gameanalytics-html:$gaVersion:sources"

iOS-RoboVM:

compile "de.golfgl.gdxgameanalytics:gdx-gameanalytics-ios:$gaVersion"

Building from source

To build from source, clone or download this repository, then open it in Android Studio. Perform the following command to compile and upload the library in your local repository:

gradlew clean uploadArchives -PLOCAL=true

See build.gradle file for current version to use in your dependencies.

GWT project setup

If you want to use GameAnalytics with a GWT project, you need some more steps. Add the following line to your gwt.xml:

<inherits name="de.golfgl.gdxgameanalytics.gdxgameanalytics"/>

You also need to add a crypto JS lib to your project. Add the following to your index.html within the body tags:

 <script src="sjcl.js"></script>

Of course, you also need to get a copy of the lib from https://github.com/bitwiseshiftleft/sjcl/

Usage

Initialize GameAnalytics client in your game's create() method:

protected void initGameAnalytics(Preferences lbPrefs) {
    gameAnalytics = new GameAnalytics();
    gameAnalytics.setPlatformVersionString("1");

    gameAnalytics.setGameBuildNumber(GAME_DEVMODE ? "debug" : String.valueOf(GAME_VERSIONNUMBER));

    gameAnalytics.setPrefs(Gdx.app.getPreferences(...));
    gameAnalytics.setGameKey(GA_APP_KEY);
    gameAnalytics.setGameSecretKey(GA_SECRET_KEY);
    gameAnalytics.startSession();
}

Don't forget to add calls to closeSession() and startSession() in your game's pause() and resume() methods.

On Android, you can use the convinience class AndroidGameAnalytics which sets up platform, version and device information for you. If you want to use GA for crash reporting, call its registerUncaughtExceptionHandler() method. The same applies to iOS/RoboVM with IosGameAnalytics class.

Submit events with the public submit... methods.

News & Community

You can get help on the libgdx discord.

License

The project is licensed under the Apache 2 License, meaning you can use it free of charge, without strings attached in commercial and non-commercial projects. We love to get (non-mandatory) credit in case you release a game or app using this project!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].