Page 2 of 2

Re: Pixel art smooth scrolling how?

Posted: Wed Jul 27, 2022 11:08 pm
by pgimeno
zorg wrote: Wed Jul 27, 2022 2:38 pm Indeed, box2d, as far as i remember, does expect fixed timestep updates.
That's new to me.

Re: Pixel art smooth scrolling how?

Posted: Thu Jul 28, 2022 9:02 am
by marclurr
Seems I may have been wrong, Box2D doesn't implement a fixed timestep update internally.

In case anyone is interested, I did find another interesting site which shows an example implementation of a fixed update with interpolation to handle the remaining time in the accumulator. In my head the interpolation step was much more complicated than this. https://www.unagames.com/blog/daniele/2 ... tion-box2d

Re: Pixel art smooth scrolling how?

Posted: Thu Jul 28, 2022 10:24 am
by MrFariator
Re: Box2d and fixed timestep.
As far as I know, Box2d doesn't necessarily expect fixed timestep. Rather, it's just the various ways in which physics may start to feel inconsistent, harder to debug, or any other number of other things if the delta between updates fluctuates a bunch, or even worse, has huge spikes. As such, the often spread conventional wisdom is to update physics with fixed steps, potentially with some additional considerations if physics steps themselves start to take a bunch of time.