Should I use Delta Time?

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.
Post Reply
User avatar
cymansap
Prole
Posts: 5
Joined: Mon Feb 26, 2018 1:04 am
Contact:

Should I use Delta Time?

Post by cymansap »

I'm rewriting my base code. In my previous love2d projects i have used dt because everyone says you should, but I'm starting to question it's usefulness. I cap all of my games to 60fps because that's the max refresh rate on most monitors and you can't tell me i need more than that for simple 2d games. Unless you're using the latest toaster technology, you will never be dipping below 60fps with my stuff. So my question is, if I'm running on a fixed timestep anyway, what is the usefulness of multiplying by dt? I always hear that it should be used, but I've yet to see a compelling argument. I'm curious. Why do you or do you not use dt?
User avatar
Tjakka5
Party member
Posts: 243
Joined: Thu Dec 26, 2013 12:17 pm

Re: Should I use Delta Time?

Post by Tjakka5 »

As someone with a 144hz monitor, I'd appreciate the game not to be capped at 60 FPS ;)

However, if you're certain your game will run 60fps at all times, theres no point in using delta time (Though I'd still suggest you learn how to work with it.)
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Should I use Delta Time?

Post by zorg »

It's not only toasters that may have issues; consider one of your users having a powerhouse of a rig, and for one reason or other, either disables vsync because they force that setting, or that the gpu drivers are shit, and it's buggy so it won't use it: Now your game runs at light speed for them.

Using dt isn't hard; if you want to have determinism in your code, feel free to use an accumulator and a fixed timestep USING dt.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
Luke100000
Party member
Posts: 232
Joined: Mon Jul 22, 2013 9:17 am
Location: Austria
Contact:

Re: Should I use Delta Time?

Post by Luke100000 »

If the game runs slowly (~30 FPS instead of 60), because it's loading something for example, the game will slow down if you don't use dt.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 78 guests