Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Phml

I am stupid - a public apology to Graf Zahl [GZDoom, movement and VSync]

Recommended Posts

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.

Share this post


Link to post

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. :)

Share this post


Link to post

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?

Share this post


Link to post

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.

Share this post


Link to post

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. :)

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post
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?

Share this post


Link to post

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.

Share this post


Link to post
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).

Share this post


Link to post

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.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×