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 / Framerate on iOS

Author
Message
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 23rd Oct 2011 13:38
I made a little test game with 35 sprites (24 x 24 pixels) with no complicated logic.

If I cap the framerate at 60fps, I get max 56-57fps.
If I cap the framerate at 120fps, I get 61-62fps.

I am testing on iphone 3gs.

Is there any explanation for this?
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 23rd Oct 2011 17:04
How exactly are you setting the framerate?
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 23rd Oct 2011 17:47
I dont see the problem ?
As most games on android and iphone run with an framerate around 30-60 fps.

Both android and iphone is locked with an 60 fps frame rate.

And if you then set an higher framerate so is it the hardware that locks it when its higher,and if you have an locked 60 fps framerate in your software so will you get an slightly lower framerate then 60.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 23rd Oct 2011 19:16
I am just asking if this is a normal behaviour, as I am testing how various things work.

Setting fps with agk::SetSyncRate(60,0)
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 24th Oct 2011 01:27
Most mobile devices seem to be locked to a maximum of 60fps. Making AppGameKit also lock the frame rate to 60fps introduces a sleep command every now and again to try to match 60fps which may not be very accurate. You can use the second parameter in agk::SetSyncRate(60,1) to make it busy wait (loop continuously using 100% CPU) instead which will be more accurate.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 24th Oct 2011 10:37
is the sleep command not accurate or the get fps command?
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 24th Oct 2011 18:20
Sleep may be off in some cases, there is no requirement for the OS to wake up your app after the exact time that you gave it.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 25th Oct 2011 00:35
thanks for all info
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 25th Oct 2011 08:16
I don't know about other platforms but for Zune and Windows Phone Microsoft reccomends 30fps for the sake of battery life. 60 seems like overkill on a mobile device but then again I guess a lot of iOS games sit about there.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 25th Oct 2011 08:45
30fps is too little for action games. for puzzle type and thinking games 30fps is fine

Login to post a reply

Server time is: 2024-11-22 10:41:14
Your offset time is: 2024-11-22 10:41:14