user446718
user446718

Reputation: 439

How can we reduce the power consumption of our iOS game?

We just developed an iOS game and users have been complaining that it drains their battery power. It plays at 60 frames-per-second and uses a proprietary gaming engine (written in C#). May one of those be the issue or are there other common factors that should be investigated first?

Upvotes: 2

Views: 466

Answers (4)

davbryn
davbryn

Reputation: 7176

Firstly, run the code through Instruments and see how it effects CPU usage (constant high CPU will drain the battery). Also, do you use any device features such as GPS or WIFI? These will drain the battery further.

Secondly, do you run any background processes when your app should suspend that might be eating away at battery?

You can keep track of any performance you enhance by checking device logs for power consumption, making a change and saving another log.

follow these instructions to accomplish this

Upvotes: 1

Richard J. Ross III
Richard J. Ross III

Reputation: 55533

A good first step would be to reduce the frame-rate to 30 FPS. For any reasonable game, 60 FPS is overkill. At some point, your eyes just cannot tell the difference, unless the frame-rate is skipping. That rate occurs at about 24-30 FPS, and that's why It's most used for videos & gaming.

I would caution you though, if you do have a real-time game (especially one based on reflexes), that you do your game logic on another thread. If you do not, you could have flaw that other games have, for example:

Call Of Duty: Modern Warfare 3 has a major flaw in it's engine design in that the fire rate that your gun shoots is determined solely by the frame rate of the game, and not by a background thread.

This makes certain weapons more dangerous than others, because at a frame rate of about 60 FPS, they have an integer amount of time per shot.

So with that said, just try reducing your framerate. That alone is probably what's eating most of the battery.

Upvotes: 0

trumpetlicks
trumpetlicks

Reputation: 7065

There may be one simple answer, try running your game at 30, or maybe even as low as 24 FPS. Is there any REAL reason you need to be running it SO fast???

I stated 24 by the way as it is "technically" the fastest your eyes (for the majority of human beings) can detect.

In video, we try to go higher because there are artifacts that can be seen from the recording process, but because games have generated scenes, generally you dont NEED to go higher than 24.

Upvotes: 0

Alex KeySmith
Alex KeySmith

Reputation: 17091

Apple have some guidelines on reducing power consumption in their iOS programming guide

Good place to get started on some tips.

Upvotes: 3

Related Questions