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 / [SOLVED] Vsync Issue

Author
Message
Nieb
9
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 30th Jun 2017 21:12 Edited at: 3rd Jul 2017 16:59
In the last few releases I've noticed tearing while in fullscreen on windows 7 or 10 with vsync active.
Only shows in fullscreen, windowed mode there is no problem. Even if the window is maximized.
It's always in the same spot for me, about a quarter of the way down from the top of the screen.

Setup
CPU: Intel 3930K
GPU: Nvidia GTX 560ti & Nvidia GTX 1080
OS: Windows 7 & 10


VSync Test Project Here!

The author of this post has marked a post as an answer.

Go to answer

Lucas Tiridath
AGK Developer
15
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 30th Jun 2017 21:33
I get an awful lot of screen tearing in fullscreen too, but I kind of thought it might be an issue with my monitor. I'd be very interested to hear what other people's experience is though. I can't say I get the same amount of tearing in other games I play, so I did wonder if there was something going on with AGK.

I'm running an RX 480 here, and my monitor is an ASUS MX279.
Ian Rees
AGK Developer
11
Years of Service
User Offline
Joined: 3rd May 2012
Location: Wales, UK
Posted: 2nd Jul 2017 21:24
I am also experiencing this issue. Exactly as mentioned, in windowed mode there is no problem at all, any size, any state; full screen mode there is screen tearing, just below half way down the screen for me.

I don't have issues with other games either.

Dell Inspiron 17-7779 (Windows 10 Pro)
GPU - NVIDIA GeForce 940MX
E
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 2nd Jul 2017 21:31
Quote: "In the last few releases I've noticed tearing while in fullscreen on windows 7 or 10 with vsync active.
Only shows in fullscreen, windowed mode there is no problem. Even if the window is maximized.
It's always in the same spot for me, about a quarter of the way down from the top of the screen."

same, windows 10 with i5 CPU and AMD R9 GPU here
life\'s one big game
spec= 2.6ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
Lucas Tiridath
AGK Developer
15
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 2nd Jul 2017 22:12
I'm seeing the same issue on Linux, although I am dual booting on the same machine (RX480, ASUS MX279), so that doesn't eliminate the possibility of hardware problems. However on Linux, I'm getting the tearing in both windowed and fullscreen.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 3rd Jul 2017 10:15
Can you post some example code that highlights the issue?
Nieb
9
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 3rd Jul 2017 16:54 Edited at: 3rd Jul 2017 16:56
Test project attached.
Press SPACE to toggle Full-Screen.

Motion Sickness Warning!

Attachments

Login to view attachments
Ian Rees
AGK Developer
11
Years of Service
User Offline
Joined: 3rd May 2012
Location: Wales, UK
Posted: 3rd Jul 2017 18:09
Demonstrates the issue perfectly! Thanks Nieb.

To confirm, I get the tearing issue with your example - in full screen only.
E
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 7th Jul 2017 01:43
I've had screen tearing in fullscreen since day 1 of AppGameKit and no native solution.
Search the forums for this and see the history of this years old issue.

As it turns out for me, my monitor refreshes as 59.9Hz at 1440p and I get tearing. This moves up the screen from the bottom at an equivalent speed of 0.1Hz, so it's clear that the refresh rate in vSync is 60Hz.

What it should do on Windows is query the monitor refresh, but I highly suspect it's hard set to 60Hz because of mobile targeting.

If I select a lower resolution which refreshes at 60Hz, I don't get tear.

I also did some tests by setting the refresh rate manually to 59Hz which works on my monitor, but not on anyone else's.
Damn my IIYAMA monitor However, we really should have refresh rates on PC inheritable from the monitor driver's settings in windows.

nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 7th Jul 2017 01:47
As an addendum to the above, I don't use VSync() any more. I would advocate the use of TBM (timer based movement) which eliminates the issue.

I only develop for windows, so I don't really need the VSync() benefits, but I do give options to the player to select either method.
Nieb
9
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 23rd Jul 2017 23:00
Just tried out AppGameKit 2017.07.19, the fullscreen vsync issue is still present.
Any word on this from the developers?
Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 25th Jul 2017 12:38
I use SetVSync(1) for testing and SetSyncRate(0, 0) for release on Windows.
SetSyncRate(0, 0) works much better and smoother for any case, it just loads the CPU much...
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 25th Jul 2017 13:28
I have the same issue in fullscreen, however, my line of tear slowly moves downwards while the program is running.
13/0
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 25th Jul 2017 21:37
This post has been marked by the post author as the answer.
Thanks, fixed for the next version.
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 25th Jul 2017 23:55
Quote: "I have the same issue in fullscreen, however, my line of tear slowly moves downwards while the program is running.
"

