Jitter when creating images in love.load

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
wilco
Prole
Posts: 11
Joined: Sun Jun 21, 2020 8:51 am

Re: Jitter when creating images in love.load

Post 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.
User avatar
pgimeno
Party member
Posts: 3637
Joined: Sun Oct 18, 2015 2:58 pm

Re: Jitter when creating images in love.load

Post 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.
wilco
Prole
Posts: 11
Joined: Sun Jun 21, 2020 8:51 am

Re: Jitter when creating images in love.load

Post 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.
User avatar
pgimeno
Party member
Posts: 3637
Joined: Sun Oct 18, 2015 2:58 pm

Re: Jitter when creating images in love.load

Post by pgimeno »

I'm afraid so.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 2 guests