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 / For what reason can the FPS fall?

Author
Message
metamorpho
8
Years of Service
User Offline
Joined: 17th Oct 2016
Location: Planet Earth
Posted: 21st May 2019 17:01
I start the game for the first time FPS = 59.
I quit the game and run it again. FPS drops to 31.
For what reason can the FPS fall?
metamorpho
8
Years of Service
User Offline
Joined: 17th Oct 2016
Location: Planet Earth
Posted: 21st May 2019 17:52

The game starts with the following parameters:

SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
SetSyncRate(60,1)
SetScissor( 0,0,1024,768)
SetVSync(1)

Here's another strange effect: I start the game first with FPS = 31, then I make several movements with the main character and after a few seconds, FPS = 57.
For what reason could it be?
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 21st May 2019 18:29
background tasks, recording software, geforce settings, physics issues, loading large files into the game... could be lots of things - does it happen for every project or just this one?
life's one big game
spec= i5 4ghz, 16gb ram, Nvidia 1070ti gpu
metamorpho
8
Years of Service
User Offline
Joined: 17th Oct 2016
Location: Planet Earth
Posted: 21st May 2019 19:15
This is my first project at the AppGameKit, I have no other projects at the AppGameKit, so there is nothing to compare with.
At the beginning of the game about 47 MB of graphics and music is loaded.
For AGC under the Windows 47 MB platform, is this a lot or normal?
PSY
Developer
8
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 24th May 2019 06:24
Quote: "
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
SetSyncRate(60,1)
SetScissor( 0,0,1024,768)
SetVSync(1)"


Using SetVSync(1) will override any sync rate set with SetSyncRate


Quote: "
For AGC under the Windows 47 MB platform, is this a lot or normal?"


That really depends on the game


Quote: "
Here's another strange effect: I start the game first with FPS = 31, then I make several movements with the main character and after a few seconds, FPS = 57.
For what reason could it be?"


Need to see some more code to find the issue.
One reason for FPS drops during the first 10 secs of code are overlays like NVidia Share.
They kick in when the resolution is set, which will make your FPS drop, but vanish some seconds after, and your FPS will jump up again


PSY LABS Games
Coders don't die, they just gosub without return
metamorpho
8
Years of Service
User Offline
Joined: 17th Oct 2016
Location: Planet Earth
Posted: 24th May 2019 09:24
PSY, thank !!
I removed the command SetVSync(1) and the problem with FPS disappeared.
PeterPotamus
7
Years of Service
User Offline
Joined: 19th Apr 2017
Location: The Netherlands
Posted: 24th May 2019 13:59 Edited at: 24th May 2019 14:03
Hi Metamorpho,

Have you tried setting the SyncRate to zero?

Like this: SetSyncRate(0,1)


I looked it up for you in the documentation, just click the link.
metamorpho
8
Years of Service
User Offline
Joined: 17th Oct 2016
Location: Planet Earth
Posted: 24th May 2019 18:07
PeterPotamus, thank !!
Yes, I tried to set the mode SetSyncRate (0,1) - it works faster, but FPS jumps it is unstable. On SetSyncRate (60,1) - FPS jumps less as a result, the speed is more stable - that's what I need.

Login to post a reply

Server time is: 2024-11-22 21:29:22
Your offset time is: 2024-11-22 21:29:22