I’ve spent the last few weeks scouting out Android libraries to help write native games in OpenGL, and I’ve come up with what I think are 3 of the best, all aimed at different levels or types of developers…
This 2d only library is probably the most ‘Flash like’ and feature complete in terms of a full library, and the quickest to get started with. It completely shields you from the underlying OGL system, making it very easy to get sprites up on screen and give them behaviours and modifiers (kind of similar to Flash tweens).
It comes complete with loads of helper classes to handle screen scaling, tile maps, parallax backgrounds, multi-touch and on screen controls, sounds & music (including a .mod player), particle systems, object pools, collision etc. It also features a full Box2d physics implementation using JNI C calls for speed (based on the LibGDX port, see below).
On the down side, this power and flexibility comes at a price and I found it to sometimes be not slow but slower than the other engines mentioned here. It’s a 2d only library based on the concept of ‘sprites’ so no 3d stuff, and quite tightly tied to OpenGL1 (so won’t take full advantage of newer OpenGL2 capable devices).
Its ease of use has also attracted a lot of beginner users and the forums can be a little full of noise from the same repetitive and basic questions, and many more complicated questions go un-answered. There is a lack of official documentation, but it does come with a comprehensive set of examples projects that illustrate just about every thing it’s capable of.
However, if you want to jump in and try making or prototyping a native Android game then Andegine is a very good place to start. There’s a 5 minute quick start video available to get you up and running.
Ardor3d for Android :
I’ve played with this the least of the 3 so far, and can’t really say to much about it technically, but it’s built on top of a very comprehensive desktop 3d library. The learning curve seems a bit steeper than Andengine, but there’s also more existing resources out there, although they are currently mostly for the desktop version.
Unfortunately as far as I can make out you can’t ‘write once run anywhere’, so you cant port your desktop app directly to Android. It also seems to be tied to OpenGL1, so comes with the same performance caveat for newer devices as above.
I’m not sure I’d recommend this for beginners, but if you already have some 3d engine experience or have worked with Ardor3d before this is definitely one project to keep an eye on.
If you want to get bare bones and have some OpenGL experience this may be the one for you. It’s a much lighter lib than the other 2 and provides a wrapper around the low level OGL calls and some basic helpers to abstract out file I/O, sound and input handling. It also includes a JNI Box2d wrapper (as used in Andengine also).
The really neat thing about it is you can develop and test your app on the desktop, then with a single extra class run the same code on your device. This cuts down the compile & test cycle dramatically and is a really handy feature.
It offers bindings for OpenGL1, 1.1 and 2 so you can choose to target only the newer OGL2 capable devices if you want, and seems to offer the most raw power of the 3 here. On the other hand you will need some experience with OpenGL to get started.
It’s in fairly rapid development and the guys behind it really seem to know their stuff, but one problem with this quick turn around was shown with the recent update from 0.7 to 0.8 which had a few ‘silly’ bugs (fixed in SVN) and changed some major parts of the API, and unfortunately the rather sparse documentation hasn’t really caught up with these changes yet either. It does however come with full Java Docs.
It has a developer forum, but it’s not nearly as busy as the Andegine ones, which in some ways is a good thing.
Personally I’m flitting between Andegine and LibGDX depending on my needs. If you want to do a tile based RPG or Angry Birds clone Andengine may very well be all you need. If you’re looking to remake GridWars or want to work in 3d you may be better with LibGDX.
Some other options…
Rokon Android :
Not sure but this may be dead? The site has been down for a few days now and a lot of users seem to be gravitating over to Andengine recently. Code still available on Google though if you want to give it a try.
Only came across this a few days ago so not had a chance to try it out yet. Looks like it could be interesting, and the developer’s a Flasher so that might help ease the transition for some of us. Another one to keep an eye on.
If there are any I’ve missed or if you can add anything (or if I’ve got something completely wrong) please leave a comment…