-
Notifications
You must be signed in to change notification settings - Fork 118
Stuttering when running at reduced gamespeed #471
Comments
This has already been reverted by this commit: Could you please check again from a recent snapshot? I don't experience any stuttering at any game speed. |
I did try this with 2.6.2, then bisected to that commit. The changelog had me already raise an eyebrow. The #421 kind of stuttering is eversoslightly different. Here [220MB] is a screencapture of my experience, on 2.6.2, with some cyberdemon being displayed erratic. Perhaps as a result of repeated speedshifting, there's a loss of accuracy somewhere? |
Do you have uncapped framerate and/or vsync enabled? |
|
Hm, I can only say that the game runs butter smooth with these settings for me, even at reduced game speed. |
Do you reduce the game speed in the menu and restart the engine or do you change it in-game with the "change game speed keys"? |
In-game with mousewheel and/or with a set of keys, yes. |
Could you try to set it in the menu (General, second page), restart the engine and try again? |
The issue resets between program restarts. When the game has reached a state where jaggy motion is noticable, loading a savestate though retains the problem. A hypothesis out of the blue is that there's some time/tick counter… and indeed it is. I created a testcase at https://github.com/jengelh/prboom-plus/tree/testcase . Start prboom with a gamespeed of 50 (no need to ever change it in game) and play. This overflows:
t being 1560000 ms * 35 * 50 -> 2.73*10^9, which is no longer representable with int, and in practice wraps around to become -1564967296. |
) When the program has run for about 26 minutes and SDL_GetTicks has accrued a reasonably large value, multiplication by realtic_clock_rate overflows "int" on contemporary platforms, manifesting in jagged motion. Fixes: v2.6.1um-29-ga7bafe07 Closes #471
Regression introduced by
when running at 60% gamespeed and other some other rates, I get stuttering on Linux-X11-SDL.
System is openSUSE Tumbleweed x86_64 with libSDL2-2_0-0-2.0.20-1.1.x86_64, Mesa-21.3.5-300.2.x86_64, libdrm_intel1-2.4.109-1.2.x86_64, and uncapped in-game framerate.
(Commit prior to d6f2545 runs just fine at all gamespeeds with the same config.)
The text was updated successfully, but these errors were encountered: