🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Inconsistent visual jitter, even when watching a recording

Started by
3 comments, last by Net_ 3 years, 10 months ago

Hey, sorry for the baby question. I'm sure it's been answered a million times, but I'm having a hell of a time finding a post with the exact same issue. If there is one, feel free to point me at it.

I'm rendering through SDL2's renderer, which is defaulting to direct3d on windows. I'm running my simulation at a fixed timestep that's less than my render rate. My render is lerping between the last 2 sim updates at a fixed rate. Standard stuff.

I'm seeing inconsistent jitter, which I've spent a few days trying to track down in the code. There are things that I can do which make it better or worse, but I can never fully get it to go away. Today, I took a recording and noticed that the jitter is inconsistent even while replaying the same recording. Sometimes it hitches at a fixed rate, sometimes it's jittery the whole time, sometimes it's almost smooth.

Hopefully you can see it through multiple watches of the video like I can. I tried enabling vsync through SDL2's renderer flag, but that didn't do anything.

What's going on? I can provide specific details of my code if desired, but I figure this might be a “this happens all the time, here's what to do” kind of thing.

Advertisement

So you're saying that playing that same video is sometimes smooth, and sometimes jittery? If so, then that's not a problem with your game. That's a problem with either the video (unlikely), your playback software (also unlikely), or your computer (very likely).

a light breeze said:

So you're saying that playing that same video is sometimes smooth, and sometimes jittery? If so, then that's not a problem with your game. That's a problem with either the video (unlikely), your playback software (also unlikely), or your computer (very likely).

Well, the video is 60fps as is my game, so I imagine there's some interaction between my monitor, the pace at which the character moves, and the framerate. It is pretty weird though, I can't imagine what it could be. I've tried it on 60hz and 144hz monitors.

I've seen mention of process priority in windows causing jitter, maybe I'll look into that more.

Looks like Godot heavily ran into this: https://github.com/godotengine/godot/issues/25162​​

There's all sorts of things to try, from fullscreen to process priority to using the windows compositor for vsync. Also seems like it might go away as the app gets more render-heavy.

For me, it seems to go away in fullscreen. I'm going to look into the compositor thing also, but otherwise not worry about it until later because of what someone said:

My opinion is that we need to stop the stutter test with the "Simple project" (testing if a sprite moving in screen stutters) because this stutter is gone when the project becomes more expensive for the CPU and the GPU

This topic is closed to new replies.

Advertisement