Quantcast
Channel: Question and Answer » game-loop
Viewing all articles
Browse latest Browse all 30

Delta time not accurate enough

$
0
0

In my game i have a delta timer based almost exactly on the page from here

http://wiki.lwjgl.org/index.php?title=LWJGL_Basics_4_%28Timing%29

But if the the main loop is fast enough, my delta time variable is 0. This causes problems because it often happens several times in a row.
I don’t want to force a frame cap either. How can I remedy this?
EDIT: Setting a frame cap works, it only happens when the frame isn’t capped. I’ve set delta to a minimum of 1, but that doesn’t make it smooth. I could add a delay of one if it’s zero, but that only fixes it for the next frame.


Viewing all articles
Browse latest Browse all 30

Trending Articles