Stuttery turning movement with cl_capfps on at 70hz + vsync
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Stuttery turning movement with cl_capfps on at 70hz + vsync
Vanilla Doom (35fps) would normally set the monitor's refresh to 70hz and even though there was ghosting, the left-right turning movement was perfectly smooth. For some odd reason this doesn't seem to work properly in ZDoom, at least for me. What gives?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Stuttery turning movement with cl_capfps on at 70hz + vs
The timer runs in millisecond resolution. But 1/35 seconds are ~28.5 milliseconds so the game actually runs a bit faster because a tic can only be measured in full milliseconds. With a 70Hz display the difference is so small that it becomes noticable as stuttering.
Doom originally used the vertical sync of the graphics card to time the game so such problems could not surface. But that's no longer doable with modern operating systems.
Doom originally used the vertical sync of the graphics card to time the game so such problems could not surface. But that's no longer doable with modern operating systems.
Re: Stuttery turning movement with cl_capfps on at 70hz + vs
I think there's more to this than meets the eye.
Every windows source port outputting 35fps does exhibit some degree of stuttering at 70khz, because normally it really isn't a perfect 70khz, and here's where it gets interesting. In other ports, said stuttering occurs every few seconds, however, in ZDoom we're talking about once per second.
In order to circumvent the 69.8-70.2 problem, I came up with a custom timing which's exactly 70.000000000000000khz (yes, that's 15 0's after 70.), and at this degree of precision, the stuttering is effectively gone as long as vsync is on and framerate stays a solid 35.
In the case of prBoom+ and Chocolate Doom, it works flawlessly, no more stuttering, it simply does not happen anymore. However, ZDoom (and also Eternity, just for the record) continue to stutter bad.
Basically stuttering can be successfully suppressed in other ports so it has to be something ZDoom isn't doing efficiently enough.
Every windows source port outputting 35fps does exhibit some degree of stuttering at 70khz, because normally it really isn't a perfect 70khz, and here's where it gets interesting. In other ports, said stuttering occurs every few seconds, however, in ZDoom we're talking about once per second.
In order to circumvent the 69.8-70.2 problem, I came up with a custom timing which's exactly 70.000000000000000khz (yes, that's 15 0's after 70.), and at this degree of precision, the stuttering is effectively gone as long as vsync is on and framerate stays a solid 35.
In the case of prBoom+ and Chocolate Doom, it works flawlessly, no more stuttering, it simply does not happen anymore. However, ZDoom (and also Eternity, just for the record) continue to stutter bad.
Basically stuttering can be successfully suppressed in other ports so it has to be something ZDoom isn't doing efficiently enough.
- Project Shadowcat
- Posts: 9369
- Joined: Thu Jul 14, 2005 8:33 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: Blacksburg, SC USA
- Contact:
Re: Stuttery turning movement with cl_capfps on at 70hz + vs
But I bet that you didn't know that it's not a perfect 35tic per second. Isn't it closer to 35.725 or something like that? [citation needed]
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Stuttery turning movement with cl_capfps on at 70hz + vs
Mathematically, pretty much...Project Dark Fox wrote:But I bet that you didn't know that it's not a perfect 35tic per second. Isn't it closer to 35.725 or something like that?
1000 / 35 = 28.5714
1000 / 28 = 35.7142
Re: Stuttery turning movement with cl_capfps on at 70hz + vs
If it were closer to 35.725, then a perfect 70khz would be more stuttery than something like 70.2khz, and obviously this isn't the case. What am I missing here?