See all glossary termsIn game development, delta time is the time that passed since the last frame. It's a decimal number that represents the time between two frames.
If your game runs at 60 frames per second, delta will be approximately 1/60
or 0.01666666666666667
seconds.
Delta time is not always constant. It can vary depending on the game's performance, how many things are happening at the same time. It may also vary because of external factors, like other applications being open on the computer. If we could ensure delta time was constant, it would be a global variable; but because it can change on each frame cycle, it is passed as a parameter to the _process()
and _physics_process()
functions in Godot.
Delta time is crucial for making your game framerate-independent. If you use delta time in your game's logic, your game will run at the same speed regardless of the framerate.See Also
Related terms in the Glossary
school.gdquest.com - 0.3.5-2024-11-14T22:16:40.217Z-