Turbo mode is a feature in Scratch that runs projects much faster than normal by removing some artificial script delays. To activate it, hold ⇧ Shift and click the green flag. Do this again to deactivate turbo mode. Another way to turn on turbo mode is to press See Inside, press Edit, then "Turn on Turbo Mode". This is the only way to turn on turbo mode on mobile.

orange lightning
A picture of the icon that appears when turbo mode is enabled.

Projects that might use turbo mode include, but are not limited to:

Behavior

Scratch maintains a list of running threads (essentially scripts). By default, Scratch steps through the threads once every frame, targeting 30 FPS. This is most noticeable with loop blocks, which iterate once every frame. Turbo mode allows the threads to run multiple times per frame, if there is available time.[1] The result is that many projects will run much faster.

Problems

Turbo mode affects the whole project which may conflict with scripts that rely on the frame rate for timing. Animations for example may move faster than desired. One solution is to add wait blocks to slow the scripts down.

However, turbo mode is largely redundant[citation needed] due to the custom block "run without screen refresh" setting, which provides localized control over whether it should run without delay. Instead of enabling turbo mode, scripts that should run without delay can be placed under custom block definitions.

Detection

Main article: Detecting Turbo Mode

Normally, switching the backdrop 10 times will take more than 0.1 seconds. When turbo mode is on, switching the backdrop 10 times will take less time. This can be used to detect if turbo mode is on.

when green flag clicked
reset timer
repeat (10)
    switch backdrop to (please wait v)
end
if <(timer) > [0.1]> then
    switch backdrop to (please use turbo mode v)
    stop [all v] // or run some other code
end
switch backdrop to (Turbo mode detected! v)

See Also

References

Cookies help us deliver our services. By using our services, you agree to our use of cookies.