Showing posts with label Week 3. Show all posts
Showing posts with label Week 3. Show all posts

Saturday, September 20, 2014

HTML5 up and running!

So for fun sake, I decided that the integrated HTML5 feature could not go to waste. And I setup a webserver that runs the game through javascript.

The build was done in gradle with the command:

./gradlew html:dist

which creates all the necessary files in html/build/dist folder of the project. Of course as always there was some tweaking before getting it to work. Nothing is that easy. But changing the android sdk path

On Linux/Mac OS X

set ANDROID_HOME/Path/To/Android/SDK (Applications/sdk)

is something that has to be done nevertheless.

So now you can visit this site to get to the week 3 progress of the game!

Enjoy!

Friday, September 19, 2014

Bugg in android and ios

So after a lot of hair pulling, curses etc, we created a hypoteses about why our frog would be invisible on our devices but not on the desktop application. I made a debug where we finally saw that the frog actually fell through the bounds of the screen. I believe it is because the frog is created before the ground, and falls through it before the ground is created!

The fix will be to create a start state so you must push the screen for the game to start, this will probably solve it. Hopefully that is the problem!

over and out

___

Yep that was the problem, bug resolved.

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.