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 v2 FPS stuck at 50 FPS o.O !!

Author
Message
Abhishek
11
Years of Service
User Offline
Joined: 17th Aug 2013
Location:
Posted: 8th Jan 2015 05:22
I am using agk v2
So I was getting low FPS on another project. Thought my code had too much "fat" on it causing low FPS. Trimmed it but no change.
So to test I wrote a code bellow.

// Project: test
// Created: 2015-01-08

// set window properties
SetWindowTitle( "test" )
SetWindowSize( 1024, 768, 0 )

// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )



do

SetSyncRate(60,1)

Print( ScreenFPS() )
Sync()
loop


Still no change in the FPS still stuck on 50 FPS. And no this is not the buggy display where AppGameKit v2 could be at 60 FPS showing 50 FPS. It is stuck at 50 FPS. Even the compliled code to apk shows 50 FPS.

Any ideas ?
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 8th Jan 2015 07:53 Edited at: 8th Jan 2015 08:54
Hi, you need to take the SetSyncRate-statement out of your loop. It only needs to be set once, at the start of your program.
haliop_New
User Banned
Posted: 8th Jan 2015 09:39
you can also use SetSyncRate(0,0) to get much higher values.
Abhishek
11
Years of Service
User Offline
Joined: 17th Aug 2013
Location:
Posted: 9th Jan 2015 00:29
Type guys ...sorry too that was a mistype. the SetSyncRate(60,1) is out of the loop not in it. And forgot to mention that it happening on a tablet not PC. using the AppGameKit v2 APP. Even the complied code to .apk is doing the same on the tablet
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 9th Jan 2015 13:03
Turn VSync off and try again.

Onwards and sometimes upwards
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 9th Jan 2015 13:43
50fps should be plenty adequate for a tablet. Maybe the graphics on the tab are locked to wait for the verticle blank? Can you change the graphics settings in the OS?

SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 10th Jan 2015 01:25 Edited at: 10th Jan 2015 01:31
i noticed this with blackberry... it plugs in at 59 er 58ish when you ask for 60.

chances are you will need to jackup the rate to 120 and control it with a timer based delay back down to 60. (this is a last resort if the vsync on is not pulling 60.

here is a beter question. Do you experience screen tearing at 50fps?

if not then thats probably what your hardware is set to. for blackberry its a completely different story. vsync does not work with bb and you are forced to pull it to 120 and drag it down to 60 using a timer delayed refresh to get rid of screen tearing. I think the system clock runs at a different rate and thats why it doesnt work. I think Paul seems to believe it works fine the way it is for bb but i can tell you right now that it doesnt....it tears every second.

what kinda tablet you running?

www.sheldonscreations.com
haliop_New
User Banned
Posted: 10th Jan 2015 06:02
have you also considered implanting TIMER BASED MOVEMENT ?
cause you cant know for sure how it will run on different devices one tablet is hardly enough for testing (thats the real truth , sorry for that)
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 10th Jan 2015 10:35
I store GetFrameTime() into a float and use that to multiply all movements and timers. So my game runs the same regardless of FPS. Doesn't work if you are making a physics game though.

The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 10th Jan 2015 10:40
Quote: " Doesn't work if you are making a physics game though."


If you are making a physics game, you don't need to implement timer based movement, the physics engine does that automatically

Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 10th Jan 2015 10:42
Quote: "If you are making a physics game, you don't need to implement timer based movement, the physics engine does that automatically"


Unless I missed when this was fixed, the physics reacts differently depending on the FPS. So making a physics game would require a fixed FPS.

CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 12th Jan 2015 02:53
According to the documentation, StepPhysics is automatically updated upon each Sync with the last frame time, so in theory it should behave regardless of frame rate.

Login to post a reply

Server time is: 2024-11-25 15:47:55
Your offset time is: 2024-11-25 15:47:55