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.
Love2d Timestep and keypress (with repeat) not updating correctly?
-
- Prole
- Posts: 14
- Joined: Fri Jan 22, 2016 3:25 am
Re: Love2d Timestep and keypress (with repeat) not updating correctly?
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?
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.)
(It would help if you shared the code you have so we don't have to guess what's wrong.)
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
"If each mistake being made is a new one, then progress is being made."
-
- Prole
- Posts: 14
- Joined: Fri Jan 22, 2016 3:25 am
Re: Love2d Timestep and keypress (with repeat) not updating correctly?
Ahhh good call, it was the vSync. Even at a 30 tick rate it wasn't working, but now it does, thanks!
Who is online
Users browsing this forum: No registered users and 0 guests