I have been doing game development on android very recently (2 weeks) :D. And i bought samsung galaxy having android 2.1 to test my games and demos. I am pretty happy with the results and enjoying very much. Before this i had made games for j2me mobile devices and still making. Well anyway i am not discussing android game development here so i am coming to the primary focus of this post.

Physics. Yeah physics is phun and if decent physics is added to your game then it makes game more enjoyable, of course if gameplay design is good and fun. I have been playing with my own very very basic physics code(collision detection, collision response) that i have written for j2me. It is working fine in android after tweaking my code here and there. But i wanted more features so i thought to look for any decent free opensource physics engine for android. Unfortunately i didn’t get much success. There were some forums and tutorials where using Box2d with android was discussed. This site has shown the tutorial using JBox2d on android and is been discussed by the people there.

I am a big fan of Box2d. I have been using JBox2d and Box2d flash for my respective platform based game. Library had fulfilled my satisfaction and need. I have not tested JBox2d on android yet. I wanted to do few research on it before doing that. In few forums people complained that if using more than 5 bodies, it brings the FPS rate down and makes simulation very slow. I haven’t checked that but is going to write code to see if its true. I think it may depend on hardware device specification and capability because i have played Angry Birds on my samsung galaxy s and physics of game works just fine and smooth. I came across one site where they showed the graph on how much number of bodies/elements effect the FPS(frame rate) using Box2d and Chipmunk. Here it is.

So now i am going to write a simple code of falling polygons using Box2d on android and see the FPS and performance. I will post the results and my experience on next post ASAP.

Merry Christmas & Happy New Year
Gracias.