Sounds like my issue. I bet your monitor is refreshing at 59.9 as well. I'm assuming the fix Paul is to read the monitor refresh rate from Windows?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 26th Jul 2017 01:18
Quote: "I bet your monitor is refreshing at 59.9 as well"

That sounds like an OpenGL issue, we set a flag in OpenGL that enables VSync, which should itself read the monitor refresh rate. The fix in the next version is only to activate VSync properly when in fullscreen mode.
Nieb
9
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 26th Jul 2017 17:54
Thank you for the update Paul!
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 27th Jul 2017 00:30
Well, the tear creep takes the right amount of time (~10 seconds) to traverse the whole screen.

I don't know what activate vsync properly means, but if it fixes this years old issue, then I'm all for it.

In my other threads, I was sure I confirmed this because my monitor only goes into 59.9Hz refresh rate in 1440p and I get the slow tear, but in any other mode, e.g. 1080p it is fine because it uses 60Hz.
Stephen Elliott
6
Years of Service
User Offline
Joined: 31st Jul 2017
Location:
Posted: 11th Aug 2017 16:40
Great news this will be fixed.

I'm new here so what is the usual AppGameKit Update Procedure? Wait until there are enough bug fixes/updates? Is there a standard update time (once a month/every 6 months)?
MikeHart
AGK Bronze Backer
20
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 11th Aug 2017 22:21 Edited at: 11th Aug 2017 22:21
There is no standard update procedure from what I have experienced. But updates came out between 14 days and 2 months this year.

The Whats new section in the docs show when the updates came out in 2017 and what was fixed/added.
Running Windows 7 Home, 64 bit, 8 GB ram, Athlon II X2 255, ATI Radeon HD 4200. Using AGK2 Tier 1.
Stephen Elliott
6
Years of Service
User Offline
Joined: 31st Jul 2017
Location:
Posted: 14th Aug 2017 10:08
Thanks Mike.
Stephen Elliott
6
Years of Service
User Offline
Joined: 31st Jul 2017
Location:
Posted: 17th Aug 2017 11:28
Fixed in latest version. Thanks guys!
greenworm
6
Years of Service
User Offline
Joined: 5th Jul 2017
Location:
Posted: 12th Sep 2017 20:22
this has to be a bug in fullscreen mode, I have this issue only when using SetWindowSize(x,y,1) 1 being fullscreen. Is this going to be fixed? It's kinda holding me back from releasing on windows.
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 13th Sep 2017 11:14
it should be fixed in the new version (seems to be for me), double check you're using the newest release of agk
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 16th Sep 2017 02:19
Ian Rees
AGK Developer
11
Years of Service
User Offline
Joined: 3rd May 2012
Location: Wales, UK
Posted: 18th Sep 2017 15:08
It is better but I am still seeing some tearing in fullscreen on my laptop.
E
MegaSloth
6
Years of Service
User Offline
Joined: 19th Sep 2017
Location:
Posted: 27th Sep 2017 13:57
I still see a lot of screen tearing in fullscreen. I don't believe this has been fully fixed yet unfortunately.
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 27th Sep 2017 18:02
Quote: "I still see a lot of screen tearing in fullscreen. I don't believe this has been fully fixed yet unfortunately."

if you're not already then make sure you're using SetVSync(1) rather than trying to set a frame rate with SetSyncRate() (by default it's set to SetSyncRate(30) which can cause tearing in full screen).
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu
MegaSloth
6
Years of Service
User Offline
Joined: 19th Sep 2017
Location:
Posted: 27th Sep 2017 22:18
Quote: "if you're not already then make sure you're using SetVSync(1) rather than trying to set a frame rate with SetSyncRate() (by default it's set to SetSyncRate(30) which can cause tearing in full screen)."


Thanks. This is already how I have my code setup and unfortunately its still the same result.

When I run the app on my laptop I have no issue, but when I run it on an external monitor the tearing is there. The monitor refresh rate is 60, and the FPS reported is pretty 60 but it still tears. Judging by what nZ0 and Ian are saying and what Im seeing this issue isn't 100% fixed.
MikeHart
AGK Bronze Backer
20
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 28th Sep 2017 05:09
I am experience that too again with the new version. Will go back and check if it was the same with older versions.
Running Windows 7 Home, 64 bit, 8 GB ram, Athlon II X2 255, ATI Radeon HD 4200. Using AGK2 Tier 1.

Login to post a reply

Server time is: 2024-04-23 16:05:14
Your offset time is: 2024-04-23 16:05:14