Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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
4  
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
2  
Joints are generally quite expensive to use too I believe. –  Jonathan Connell Oct 7 '11 at 9:13
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.