Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AGK: Frame rate and battery life

Author
Message
erebusman
12
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 6th Sep 2012 05:14
I am part of a iOS Developer Meetup group and we got into a good discussion about frame rate and battery life.

The thought was that many games try to push for max FPS but the human eye views about 30fps as very smooth, and stops being perceptible at or above 60 depending on your eyes and other conditions.

That being the case I noticed that my AppGameKit project seems to clock in at 59/60 FPS on everything I've put it on so far (my iPad 2 being the only iOS device) but given that Pirates Treasure is a simple match3 style falling gem game I don't think I need 60 FPS for the game to look good.

Has anyone got solid information on how much FPS affects battery life?

If I take it down to 30 will my game use half the battery it did at 60? Or maybe 20% less? I cant imagine the FPS is the only factor so I don't imagine a 50% savings.

Basically I'm looking for more solid information on what the trade off 'sweet spot' is likely to be?
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 6th Sep 2012 11:34
Here's a good read.

JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 6th Sep 2012 14:42
Wow - he's spent some time on that!

It doesn't answer the power issue. I suspect a lot depends on how frequently the frame buffer is actually being updated.

My main monitor is an LG 24" 120Hz, and it's great for games, but also extremely crisp in general use. The difference between the LG and another Acer 24" at the same resolution on an identical computer is remarkable. Playing Diablo III networked with my partner Gillie I always get the blurry one! It can make a huge difference to eye-strain in a long session. For programming, I couldn't live without a dual-monitor set-up.

In a way, doing stuff for phones and tablets is like a step backwards into the dark ages.

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 6th Sep 2012 17:57
AGK defaults to 60 fps.

The most battery intense part is the screen. Lowering the brightness of the screen will save up battery. Not sure how much FPS affects the battery but CPU useage will. But still, if the screen is on it will drain your device. WiFi and 3G also drains battery as well as talking (on a phone).

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 6th Sep 2012 22:00
I have actually pointed this out many times about mobile devices.

if your game runs well in 30 fps lock the framerate to 30.

I used to hangaround binary domains forums when i whas coding android java, and the main talk there whas a locked framerate of 30 whas the way to go.
And he have bin coding for mobile devices for a long time.

There point whas as simple as on a small screen is it very hard to see if its 30 or 60 fps and the gain in battery life whas huge.
Digital is also right here.
Quote: "The most battery intense part is the screen. Lowering the brightness of the screen will save up battery. Not sure how much FPS affects the battery but CPU useage will. But still, if the screen is on it will drain your device. WiFi and 3G also drains battery as well as talking (on a phone)."


Android 2.3 Gingerbread , ZTE Skate , 480x800 , 800 mhz cpu , Samsung Galaxy Y , 240x320 , 832 mhz cpu
Android 4.0 Sandwich , Dmtech 3g 9738B , 1024x768 , 9.7 inches , cortex A8 1.2 cpu , 1 gb ram.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 7th Sep 2012 23:51 Edited at: 7th Sep 2012 23:51
i can definately see a BIG difference if i lock my game to 30fps. it runs much smoother at 60fps, so my eyes can see the difference
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 8th Sep 2012 01:20
Quote: "i can definately see a BIG difference if i lock my game to 30fps. it runs much smoother at 60fps, so my eyes can see the difference "

Many comercial game dont run at 60 fps anymore.
60 fps is ideal but the limitations off many mobile devices will stutter alot or drain battery if you use it.

Keep in mind that the largest amount of mobile devices only have 1 ghz or lower cpu.

Most common is around 600-800 mhz.

But of course if your app is only for computers so do i understand your point.

Android 2.3 Gingerbread , ZTE Skate , 480x800 , 800 mhz cpu , Samsung Galaxy Y , 240x320 , 832 mhz cpu
Android 4.0 Sandwich , Dmtech 3g 9738B , 1024x768 , 9.7 inches , cortex A8 1.2 cpu , 1 gb ram.
Kobaltic
12
Years of Service
User Offline
Joined: 24th Jan 2012
Location: PA, USA
Posted: 8th Sep 2012 05:39
John Carmack did an article on this exact subject. I can't find it but stated that 30 FPS was the most you should ever use on mobile phones. 60 fps did very little for the human eye but really hurt the phone's battery life.
erebusman
12
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 8th Sep 2012 06:31 Edited at: 8th Sep 2012 06:34
@ Kobaltic nice I found what you were referring to based off of what you recalled here's a clip from an apple insider article:

Quote: "
Speaking at QuakeCon, id Software cofounder and video game luminary John Carmack demonstrated the company's id tech 5 gaming engine running a Rage-themed demonstration on iPhone 4 at an impressive 60 frames per second.

