In the course of porting Mayan Madness to Android, I investigated a few different 2D engines. Although I've learned a fair amount of OpenGL over the course of the past year, I'm by no means an expert and I assumed a good engine would make the porting task relatively straightforward. Given the apparent difficulty of making money with Android applications due to piracy, I wanted to "dip my toe in the water" and port the simplest of the iPhone applications first.
To put some context around this, I've been a full-time Java developer for somewhere in the neighborhood of 12 years doing everything from web applications to byte-code instrumentation. It's fair to say that Java is old hat to me at this point and I feel that my assessment of the various engines is not be hampered by a lack of Java experience.
The first engine I looked at was rokon. I wrote a quick test app to see how easy it would be to use. Unfortunately, I was unable to get it to do much more than crash on startup. In its defense, I spent only a small amount of time playing with it before I started to pursue other possibilities. Given that it appears to be no longer supported, I believe I made the right choice.
The only other engine I was aware of at the time was AndEngine. This seemed very similar to the cocos2d engine I used for the iPhone games, so I quickly went to work experimenting with it. Everything worked well and I found the engine to be intuitive and its learning curve small. I had the core of Mayan Madness working within 2 days and feature complete a few days after that.
Mayan Madness, although a simple game, is very demanding of performance. It really needs to run as close to 60 fps as possible to play well. Frame rate stuttering is a big problem, especially at the higher levels where the coins are falling fast and furiously. I did a lot of performance turning on the iPhone version's Objective-C code to minimize the stutter that occurs. Of course, on a mobile platform there is only so much you can do. An incoming call, e-mail check or SMS message are going to impact framerate no matter what tricks you employ. For Android, you also have the garbage collector to contend with so you have to make sure it kicks in only at opportune moments, which given the nature of Java garbage collection, is a tricky proposition.
After doing performance analysis and tuning on the AndEngine-based Mayan Madness, I just wasn't happy with its performance. Keep in mind that I was testing on a Nexus One, so I could only assume the game would be much worse on less powerful devices. At this point I was feeling that I might have to re-write the graphics layer using straight OpenGL (and possibly use the NDK) if I wanted the game to work well. Fortunately, I did one last Internet search and stumbled upon libgdx.
All indications were that libgdx was a "lower level" engine and that a fair amount of OpenGL knowledge was necessary to use it (I didn't really find that to be the case). I was able to quickly rewrite the graphical bits of Mayan Madness to use libgdx and immediately saw a performance boost. Whereas AndEngine was strictly scene graph based, libgdx gave a lot more flexibility to control how many sprites were drawn in a single draw call (libgdx also exposes a scene graph API but I haven't used it). There aren't a ton of graphical elements in Mayan Madness, so it was easy to create a single texture that included all necessary sprites and thus minimize texture switching on the performance critical parts of the game.
Added libgdx benefits are that you can test/debug your app on the desktop without employing the (slow as molasses) Android simulator and also create Windows/Mac/Linux desktop versions from the same source code if you use libgdx exclusively. It also supports 3D and OpenGL ES 2.0.
Needless to say, I was really happy with libgdx and want to complement its authors on an excellent job! It allowed me to stay in the Java world for Mayan Madness' code and avoid further time spent learning the Android NDK and wrestling with low-level OpenGL. I may need to eventually go that route to get the same performance I was able to get from the iPhone, but I think the initial Android version is very playable and should provide a nice way for Android users to compete with their iPhone counterparts on the leaderboards.