Game Eats Battery Power

Hi, I’ve found my game eats the battery life on an iPhone. It’s a 2d puzzle game with no physics, so can anyone suggest the like canditates?

My current thoughts are:

  • transitions, I’m doing a lot of transitions on some player moves. At the moment I transition each block individually, I could bundle the into groups for the same move distance.
  • audio, I have a looping sound track in the background. But it’s a mono caf file.
  • running 60 fps, probably could be 30

Where else should I be looking for expensive CPU & battery ops? [import]uid: 68937 topic_id: 12728 reply_id: 312728[/import]

None of those should eat “that” much battery power but 30fps might help…

Try those (unless you are using those features),

system.setAccelerometerInterval( 10 )
system.setGyroscopeInterval( 10 )
system.setIdleTimer( true ) [import]uid: 10478 topic_id: 12728 reply_id: 46703[/import]

Ah, it might be the accelerometer since I recently added a shake event. What interval does it default too? [import]uid: 68937 topic_id: 12728 reply_id: 46729[/import]

Not sure but I think it defaults to 60…

Btw, if you are using that shake even conditionally, you can set it to an higher value when it’s needed and fall back to 10 (or default) other times… [import]uid: 10478 topic_id: 12728 reply_id: 46730[/import]