Discuss Scratch
- Discussion Forums
- » Project Ideas
- » 30 FPS Limit Explanation
- KinitoPETlol
-
Scratcher
8 posts
30 FPS Limit Explanation
30 FPS Limit Explanation
In the coding engine “Scratch”, the engine can only run on 30 FPS. This is because the motion and look blocks force Scratch to pause and wait about 33 milliseconds for a screen update, capping the FPS to 30.
Is there a bypass?
The official way to “bypass” the limit is to click the green flag while holding shift to activate “Turbo Mode”, then pressing the green flag without holding shift to start the project. This will make the scripts run as fast as possible, but it will still not bypass the 30 FPS limit. The only unofficial way to actually bypass the limit is to go to TurboWarp, load the project from the original Scratch ID or a .sb3 file, and then click “Advanced” at the top left. There, you can adjust the FPS to whatever amount you want.
Can I play any game with TurboWarp’s bypass?
Usually, yes. But it will make the project faster than intended. This happens because when changing the FPS to a higher value, the code will update faster than Scratch time, AKA 30 FPS. So, for example, if the project has a “move 10 steps” block, then it will run to 10 steps per frame. But if we change that cap to, let’s say 60, then it will now run at 20 steps per frame, since we doubled the FPS. This will happen with any amount of FPS you change it to.
Is there a fix to that?
Yes, but it would be a little complicated to do on projects. Instead of just using “move (10) steps”, we can make 2 variables called “delta time” and “last time”, then do this in order:
https://scratch.mit.edu/projects/1369055480/editor
Made by Juan Mesa (KinitoPETlol, Juanchis231)
In the coding engine “Scratch”, the engine can only run on 30 FPS. This is because the motion and look blocks force Scratch to pause and wait about 33 milliseconds for a screen update, capping the FPS to 30.
Is there a bypass?
The official way to “bypass” the limit is to click the green flag while holding shift to activate “Turbo Mode”, then pressing the green flag without holding shift to start the project. This will make the scripts run as fast as possible, but it will still not bypass the 30 FPS limit. The only unofficial way to actually bypass the limit is to go to TurboWarp, load the project from the original Scratch ID or a .sb3 file, and then click “Advanced” at the top left. There, you can adjust the FPS to whatever amount you want.
Can I play any game with TurboWarp’s bypass?
Usually, yes. But it will make the project faster than intended. This happens because when changing the FPS to a higher value, the code will update faster than Scratch time, AKA 30 FPS. So, for example, if the project has a “move 10 steps” block, then it will run to 10 steps per frame. But if we change that cap to, let’s say 60, then it will now run at 20 steps per frame, since we doubled the FPS. This will happen with any amount of FPS you change it to.
Is there a fix to that?
Yes, but it would be a little complicated to do on projects. Instead of just using “move (10) steps”, we can make 2 variables called “delta time” and “last time”, then do this in order:
- Reset Timer
Set (last time) to
Forever
Set (delta time) to { - (last time)}
Set (last time) to
Then update the “move (10) steps” to “move {(5)*{(delta time) * (30)}}”
https://scratch.mit.edu/projects/1369055480/editor
Made by Juan Mesa (KinitoPETlol, Juanchis231)
- Discussion Forums
- » Project Ideas
-
» 30 FPS Limit Explanation