Are there any decent physics engines for Android?

Marc picture Marc · Jun 23, 2009 · Viewed 22.7k times · Source

I've looked around for a physics engine that will play nicely with Android, but I've only been disappointed.

In terms of performance, I had heard that jbox2d was the best bet, but (from my understanding) ever since Android SDK V1.0, the Dalvik VM's verifier has become very strict and rejects some of the key classes and refuses to run. This problem persists after using the dx tool (although I might be using the tool improperly).

I know that the AndroidBox2D porting project exists to optimize jbox2d for the Android garbage collector, but the project page doesn't have any downloads and the gpl license isn't as attractive as the zlib license of the original.

Does anyone have any tips for making jbox2d work in Eclipse, or have any recommendations for where I should start looking?

Answer

sehugg picture sehugg · Jun 23, 2009

I don't know why Dalvik would reject classes unless they were obfuscated with some tool. Did you try recompiling Box2d from source?

The only other Java lib I've seen is http://www.cokeandcode.com/phys2d/