Page 2 of 2

Re: Jitter when creating images in love.load

Posted: Mon Jun 22, 2020 4:57 pm
by wilco
pgimeno wrote: Sun Jun 21, 2020 7:03 pm If you want perfect scrolling with a nearest filter, you have no choice but to scroll at a speed which is an exact multiple of the monitor's refresh rate, and ignore dt. Otherwise there will inevitably be jitter.
To achieve this you would probably use a fixed time step?

I was thinking about that my self (implementing a fixed time step) and did a small test yesterday evening, runs really really smooth... as long as the monitor refresh rate is 60 Hz, if not you will start having problems again where occasionally frames are rendered twice or skipped.

Re: Jitter when creating images in love.load

Posted: Mon Jun 22, 2020 8:28 pm
by pgimeno
wilco wrote: Mon Jun 22, 2020 4:57 pm To achieve this you would probably use a fixed time step?
Kinda, you can think of it as a fixed time step and a scroll speed which, multiplied by the time step, gives you an integer value.
wilco wrote: Mon Jun 22, 2020 4:57 pm I was thinking about that my self (implementing a fixed time step) and did a small test yesterday evening, runs really really smooth... as long as the monitor refresh rate is 60 Hz, if not you will start having problems again where occasionally frames are rendered twice or skipped.
No, not actually. What will happen is that in modes with a refresh rate other than 60 Hz, the game will run at a different speed.

I didn't mean it as something practical. What I meant is that the only option to make it smooth is to make it for a specific monitor refresh rate. I'm aware that's not really an option; I was implying that it's just not possible to get a smooth scroll and at the same time make it work at any refresh rate.

Re: Jitter when creating images in love.load

Posted: Tue Jun 23, 2020 7:30 am
by wilco
pgimeno wrote: Mon Jun 22, 2020 8:28 pm I was implying that it's just not possible to get a smooth scroll and at the same time make it work at any refresh rate.
Ok got it :)
Basically, if I want 100% smooth scrolling that always works on any refresh rate, I will have more luck with the linear image filtering at the cost of a somewhat blurry image.

Re: Jitter when creating images in love.load

Posted: Tue Jun 23, 2020 10:31 am
by pgimeno
I'm afraid so.