The demonstration keynote, live blogged by Kotaku, profiled an upcoming release of the new Rage engine in an iOS title which Carmack said would run on not just iPhone 4 but also "runs great on an original 2G iPhone" and is "incredibly cool on an iPad."

The Rage demo lights scenes with radiosity to accurately simulate diffuse indirect illumination and shadows, and also features id's MegaTexture technique of using a single large texture rather than repeating a single small texture tile over a surface. That results in a mobile game in the hundreds of megabytes, Carmack said.

Calculating 60 frames per second is a major battery draw on mobile devices, so Carmack said the game would ship with an option to run at 30 frames per second as well.
"


Full article here
erebusman
12
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 8th Sep 2012 06:36
So its nice to get some confirmation.

Soooo given that AppGameKit seems to force the 60FPS; I assume there is something in the template files that can be adjusted if I want to target 30FPS or tweak it until it looks just right but doesn't have to max at 60 ...

Prize of 1 Graphic no larger than 1024x1024 done by me for the person who finds and documents it in this thread first!
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 8th Sep 2012 12:31
I think what Carmack is saying is that it is a major draw because it is such a graphically heavy game. Also there is no mention that the game runs just as good on 30 FPS. It's just an option for those who rather save on battery, and I would assume those with not enough hardware to run.

If my game Rush to Adventure dips from 60 FPS I notice it instantly. For some reason it drops from 60 to around 55 FPS on my laptop as soon as the first sound has played. Sometimes it does constant 60 FPS though. I may notice this because each frame does not render at the same time, but I don't know.

Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 8th Sep 2012 13:52
Quote: "I want to target 30FPS"

SetSyncRate() command?

JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 8th Sep 2012 14:14
Details here:

http://www.appgamekit.com/documentation/Reference/Core/SetSyncRate.htm

The modes are quite interesting!

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
Greenster
19
Years of Service
User Offline
Joined: 3rd Feb 2005
Location: US ©
Posted: 8th Sep 2012 19:45 Edited at: 8th Sep 2012 20:04
It's actually scary that this is even relevant to J2ME and SDK developers.. I thought this is what kernels were made for..

On cell devices kernels are even suppose to adapt to sensor states(on most ARM chips this is an external voltage controller with a sensor), dropping clock on itself and GPU which transparently drops userland frame buffer queue iteration..

It means IOS SDK and Android SDK shouldn't have to consider this..
erebusman
12
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 8th Sep 2012 20:15
Pending verification Hodgey wins That'll be two I owe you Hodgey!
erebusman
12
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 8th Sep 2012 20:33
Yep that worked, I should have checked myself first ; thats what I get.

I assumed youd have to hack one of the project / template files to adjust it or do some whacky timer code!

Thanks Hodgey; you have 2x graphics on your "IOU" list from me!
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 8th Sep 2012 22:12
Quote: "It's actually scary that this is even relevant to J2ME and SDK developers.. I thought this is what kernels were made for.."

Since when does a kernel dictate how fast an application draws to the screen? An SDK might do that, but that's about all I can think of.

Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 8th Sep 2012 23:13
Quote: "Thanks Hodgey; you have 2x graphics on your "IOU" list from me!"

Thanks mate, but you can give this one to JimHawkins if he so desires it. He went to the trouble of posting the info on it and I still have one left anyway.

Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 8th Sep 2012 23:52
Maybe you should add a syncrate option in the settings menu of your game, if you have one. Toggle between 30-40-50-60 FPS.

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
erebusman
12
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 9th Sep 2012 01:58
@ hodgey: well thats up to you and Jimhawkin's I suppose ?? lol I'm easy

@Impetus73 : I'm testing out different frame rates right now on my device to see if I can even tell the difference; it would be easy enough to do but only if I can notice a difference.

My particular game is targeted at casual gamers and its just gems falling; where not talking about ragdoll physics on humanoid afterall So I'll eventually make a judgement call on what the best approach is
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 9th Sep 2012 10:59
On Android you can see what has used the most battery since your last recharge. Go to Settings > About phone > Battery usage.

JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 9th Sep 2012 11:22
Thanks, Hodgey. That's very kind! Erebusman - be delighted to partake!

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
erebusman
12
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 9th Sep 2012 21:00
Okay well I got you down for 1 1024x1024 graphic when you need one just hit me up!

You can see some of my work in the pirates treasure thread for examples

http://forum.thegamecreators.com/?m=forum_view&t=199236&b=48
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 10th Sep 2012 10:55
Thanks - how do I get it?????

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
erebusman
12
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 10th Sep 2012 23:20
You can email me the details @ erebusman ! at ! gmail. ; sorry trying to prevent crawler/ spambots from screen scraping my email... Leave out the exclamations.
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 11th Sep 2012 10:02
Will do!

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL

Login to post a reply

Server time is: 2024-05-01 07:59:41
Your offset time is: 2024-05-01 07:59:41