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 / FPS 60 changes to 144 when running on a 144 Hz monitor

Author
Message
Jo Bach
9
Years of Service
User Offline
Joined: 22nd Dec 2014
Location:
Posted: 16th Apr 2016 08:38
Hi all,

Just upgraded my pc and monitor .

When I compiling and running an app with AGK2 it happens that the FPS goes up to 144 Hz on my 144 Hz monitor while the Sync rate was set to 60 like this: SetSyncRate(60,0).

When I change the sync rate from 60 to 59, 61, 30, 40, etc then the SyncRate happens to be resp 59, 61 , 30 , 40 , etc. on the 144 Hz monitor.

Somebody (maybe a develloper) kown what this could be the 60 fps takes over the 144 Hz of the monitor?

(If I want to run it on 60, I can set it to 61 for example, but that is not the way it is ment to be?).

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Apr 2016 09:51
Paul mentioned in another thread that FPS 60 actually means "screen refresh rate". You need to use 59 or 61 to make it behave correctly.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 16th Apr 2016 10:56
That's confusing.
Perhaps it would be better if screen refresh rate could be set with a -1 parameter instead? Leaving 60 to mean 60.
AGK V2 user - Tier 1 (mostly)
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 16th Apr 2016 18:20
That's strange. Should really only happen with vsync on. Not when manually setting the sync rate.
Jo Bach
9
Years of Service
User Offline
Joined: 22nd Dec 2014
Location:
Posted: 16th Apr 2016 21:25
When I turn Vsync on, it wil permanently run als 144fps, no matter what i use in the SetSyncRate
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 16th Apr 2016 22:28
With vsync you should get FPS equal to your monitor's refresh rate. That's supposed to happen. I don't get why sync rate 60 does the same thing.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Apr 2016 23:36
I wish I could find the post from Paul. I've probably described it wrongly, but it was definitely an issue with 60FPS.
Maybe manually setting it to 60FPS would be enough?

Sync Rate is a float, so you could use 59.999
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 17th Apr 2016 08:58
BatVink:
You are probaly correct about it. I think I recall the post from Paul. My point is that I don't get why it works like that. We have a vsync command, why make sync rate 60 do the same thing and not what it's supposed to do?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd Apr 2016 14:37
You are correct that SetSyncRate(60,0) actually uses VSync instead. It's a bit of a hack on my part, since VSync is the preferred way to handle the refresh rate, but before that we had been recommending SetSyncRate(60,0). So when we introduced the VSync command all our previous advice would now be turning off VSync, so we made it use VSync for that particular value.

This is something I want to fix but I'm not sure how it will affect existing projects, I'll change it for the next version and see what happens. From now on SetSyncRate with any value will turn off VSync and use your value. Using SetVSync(1) will override your sync rate and turn on VSync.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 22nd Apr 2016 16:36
Paul:
That's how it should work. I've had to make changes in my code because things works differently now. It's not that big of a deal. It's better that commands work as expected.

Login to post a reply

Server time is: 2024-09-29 13:23:26
Your offset time is: 2024-09-29 13:23:26