ScratchData LogoScratchData
Back to minion_roblox's profile

Delta time test

MIminion_roblox•Created April 9, 2025
Delta time test
0
0
1 views
View on Scratch

Instructions

Use TurboWarp with custom FPS (advanced tab) to test it: https://turbowarp.org/1159492292 Wikipeda article: https://en.wikipedia.org/wiki/Delta_timing Why delta time? Delta time controls how fast calculations (e.g. physics) update. This prevents fast movements in game. How it works? Delta time is calculated by calculating elapsed time from the last frame. On 60 FPS, this is usually 0,016 seconds, on higher FPS, this number decreases, while on lower - increases. Then, movements and pretty much all calculations are calculated by multiplying default speed with delta time. Example: We have a constant speed of 100 units. At 30 FPS, the following speed will be: 100 * 0,032 = 3,2 units per second This is the speed which our character on example will move each frame. Now let's take a look at 60 FPS (2x faster than 30 FPS): 100 * 0,016 = 1,6 As we can see, the speed per frame decreased. Now let's compare everything. We know that 60 FPS is 2x faster than 30 FPS, so let's multiply 60 FPS speed by 2: 1,6 * 2 = 3,2 As you can see, we got the same speed as in 30 FPS (well, multiplied). Delta time is a powerful technique and is used by many games and game engines. So simple to implement, but so powerful in practice.

Description

Feel free to implement this in your games.

Project Details

Project ID1159492292
CreatedApril 9, 2025
Last ModifiedApril 9, 2025
SharedApril 9, 2025
Visibilityvisible
CommentsAllowed