Page 1 of 1
Stuttery turning movement with cl_capfps on at 70hz + vsync
Posted: Sat Sep 04, 2010 4:30 am
by Guest
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?
Re: Stuttery turning movement with cl_capfps on at 70hz + vs
Posted: Wed Nov 03, 2010 5:49 pm
by Graf Zahl
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.
Re: Stuttery turning movement with cl_capfps on at 70hz + vs
Posted: Sat Nov 20, 2010 10:26 am
by Guest
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.
Re: Stuttery turning movement with cl_capfps on at 70hz + vs
Posted: Sat Nov 20, 2010 2:21 pm
by Project Shadowcat
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]
Re: Stuttery turning movement with cl_capfps on at 70hz + vs
Posted: Sat Nov 20, 2010 2:23 pm
by NeuralStunner
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?
Mathematically, pretty much...
1000 / 35 = 28.5714
1000 / 28 = 35.7142
Re: Stuttery turning movement with cl_capfps on at 70hz + vs
Posted: Sat Nov 20, 2010 2:53 pm
by Guest
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?