Android drop in frame rate (Kindle Fire and Samsung Nook) - both daily and stable build

My Troubles

My iOS builds have been working nearly seamlessly but now that I have branched out to Android I have found a pervasive problem with frame rate reduction.  My first hunch is that it has to do with the Box2D engine because when I zoom in and reduce the number of physics bodies on the screen, the frame rate returns to normal.

The problem occurs in both the stable build and subsequent daily builds tested on a Samsung S4 Nook and a Kindle Fire HD  (10.1)

I’m building from a mac with El Capitan (OS X 10.11)

My App Profile

My app can be described as “biological” and has hundreds of interacting physics bodies and joints - think of a petri dish with microorganisms interacting with one another.  I’ve been keenly observing the frame rate and pressing the boundaries of Box2D and Corona to find the breaking point, which in the simulator at least, is many hundreds of bodies and joints.

My Observations

My iOS builds handle all the action just fine and the frame rate stays close to 30.

The Android builds suffer a reduction in frame rate loosely proportional to the increase in physics bodies - quickly falling toward the single digits as bodies are added.

My Questions

  1. Does anyone know of a performance deficit for Box2D on Android via Corona?

  2. Does anyone have any hunches about what else I should examine as a potential culprit for the frame rate reduction?

Thanks,

Jonathan

I typically try and keep dynamic physics bodies under 100 on apple and android. This is due to the tons of calculations that box2D would have to do. Density, Friction, Collisions etc.

Cheers, 

JM

Thanks JM,

I generally agree except I have applied a complex array of collision filters that drastically reduces the number of calculations.  It took a while to figure out but, on the simulator and iOS devices, I can get about 1,000 physics bodies and many hundreds of joints to work flawlessly.  However, assuming it is the physics bodies, something on Android isn’t happy about them.

I’m hoping that it doesn’t have anything to do with Box2D at all but rather some obscure Android setting that I don’t know exists. . . . fingers crossed.

Jonathan

After some research, it seems that my hunch was correct.  The problem is a Box2D - Android issue.  I’m going to start a new thread to see if anyone has a Corona workaround.

I typically try and keep dynamic physics bodies under 100 on apple and android. This is due to the tons of calculations that box2D would have to do. Density, Friction, Collisions etc.

Cheers, 

JM

Thanks JM,

I generally agree except I have applied a complex array of collision filters that drastically reduces the number of calculations.  It took a while to figure out but, on the simulator and iOS devices, I can get about 1,000 physics bodies and many hundreds of joints to work flawlessly.  However, assuming it is the physics bodies, something on Android isn’t happy about them.

I’m hoping that it doesn’t have anything to do with Box2D at all but rather some obscure Android setting that I don’t know exists. . . . fingers crossed.

Jonathan

After some research, it seems that my hunch was correct.  The problem is a Box2D - Android issue.  I’m going to start a new thread to see if anyone has a Corona workaround.