Page 2 of 2

Re: Love2d Timestep and keypress (with repeat) not updating correctly?

Posted: Mon Apr 30, 2018 3:24 am
by ivan
Looks ok. Just set your tick rate to a reasonable value like at least 10ms per tick and you'll be fine.
Another thing you should consider is vsync.
I'm not 100% sure, but love.graphics might have to "busywait" for vsync in your case (since you're calling love.draw by hand).
Perhaps somebody with more knowledge of love.graphics can confirm.

Re: Love2d Timestep and keypress (with repeat) not updating correctly?

Posted: Sun Feb 20, 2022 12:15 am
by m0nkeybl1tz
Sorry to dig up an old thread, but I'm trying to implement some physics in my game and I think a fixed timestep might help, however when I add this to my main.lua file it completely tanks the framerate. Is there something I'm doing wrong?

Re: Love2d Timestep and keypress (with repeat) not updating correctly?

Posted: Sun Feb 20, 2022 2:09 am
by ReFreezed
As ivan said above, make sure the tick rate isn't unreasonably fast. And disable vsync.

(It would help if you shared the code you have so we don't have to guess what's wrong.)

Re: Love2d Timestep and keypress (with repeat) not updating correctly?

Posted: Sun Feb 20, 2022 5:01 pm
by m0nkeybl1tz
Ahhh good call, it was the vSync. Even at a 30 tick rate it wasn't working, but now it does, thanks!