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 / Why only 30 FPS?

Author
Message
MikeHart
AGK Bronze Backer
21
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 21st Dec 2016 19:18
In a test game, I get around 100 FPS when VSync is off. When I turn it on, I get only 30 FPS.
My monitors refresh rate is 60 or 70 I think. So I should get 60 or 70, but not 30.
I know that OpenGL halfs the framerate when it can't reach the max refresh rate when you do a vsync.

Do you know why it would go down that bad?
Running Windows 7 Home, 64 bit, 8 GB ram, Athlon II X2 255, ATI Radeon HD 4200. Using AGK2 Tier 1.
damothegreat
User Banned
Posted: 21st Dec 2016 21:54
graphics card capabilities??
Using Tier 1 AppGameKit V2
Started coding with AMOS
Anything is possible if put mind to it
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 21st Dec 2016 23:27
Make sure you don't have an override set up in your graphics driver software. I left something set in my Nvidia control panel once and spent ages on a similar problem.

There's also the chance that your original 100 fps isn't calculated correctly.
Some monitors / drivers also refresh differently at different resolutions.

Finally, try deprecating some routines until the frame rate lifts / vsync works.
damothegreat
User Banned
Posted: 21st Dec 2016 23:31
I.E

In a main synch loop - calling a

CreateSprite
CloneSprite

or
too many embedded loops before the Sync() will siginificantly drop FPS

In your main loop, always try and make your code one frame at a time

Unsure how - we can teach you

Damo
Using Tier 1 AppGameKit V2
Started coding with AMOS
Anything is possible if put mind to it
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 21st Dec 2016 23:34
maybe try setsyncrate()
Kevin Picone
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 21st Dec 2016 23:39

you might also have an extra sync hidden away in your main loop.

PlayBASIC To HTML5/WEB - Convert PlayBASIC To Machine Code
damothegreat
User Banned
Posted: 22nd Dec 2016 00:21
e.g

whats wrong with this



Try and fix it

Damo
Using Tier 1 AppGameKit V2
Started coding with AMOS
Anything is possible if put mind to it
MikeHart
AGK Bronze Backer
21
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 22nd Dec 2016 06:27 Edited at: 22nd Dec 2016 06:30
I am talking about a bare bones project with no content at all.
The one that is created when you open a new project.

And I see this behaviour when I switch vsync on and off.

EDIT: I found the error. SetSyncRate is in there. Doooh.
Running Windows 7 Home, 64 bit, 8 GB ram, Athlon II X2 255, ATI Radeon HD 4200. Using AGK2 Tier 1.
CumQuaT
AGK Master
14
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 22nd Dec 2016 13:19
Occam's razor strikes again!

Login to post a reply

Server time is: 2024-11-24 22:46:55
Your offset time is: 2024-11-24 22:46:55