iOS app loses touch input and accelerometer feedback - any ideas why?

We have a game that runs smoothly on Android, but not on iOS. It’s a racing game with randomly placed tiles. You need to swipe the screen to “turn” left or right, touch the screen to pick up items, and use the accelerometer to “slide” left/right. All of this functionality breaks after awhile on iOS.

We thought it might be a garbage collection issue. After turning off Corona garbage collection, we noticed that it it’s still being collected by iOS. We think this may be the issue.

So… what could you do in Corona to cause iOS to force a garbage collection enough times to make performance suffer like that? Or could there be another reason iOS performance basically stops working after awhile, even though it seems fine on Android?

The game runs consistently at around 60 FPS. We use less than 30MB of texture memory at any given time. We use around 100MB of RAM (kind of a lot, could this be an issue?). We have the setAccelerometerInterval at 75.

We’ve made several performance updates which seem to mildly help, but it still happens after awhile. Removing the audio does not help. Removing any text updates does not help.

What’s happening?  :wacko:

We set the setAccelerometerInterval to 25, and that fixed the issue.  :slight_smile:

It looks like if too many events are firing off at once, iOS will “shove” accelerometer and touch events to fire off later. Lowering the rate of accelerometer checks, along with some code cleanup, pretty much fixed the issue.

Interesting.  My experience is the opposite.  On iOS, I’ve always had good accelerometer performance, but Android was always choppy.   I was told that the setAccelerometerInterval should match the FPS.

We set the setAccelerometerInterval to 25, and that fixed the issue.  :slight_smile:

It looks like if too many events are firing off at once, iOS will “shove” accelerometer and touch events to fire off later. Lowering the rate of accelerometer checks, along with some code cleanup, pretty much fixed the issue.

Interesting.  My experience is the opposite.  On iOS, I’ve always had good accelerometer performance, but Android was always choppy.   I was told that the setAccelerometerInterval should match the FPS.