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 / (Bug) SetSyncRate is broken

Author
Message
brunuu
2
Years of Service
User Offline
Joined: 4th Jun 2018
Location:
Posted: 19th Aug 2020 11:21 Edited at: 19th Aug 2020 13:10
SetSyncRate is broken and I think it always was, but nobody noticed.
Originally I thought it happened rarely, that it was a random problem.

SetSyncRate is unable to maintain the frame rate, for example if it is at 60 fps, it actually marks 50, and if it is 30 it will score 25

But if the mouse is outside the game window and if the mouse is moving, in some cases the game gets the desired frame rate, but only with the mouse outside the window but the window needs to be focused.

I recorded the bug
https://streamable.com/ejit27

However it doesn't always work that way, so test 4 programs, AppGameKit IDE, Atom, Word, VS Code
https://streamable.com/8wlesd

And then I tried AAA games that would use the pc harder. And setsyncrate works
Therefore setsyncrate only works if the computer is in a process with something that makes greater use of the Cpu.


Having web browsers open in the background or minimized also results in the same, if you close them all the framerate drops. Except Chrome for some reason. This is most notable with Opera.

There are more topics out there about this problem, but nobody noticed what caused it.
https://forum.thegamecreators.com/thread/223642
https://forum.thegamecreators.com/thread/213210
https://forum.thegamecreators.com/thread/218409
brunuu
2
Years of Service
User Offline
Joined: 4th Jun 2018
Location:
Posted: 20th Aug 2020 15:13 Edited at: 20th Aug 2020 15:14
Same thing on AppGameKit Studio, I tested it in the trial version
PSY
Valued Member
4
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 20th Aug 2020 20:04
https://forum.thegamecreators.com/thread/226669

I noticed that, too. It's really annoying


PSY LABS Games
Coders don't die, they just gosub without return
brunuu
2
Years of Service
User Offline
Joined: 4th Jun 2018
Location:
Posted: 20th Aug 2020 22:01
Yes it is, especially when the game depends a lot on movement or physics and the frame rate above 60 changes the speed of the sprites a lot, and it is necessary to spend some time adapting the game with movement by timer and ect because of the Vsync which can be greater than 60Hz.
SFSW
18
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 20th Aug 2020 22:13
As noted, this has been reported several times and will hopefully be fixed in an update soon.

On a related note, you should never rely on a target/locked framerate anyway. Everything needs to be based on a timer, so object/sprite movements, animations, and rotations always move at a consistent rate regardless of whether the framerate is 25, 50, 60, or 120+. You should expect and account for your game running at different speeds on different devices and system configurations.
brunuu
2
Years of Service
User Offline
Joined: 4th Jun 2018
Location:
Posted: 20th Aug 2020 22:33 Edited at: 20th Aug 2020 22:34
The problem is the physics of the sprites, they are a bit complicated to free from the frame rate.
brunuu
2
Years of Service
User Offline
Joined: 4th Jun 2018
Location:
Posted: 24th Aug 2020 17:38
I found out that SetVsync has the same problem, but it is under different conditions. If it is a laptop, and if the game has full screen and if the PC is in battery saving mode.
It only happens if you have it in full-screen.

Login to post a reply

Server time is: 2020-10-22 02:05:40
Your offset time is: 2020-10-22 02:05:40