I have searched the forums about timedelta () but no thread finished teaching me how to apply timedelta () correctly. In the end I figured it out for myself. For example increasing a “variable + = 5” in each frame:

variable += 5 * ( 60*timedelta() )

why? because timedelta is 1/60 = 0,0166666666666667. So 60 * timedelta = 1, just the expected value if the game is running at 60 fps. If for example the game is running at 30 fps: timedelta is 1/30 = 0,0333333333333333. So 60 * timedelta = 2, just the expected value if the game is running at 30 fps.

1/60fps = 0,0166666666666667 = timedelta()
variable += 5 * ( 60*timedelta() ) = 5

1/30fps = 0,0333333333333333 = timedelta()
variable += 5 * ( 60*timedelta() ) = 10

1/15fps = 0,0666666666666667 = timedelta()
variable += 5 * ( 60*timedelta() ) = 20

1/5fps = 0,2 = timedelta()
variable += 5 * ( 60*timedelta() ) = 60

Well I just want to know if I’m using it well like this. If so, then I hope it helps someone because it was hard for me to understand.

For the most part this looks correct. Time Delta is exactly as it is described in the expression builder, which is: The amount of time (in seconds) that has passed since the last frame rendered.

So your game’s framerate will directly impact timedelta, as less frames per second means more time per frame.