Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a simple game with 20-30 physics bodies (static, and dynamic)

If I add some additional Dynamic bodies and joints (over 80-90 item), then JBox2D will become very laggy, and a little slow.

Am I doing something wrong, or is this the limit of JBox2D? If I change to Box2D JNI via java native calls, will it be faster?

share|improve this question
I have no idea what hardware you are running on, but I think for a mobile game, that might be too much for most phones to handle. – AttackingHobo May 9 '11 at 22:09
Joints are generally quite expensive to use too I believe. – Jonathan Connell Oct 7 '11 at 9:13
up vote 1 down vote accepted

Response for Android devices. Jbox2D is so bad... Since NDK is available, i use it with native Box2D. January 2010, there was a 3X factor without garbage collector lags. There is many NDK ports as in libGDX

note: With 2.3 devices, the new GC fixes lags...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.