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.

The higher the framerate, the better the game looks, but the faster it drains the battery.

What's a happy medium?

(I'm making a relatively simple 2D game with sprites moving constantly. I want the movement to appear smooth but I know how irritating it is when a simple game sucks your battery dry.)

share|improve this question
2  
Are you sure that faster framerates drains the battery any significant amount? I mean, did you actually try or you just assumed it? Remember that on most mobile phones the huge battery drain is the display itself. –  Lohoris Sep 28 '10 at 15:21
1  
More time that the processor is sleeping means less power used. Assuming the app is running at a slower rendering speed and sleeping that other part of the time, it will definitely save power. But you are definitely right in questioning just how much power that might be, if it's negligible compared to the display or something else. –  Ricket Sep 28 '10 at 20:07
    
When I look at what's been consuming the battery on my Android device, it's usually around 90% display and 10% app execution. –  dash-tom-bang Sep 29 '10 at 0:34
    
Ha! Yes, great point - I realised that sleeping the thread as much as possible would save power, but had totally assumed the amount saved would actually be significant. As you say, the amount saved might not even be noticeable. True, it's normally the display that takes the lion's share of the power, but when apps appear on the list too [on Android, at least], it tends to be games that appear highest. If I can stretch the battery life by 10%, it'll totally be worth it. @Lo'oris is right though - measuring the actual benefit will be interesting. –  teedyay Sep 29 '10 at 8:58
add comment

3 Answers

Your framerate should be as low as looks good, but I think you're in a tough situation if all of your sprites are moving constantly. You should try your absolute hardest to keep a consistent framerate; a low, consistent framerate is better than a high but randomly stuttering framerate. Then turn it down until it doesn't look good.

Consider matching the framerate of movies on the big screen: they are only 24 FPS. But again, they are precisely consistent, which is why people are okay with just 24 FPS.

Alternatively, if your sprites have an animation sequence and that has a FPS value, try matching that or a multiple of it. For example if they animate at 5 frames per second, then maybe try 25 or 30 frames per second so that the sprite animations can be precisely timed and make the game appear more smooth and consistent than it really is.

I think the best option in this case is to try out some framerates and find a good default, and then put a setting in your options menu for the user to be able to turn it up or down according to the user's desired battery life.

share|improve this answer
1  
24 FPS is acceptable for films because motion is blurry on film, not because they are consistent. –  user744 Sep 28 '10 at 14:53
    
Ah good point, I didn't think about that. But it still helps that it's consistent. –  Ricket Sep 28 '10 at 20:03
3  
I've shipped highly-regarded action games that ran between 18 and 20 fps. People universally thought it ran faster than that (and our geometry was resilient in the face of tearing). The key is consistency and "fast enough for what the game is trying to do." PixelJunk games would be very different if they were 30 instead of 60. –  dash-tom-bang Sep 29 '10 at 0:36
add comment

It might seem obvious, but aim for whatever the refresh rate of the screen you're using, or a multiple of that, i.e. if the device does 24fps you could do 12fps. But as Ricket says, the ideal thing is to be consistent.

share|improve this answer
add comment

When developing for mobile devices I always aim for 30.

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.