Sarge
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > I am stupid - a public apology to Graf Zahl [GZDoom, movement and VSync]
 
Author
All times are GMT. The time now is 03:42. Post New Thread    Post A Reply
Phml
Forum Staple


Posts: 3460
Registered: 06-09


For years, I've bitched about movement in GZDoom being somewhat different than in vanilla Doom/Boom.

As I was typing a PM to someone about just that, the idea came to my mind VSync could be the source of my problems - no logical reason I'd think of this, except VSync has caused me many display related problems in other games; still, nothing like what I was experiencing in GZDoom. The idea just popped up like that.

Starting GZDoom, turning it off and on to compare... Definitely a change. Doing more controlled tests, moving the mouse from a particular point to another precise location, I could pinpoint where the difference was: noticeable input lag with VSync on. Movement itself was harder to check, but playing a few levels normally was enough to establish everything worked as it should with VSync off.

Sure enough, doing a google search for "VSync input lag" gives a crapton of results...

So, I was ignorant, and I was wrong. My apologies for giving you a hard time about this, Graf. You were correct, and if I had spent half as much time doing my research as I spent whining about this, I would have found the solution to this issue much earlier.

Old Post 08-20-12 00:09 #
Phml is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Arjak
Junior Member


Posts: 173
Registered: 08-07


Being able to admit when you're wrong is one of the hardest things to do as a human being and is representative of the height of maturity. Kudos. :)

Old Post 08-20-12 00:12 #
Arjak is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
entryway
Forum Staple


Posts: 2740
Registered: 01-04


Did you try this?

http://prboom-plus.sf.net/clip/2012-08-20_2.57.22.png

Old Post 08-20-12 01:01 #
entryway is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
schwerpunk
Senior Member


Posts: 2067
Registered: 05-12


Ah, Vsync. Probably the first setting I toggle when I'm having any problem with a PC game. It was very big of you to admit to an error, and on that note, you have my congratulations for being a generally cool person.

Protip: Paradoxically, turning Vsync on in Dead Space will make most PC gamers' mousing experience noticeably less laggy. So keep an eye out for that weird twist, fellow gamers. I'm sure Dead Space isn't the only exception.

entryway: What is that options screen from?

Old Post 08-20-12 01:15 #
schwerpunk is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
GreyGhost
I have a custom title now!


Posts: 8867
Registered: 01-08



schwerpunk said:
What is that options screen from?
NVIDIA Control Panel.

Old Post 08-20-12 01:59 #
GreyGhost is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
phi108
Member


Posts: 562
Registered: 03-08


Ah vsync, my eternal enemy.

Before Zdoom implemented Direct3d, and with it set to directdraw mode and 8 displaybits, and vsync on, it had that horrible stuttering on screen flashes, pickups and damage. Then it went to Direct3d, and the stuttering disappeared but there was too much input lag. Thankfully that's fixable with I think d3d_antilag or a Nvidia/Ati control panel settings now.

Strangely, I can turn on Vsync in GZdoom/GL games with no lag at all, it's Direct3D games that seem to give the most problems. I think that's true on both my Nvidia laptop and ATI desktop.

Old Post 08-20-12 02:37 #
phi108 is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Bloodshedder
Spellchecker


Posts: 5550
Registered: 03-02


http://www.anandtech.com/show/2794
http://www.anandtech.com/show/2803

Old Post 08-20-12 06:11 #
Bloodshedder is online now Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
Phml
Forum Staple


Posts: 3460
Registered: 06-09



Did you try this? [maximum pre-rendered frames to 1]


