October 17, 2019, 05:40:51 PM

Author Topic: VSYNC issues  (Read 825 times)

Offline Kris

  • Jr. Member
  • **
  • Posts: 71
VSYNC issues
« on: June 05, 2019, 07:27:46 PM »
Hey Guys,

Playing around with AGK Classic v2019.05.22 on my Win7 laptop and experiencing screen tearing both in windowed and fullscreen mode. Most examples produce this and I tried to use both SetVSync() and SetSyncRate() in codes they were not present, but didn't make too much difference. I found a topic about this bug from 2017 on TheGameCreator's forum and it seems the bugfix never really solved this issue or just came back in later versions? Do you guys experience the same with current AGK Classic?

https://forum.thegamecreators.com/thread/219910

Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 2044
Re: VSYNC issues
« Reply #1 on: June 05, 2019, 07:46:07 PM »
Myself and others have had problems with Vsync on AGK.  The problem I had last was that even though my monitor refresh was 75hz, it would sync at 60hz.  This has been fixed in AGK Studio.  The AGK guys seem to be putting all their efforts into Studio.

The code I use:
Code: [Select]
SetSyncRate( 0, 1 ) // max sync rate
SetVSync( 1 ) // turn on vsync
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.1, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
Raspbian Buster, pi4 4Gb RAM,1.5Ghz

Offline Kris

  • Jr. Member
  • **
  • Posts: 71
Re: VSYNC issues
« Reply #2 on: June 06, 2019, 03:32:57 AM »
Thanks Steve! AGK Studio it is...I guess.





Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 2044
Re: VSYNC issues
« Reply #3 on: June 06, 2019, 08:39:44 AM »
np.  Bug fixes and a much nicer IDE with AGK Studio.
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.1, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
Raspbian Buster, pi4 4Gb RAM,1.5Ghz

Offline Kris

  • Jr. Member
  • **
  • Posts: 71
Re: VSYNC issues
« Reply #4 on: August 01, 2019, 06:51:35 AM »
OK, problem solved! So I had this VSYNC issue where the program didn't want to sync to the refresh rate no matter what command I used. So here is the deal. In the GPU settings VSYNC was not allowed. You might ask why didn't I check that first? Because test programs I made with PureBasic synced just fine. So I thought it was enabled. How could PureBasic sync? I guess it could overwrite the settings and AGK couldn't...? Whatever the reason is if one app can sync and another cannot it's better to check the video card settings just to make sure.

Offline Pfaber11

  • Sr. Member
  • ****
  • Posts: 355
    • FABERSGAMES
Re: VSYNC issue [solved]
« Reply #5 on: August 11, 2019, 03:48:31 PM »
That's very interesting and nice to know. I intend to be using classic for some time yet as my computer is not vulkan compatible . Hopefully AGK classic will be looked after and supported  for some time to come .
Celeron N3060 1.6 ghz duel core  4 Gb ram 32 gig storage  HD400 Graphics 160 gig external hard drive....

Offline Rick Nasher

  • Hero Member
  • *****
  • Posts: 783
Re: VSYNC issue [solved]
« Reply #6 on: August 16, 2019, 04:03:58 PM »
Ok, new experiments..

Experiment I:
1. In NVIDIA Control panel, set my default driver to NVIDIA (has Intel HD too, but no difference regarding fps though).
2. While there, also set vSync to "On" in here also. (default was "Use the 3D application setting")
3. Speed test(Studio version) again.

Results:
With AGK vSync on: still 30fps.
With AGK vSync off(thus forcing the vSync on the NVIDIA defaults): 60fps!

*Hmm makes me think it really doesn't do what it should.



Experiment II:
1. In NVIDIA Control panel, set vSync to "Off".
2. Speed test again.

Results:
With AGK vSync on: 60fps.
With AGK vSync off: ~350fps.

*That is more what I expected with the default NVIDIA vSync-setting on "Use the 3D application setting". Looks like a communications error to me.



Question on the table is now:
Could it be that AGK isn't reading the GPU settings properly or that NVIDIA driver is screwing up not reading the AGK app settings properly??
(dunno how it works behind the scenes)
_______________________________________
 B3D + physics + shaders + X-platform = AGK!
