A fellow named Nicholas Gramlich has put some effort into creating a pretty nice 2D Android game engine called Andengine. It is similar to other libraries like Cocos2d or Rokon but from what i saw so far Nicholas is way ahead in terms of implemented features as well as overal API design. What’s lacking currently is documentation but he makes up for it in shear example count. He’s using libgdx for the box2D wrapper (which i still don’t extract from libgdx itself). The feature i’ll probably steal is the Mod player he put out as an extension. He’s also pretty active on his forums (i wonder how long he can sustain that, no summer internship? :)). I only briefly looked over his code and some things could need a bit of reworking, especially when it comes to performance. He’s done a great job so far and anyone who’s looking for an integrated solution should check out his work. Here’s a video of a livewallpaper demonstrating his particle engine:
Anyone who’s overwhelmed by the “down to the metal” approach of libgdx should seriously consider this library for his/her next game. Badlogic Games seal of approval 🙂
Maybe i can get him to refactor his thingy a little so it can run on top of libgdx. That would be awesomesauce.
Update: i tried the benchmarks included in the examples. Some of them are promising, others need some more work. All testing performed on a N1, Android 2.2. The Sprite Benchmark renders 1000 sprites at 15.9 fps. Each sprite is going through a full glPush/glXXX/glPop cycle everytime it’s rendered, where glXXX ranges from 1 to a shitload of transforms. That’s going to kill anything, batching would help a lot. I’m actually surprised that it works that well in that case, but i attribute much of it to the JIT. I need to test it on the hero but i expect around 2-3fps.
Next i tried the particle benchmark, 200 particles which scale and change color. 25fps on my N1. Same problem as before, the missing batching is killing that poor thing. And that’s on a N1, for first gen devices that’s going to be completely useless. Christoph showed me a benchmark today for his amarena2d particle system using libgdx’s SpriteBatch class emitting 1000 particles, blended and dynamic at 45fps on my N1, on a HTC Hero, Android 1.5 around 12FPS.
This is of course not a final verdict, but it seems that Andengine is mainly aimed at second gen devices. It could improve performance quiet a bit on those too but that would need a major redesign of the rendering architecture. Still worth checking out!