I just tried this (with and without forcing triple buffering to be on, which I assume is relevant as per Bloodshedder's links), no dice. I still get noticeable input lag as soon as I activate VSync in GZDoom - and it's still smooth and responsive as soon as I disable it.

Truth be told, I am happy as is. GZDoom now feels right, which is great, and the visual tearing with VSync off hasn't been pronounced enough for me to even notice so far.

Thanks for the info nonetheless. It's always good to be more informed... If nothing else, to avoid making bad forum posts. :)

Old Post 08-20-12 08:21 #
Phml is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
schwerpunk
Senior Member


Posts: 2067
Registered: 05-12



Bloodshedder said:
http://www.anandtech.com/show/2794
http://www.anandtech.com/show/2803

Just read the first article - great read. Going to experiment with triple buffering now.

Old Post 08-20-12 15:47 #
schwerpunk is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Graf Zahl
Why don't I have a custom title by now?!


Posts: 7793
Registered: 01-03


It's no surprise that the mouse may be more responsive with VSync off.
ZDoom reads the mouse every rendered frame, not just every tic.

Of course that's only the case if the mouse event interval in the driver is higher than the VSync'ed frame rate.

For my own mouse it's precisely the opposite. It sends less events than I get frames, even with VSync on, so it makes no difference at all whether I play with VSync on or off, except the screen tearing.

Old Post 08-23-12 18:23 #
Graf Zahl is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
Mike.Reiner
Senior Member


Posts: 1203
Registered: 01-05


Vsync causes horrible mouse lag for me, so I cap the frame rate at 120, twice the refresh rate of my monitor. Responsive, and I can't see the tearing. Best of both worlds I say.

Old Post 08-25-12 20:20 #
Mike.Reiner is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Use3D
Forum Legend


Posts: 4715
Registered: 04-02



Phml said:
For years, I've bitched about movement in GZDoom being somewhat different than in vanilla Doom/Boom.



You may be many things, but stupid isn't one of them. Maybe stubborn. :P

Also, this probably sounds dumb but would a ps2 mouse have this same kind of issue? Is it within (g)zdoom or the video driver?

Old Post 08-25-12 22:36 #
Use3D is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
DaniJ
Senior Member


Posts: 2148
Registered: 08-03


I wouldn't expect there to be a noticeable difference between PS2, USB or any form of wired mouse.

Something you might want to try if you have a more recent video card & driver are options such as "Adaptive VSync" or "Frame Target Sync" at driver level. Disable vsync in-game and use that option in your driver settings.

I've noticed that this typically does a much better job of maintaining a constant frame rate without introducing unnecessary input lag.

Old Post 08-26-12 00:36 #
DaniJ is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8910
Registered: 06-06


What is VSync anyway?

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 09-10-12 11:28 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Foxpup
Member


Posts: 315
Registered: 09-05



printz said:
What is VSync anyway?

Vertical synchronisation locks your frame rate to your monitor's vertical refresh rate, to avoid screen tearing when a frame is rendered during the refresh cycle. (Incidentally, vanilla Doom uses VSync too - its VGA display mode uses a refresh rate of 70 Hz, hence the fixed frame rate of 35 fps, though obviously this doesn't provide any benefit in an emulator such as DOSBox.) One well-known side effect of VSync is that, since it operates by slowing the game down to the required speed, it introduces lag to the controls. This problem is not specific to Doom, and affects most (all?) games that require precisely-timed inputs (first-person shooters especially).

Old Post 09-10-12 12:40 #
Foxpup is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
wesleyjohnson
Senior Member


Posts: 1068
Registered: 04-09


I expect that every port can differ on VSync because it is dependent upon the graphics library and double-buffering, and somewhat on the video hardware (how double-buffer transfer is done).

I would expect that you should not need VSync with:
- double-buffering because that also prevents tearing (but the buffer transfer to the video card must be on VSync)
- SDL because it inherently uses intermediate buffers and transfers with sync (just cannot predict exactly what it will do). Many options, many different ways to use it.
- DirectDraw I don't know, but probably similar to SDL. Apparently it internally stalls sometimes, waiting for sync.
- video cards that handle double buffer transfer in hardware (don't ask me which ones, I don't know).

The VSync switch side effects are port dependent and likely version dependent.
Usually stalls the engine waiting for sync, which also degrades responsiveness.

Would be interesting to know if any port does anything else for VSync besides stall the engine waiting for sync.

Also, with Vsync off, what might the port be doing to prevent video
tearing, as an alternative. Sometimes worse, sometimes better.

Last edited by wesleyjohnson on 09-11-12 at 23:08

Old Post 09-11-12 22:54 #
wesleyjohnson is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 03:42. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > I am stupid - a public apology to Graf Zahl [GZDoom, movement and VSync]

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.