Skip to content
January 10, 2011 / Aurélien Ribon

First post, first android app out!

Hello, and welcome to this blog!

This will be a (yet another) blog with tips, tricks, techniques and tutorials about many Android and WPF related things. Mainly to help me remember what I find useful but also because blogs tends to be developers primary resources (aside from of course).

But for now, the most recent thing I want to talk about is my first experience with the Android market, from a developer point of view. Indeed, I recently developed an application (my first one) to test the Android SDK. But because I love animation, I quickly turned to a game development library, to see what can come out of it. As a result, I’m not very proud of this application, because it’s not a very useful app, but it allowed me to get ready for a real, big and complete game.

To sum up things a little, this application is (yet another) compass built to be a little more fun than what was already present in the market. The needle is linked to the center with a floating chain and is attracted by the north. Cannons arbitrarily fire bullets on objects falling in the direction given by the accelerometers. Well, built-in magnetic sensors being not that reliable, it was interesting to try a different, entertaining, approach. Yes, it’s a non-free app. I apologize. Actually, it will most certainly become free in a not-that-far future, but I needed to know if anything could be bought without any publicity. The answer, which might interest some of you, is “yes, at least while the app is featured in the new applications section”. Got 3 payments (other than supporting friends). Since then, nada :-). It won’t support me in the other app developments, but it was nice to see how the market actually works.

About Android game libraries

To come back to the developement, I firstly looked for a decent Android game library. Many are out in the wild, Cocos2D (from the iPhone world), AndEngine, LibGDX, and plenty of others. I first tried AndEngine, mostly because it features a complete live demo app for android devices, as well as a quite big community. But it appears to be limited to 2D graphics and many devs report some kind of bad performance results compared to other libs. Also, part of their JNI wrapper to C++ libs is just a direct extracts from the work of LibGDX developers. I’m not really against it, because that’s how open-source should work, but they won’t be as up-to-date as possible.  On the other hand, LibGDX is said to feature a more low-level API, and I’m not against it.

About LibGDX

From what I used, it’s not that low-level, especially when using 2D graphics. Orthographic camera, sprite batch, fonts, texture atlas, 2d physics (from Box2D). It comes with a lot of well designed helpers, but it also allows you to directly mess with OpenGL objects. Also, updates are done often, and the support is really fast: a message in the forum and a patch is on its way. But the most important and useful feature relies in the possibility of (most) entirely developing the application with a Java desktop target! Desktop wrappers are totally hidden, and switching from such wrapper to an android one is as easy as adding one line of code. It let me develop my app with a fast renderer (a desktop window), without having to wait for the emulator to launch the app on every compilation. That’s an awesome feature for an awesome library! The only android-specific code in Pirate Compass is the one related to the preference screen and to the orientation computation from the sensors.

That’s for my first steps in the Android world. I’ll write articles with complete descriptions and tutorials for LibGDX users (since there is a lack of it). Until then, I have a real game in preparation, and will of course share work-in-progress ;-)

Stay tuned !


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s