[SOLVED] Weird screen lag/tear/flicker when moving layer/camera

Here is a small video showing the problem - https://www.youtube.com/watch?v=K_BwkB_keRU

I wanted to move the player around these slightly large rooms (600x600 each) most of which have walls which are Sprites. I used the follow method and I also setup a camera - both work as expected; but the problem that you see in the video happens when I start in fullscreen(or toggle into fullscreen).

I’m hoping that I’ve made some silly error and missed something, but at the moment I’m stumped. Any help would be greatly appreciated :slight_smile:

I was not able to do a screen capture with obs as my fps dropped to around ~22 and hence the video. As you can see, that there is no frame drop when I move the orb around.

I’ve started a clean new project. Tiled the background sprite ten times, added a new sprite that the player can control using the keyboard and then added the ability to toggle fullscreen by pressing the enter key. If someone can just copy paste and test it, it would be great - https://gist.github.com/yadurajiv/86432f64b448b96880fbeb015673042a

Maybe I wasted the whole day on nothing. I have two graphics cards on my laptop - one integrated and one dedicated. If I manually run the program on the dedicated card, the flicker is no longer there -_-

Video showing flicker missing on the dedicated card - https://www.youtube.com/watch?v=LrOEYtUKeh8

In between I tried to do the same using a render target and moving layers - https://gist.github.com/yadurajiv/7daa81df43a2cc872269135b7f4d154a

Your problem same like here 2d "camera" follow target looks ugly
Ideal solution for all platforms will be fixed timestep and interpolation. Also filter for camera movement, like smoothDamp in unity…

Thanks, I think this was a weird graphics card bug… but I’ll do check out the fixed time step. Smoothing didn’t quite help it, but it made the camera less sticky, so that is something :slight_smile: