Game services wrapper for libgdx.
Currently supports Google Play Games on desktop and android and Game Center on iOS (using mobidevelop's roboVM fork).
Your project needs libgdx >= 1.10.0.
Add following bold parts into your build.gradle file:
allprojects { ext { gdxGameservicesVersion = '3.0.0' } } ... project(":core") { ... dependencies { ... compile "games.spooky.gdx:gdx-gameservices:$gdxGameservicesVersion" } } // For Google Play Games on desktop project(":desktop") { ... dependencies { compile project(":core") ... compile "games.spooky.gdx:gdx-gameservices-googleplay-desktop:$gdxGameservicesVersion" } } // For Google Play Games on Android project(":android") { ... dependencies { compile project(":core") ... compile "games.spooky.gdx:gdx-gameservices-googleplay-android:$gdxGameservicesVersion" } } // For Game Center on iOS (roboVM) project(":ios") { ... dependencies { compile project(":core") ... compile "games.spooky.gdx:gdx-gameservices-gamecenter:$gdxGameservicesVersion" } }
Most methods take as result an AsyncServiceResult object, exhibiting three methods: onCompletion(...), onSuccess(...) and onError(...). These methods accept a Listener where you will be able to use the result of your call.
- How to handle Authentication.
- How to get and submit Achievements.
- How to fetch leaderboard entries and submit new ones.
- How to download saved game data and upload new ones.
Platform | Connection | Achievements | Leaderboard | Saved games |
---|---|---|---|---|
Google Play Games (android) | ✓ | ✓ | ✓ | ✓ |
Google Play Games (desktop) | ✓ | ✓ | ✓ | ✓ |
Game Center (ios - roboVM) | ✓ | ✓ | ✓ | ✓ |