I have mice looking and walking in my game, but they are very
slow and hard to use. I think it's because I'm using fixed
speed. I heard that in big projects developers use delta time.
How do I calculate delta time in glut? How do I calculate speed
using delta time? The "delta time" used to be the time elapsed
between two frame updates (but it can also be used in other
contexts; this is usually the result of a time subtraction). You
can get the delta time in glut using the glutGet method and the
GLUT_ELAPSED_TIME parameter, plus some operations. So if you
register the current timeSinceStart at each rendering loop, you
can know the deltaTime by subtracting the old one to the new
one. Basically, you can use deltaTime to update your movements
in ratio to this elapsed time instead of using a fixed time
value. This way, the movement speed of your character should be
almost the same if your program runs at 60 fps or if it runs at
10 fps. This way, whether your program updated 2 times or 100
times, 1 second later the