:D ..ALIENBREED *LIVES* (thanks to Qube).. :D
_______________________________________

Offline c0d3r9

  • Full Member
  • ***
  • Posts: 143
Re: VSYNC issue [solved]
« Reply #7 on: August 16, 2019, 07:19:43 PM »
Did you mean the FPS inside Studio?
Laptop: Win10@64bit - i3 2x2Ghz - 8GB Ram - 1TB HDD
Desktop: Win10@64bit - AMD Ryzen 5 2400G - MSI B450 Tomahawk - 8GB Ram - 240GB SSD

Offline Rick Nasher

  • Hero Member
  • *****
  • Posts: 783
Re: VSYNC issue [solved]
« Reply #8 on: August 16, 2019, 07:59:19 PM »
Fps in Qube's speed test program ran in AGK studio.
_______________________________________
 B3D + physics + shaders + X-platform = AGK!
:D ..ALIENBREED *LIVES* (thanks to Qube).. :D
_______________________________________

Offline c0d3r9

  • Full Member
  • ***
  • Posts: 143
Re: VSYNC issue [solved]
« Reply #9 on: August 16, 2019, 08:36:34 PM »
Okay.In the driver settings i let the apps decide for vsync on or off.
But no problems so far.

But i see in the Studio settings for the IDE is something weird. Switch between 30fps/60fps/vsync/fullspeed here and there it works not always.
As example if i switch from 30fps to vsync it doesn´t sync with 60fps.
We both don´t know what is under the hood.
Laptop: Win10@64bit - i3 2x2Ghz - 8GB Ram - 1TB HDD
Desktop: Win10@64bit - AMD Ryzen 5 2400G - MSI B450 Tomahawk - 8GB Ram - 240GB SSD

Offline Rick Nasher

  • Hero Member
  • *****
  • Posts: 783
Re: VSYNC issue [solved]
« Reply #10 on: August 18, 2019, 12:55:18 PM »
Yep, AGK's ways are mysterious..  :P
I've posted the test results on AGK Studio forums under Qube's thread: https://forum.thegamecreators.com/thread/224808?page=2#msg2647629

Hope it helps (and gets noticed of course).


BTW: Dunno why this is declared "Solved", for it certainly isn't solved on my machine. Unless, I really never fully understood vSync or so.
_______________________________________
 B3D + physics + shaders + X-platform = AGK!
:D ..ALIENBREED *LIVES* (thanks to Qube).. :D
_______________________________________

Offline Kris

  • Jr. Member
  • **
  • Posts: 71
Re: VSYNC issue [solved]
« Reply #11 on: August 19, 2019, 05:10:28 AM »
BTW: Dunno why this is declared "Solved", for it certainly isn't solved on my machine. Unless, I really never fully understood vSync or so.

Well I thought my (the original) vsync issue was solved via the graphics card settings. But hey! I removed the "solved" part so we can continue to discuss all vsync issues in AGK.

I can't wait to see how the tests will behave with the upcoming new (bug fix) version of both AGK Classic and Studio Paul mentioned in the topic Qube started over at the GameCreator's forum.

Offline Kris

  • Jr. Member
  • **
  • Posts: 71
Re: VSYNC issues
« Reply #12 on: August 19, 2019, 02:37:16 PM »
Another thing that came to my mind. I experienced many times that windows does not recover properly from standby mode. Don't have too much experience with Win10 but experienced many times with XP/Win7/Win8. So when scrolling gets jerky a fresh reboot might be a good practice just so we can exclude this form of graphics driver issue from the list of possible causes on windows machines during testing. Just my two cents.

 8)

Offline Rick Nasher

  • Hero Member
  • *****
  • Posts: 783
Re: VSYNC issues
« Reply #13 on: August 20, 2019, 07:24:18 PM »
Yep, I use hibernate most of the time, however I've tested this after a reboot which doesn't change a thing in regards to the vSync fps issues.
_______________________________________
 B3D + physics + shaders + X-platform = AGK!
:D ..ALIENBREED *LIVES* (thanks to Qube).. :D
_______________________________________