Friday, September 19, 2014

Swarm API

A downside with libGDX is that since it generates the iOS and Android code from regular Java code, we cannot make use of the standard Facebook API to have users login, share high scores etc. We would have to write our own library to convert both iOS and Android. Instead we have looked at a framework called Swarm.

Swarm has functionality for leaderboards, achievements, monetization and social features. It officially libGDX. With Swarm you can either create your own Swarm account, or log in with Facebook, Twitter or Google+.

We have followed a small tutorial to implement leaderboards and achievements to a test app. It works for Android, but we have not yet tested it on an iPhone. Though it was a little bit fiddly to link everything up correctly, the only real issue we had was with SwarmActivity not properly merging into the app's AndroidManifest.xml (a file that is used to declare how the app is supposed to be built, there's usually one Activity  declared for each new screen in the app). Instead we manually added SwarmActivity to the manifest, which fixed the problem.

A problem with Swam was that the leaderboards automatically has ads in them, which we can't seem to control. Meaning they will potentially be making money off of our game.