Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » What does turbo mode mean?
- CatsUnited
-
1000+ posts
What does turbo mode mean?
It runs projects very quickly by increasing the speed of things like mathematical functions. Just shift-click the green flag.
- TheLogFather
-
1000+ posts
What does turbo mode mean?
@CatsUnited: turbo mode doesn't increase the speed of any blocks - all blocks are always run at the same (full) speed.
But what it does do is no longer always tell Flash to perform a screen refresh when Scratch has finished a pass through all currently running loops. (And ‘loops’ here includes internal loops within a ‘wait’ block.) Instead, it only allows the refresh after a certain amount of time has passed.
That means a stack of blocks without a loop will run the same speed regardless of turbo mode on or off. Turbo mode only affects loops (including how often ‘wait’ blocks check if they need to stop waiting).
Even more specifically, it only affects loops where there has been an update to the screen during a pass of the currently running loops. That means, for example, turbo mode will have very little effect when running a project which contains only the following script:
However, try running the project after adding a second script with a loop that looks like this:
Now switch on turbo, then run the project again, and see the difference…
What happens with turbo on is that Scratch no longer tells Flash to refresh the screen after it has done a pass of each loop. Instead, it only does that once a certain time has passed (nearly reached 1/30th sec since last refresh). This means it runs many more times through those loops within each 1/30th second refresh.
(As a further experiment, see what happens if you remove the motion block from the second loop - you'll see it goes back to running both loops at ‘turbo-like’ speed, so turbo mode makes no significant difference again…)
Hope that helps explain it!
(Sorry if it seems a bit of a long and rambling explanation… it's worth reading through it carefully and slowly, and trying out the scripts, to get the gist of what I'm saying…)
But what it does do is no longer always tell Flash to perform a screen refresh when Scratch has finished a pass through all currently running loops. (And ‘loops’ here includes internal loops within a ‘wait’ block.) Instead, it only allows the refresh after a certain amount of time has passed.
That means a stack of blocks without a loop will run the same speed regardless of turbo mode on or off. Turbo mode only affects loops (including how often ‘wait’ blocks check if they need to stop waiting).
Even more specifically, it only affects loops where there has been an update to the screen during a pass of the currently running loops. That means, for example, turbo mode will have very little effect when running a project which contains only the following script:
when GF clickedWhen you click green-flag, you can see how far “count” gets to in three seconds. Try it several times with or without turbo mode, and you'll see it makes little difference.
set [count v] to [0]
reset timer
repeat until ((timer)>[3]) // see how far it counts in three seconds
change [count v] by (1)
end
stop [all v]
However, try running the project after adding a second script with a loop that looks like this:
when GF clickedNow when you click green-flag (make sure Turbo is OFF first of all), both loops are started, and Scratch keeps the loops running at the same rate. After Scratch has done a single pass through both loops, it knows there has been a potential change to what's on the screen this time (because of the motion block in the second loop). So Scratch tells Flash to update the screen after each time it does a pass through both loops. The Flash refresh rate for Scratch is set at 30fps, which means that is the speed the loops now run - so “count” will end up at roughly 90 (three seconds at 30fps).
forever
go to x: (0) y: (0)
end
Now switch on turbo, then run the project again, and see the difference…
What happens with turbo on is that Scratch no longer tells Flash to refresh the screen after it has done a pass of each loop. Instead, it only does that once a certain time has passed (nearly reached 1/30th sec since last refresh). This means it runs many more times through those loops within each 1/30th second refresh.
(As a further experiment, see what happens if you remove the motion block from the second loop - you'll see it goes back to running both loops at ‘turbo-like’ speed, so turbo mode makes no significant difference again…)
Hope that helps explain it!
(Sorry if it seems a bit of a long and rambling explanation… it's worth reading through it carefully and slowly, and trying out the scripts, to get the gist of what I'm saying…)
Last edited by TheLogFather (Oct. 20, 2015 11:23:23)
- PrincessPanda_test_
-
1000+ posts
What does turbo mode mean?
In a nutshell, it makes your projects fast as Sonic.
- gdpr533f604550b2f20900645890
-
1000+ posts
What does turbo mode mean?
Turbo mode is a feature that speeds up projects, and is useful when making slow projects such as raytracers render quicker.
Turbo mode gives a project a Kanohi Kakama (For every Sonic post you do, i'll do a BIONICLE one).
Why do most of your posts have to do with Sonic? I don't think the OP wants that answer. In a nutshell, it makes your projects fast as Sonic.
Turbo mode gives a project a Kanohi Kakama (For every Sonic post you do, i'll do a BIONICLE one).
- ScratchTheCat9999
-
21 posts
What does turbo mode mean?
when green flag clicked
forever
move (10) steps
end
Try this script on turbo and regular. Look at the difference.
- gamebeater187
-
1000+ posts
What does turbo mode mean?
Okay someone necroposted(both of us)when green flag clicked
forever
move (10) steps
end
Try this script on turbo and regular. Look at the difference.
Without turbo mode is slower, and turbo mode is usual speed. It is this way so new scratchers won't complain how fast it is. Also they would both jump really fast in both as of naked eye.
when green flag clickedthis you can see the difference.
forever
move (10) steps
turn cw (90) degrees
end
Last edited by gamebeater187 (April 22, 2016 00:13:00)
- gamebeater187
-
1000+ posts
What does turbo mode mean?
Guys, no reply has been made for a long time. somewun plz close it
- matmario
-
34 posts
What does turbo mode mean?
it makes the animation faster Idk what it is
but, if a sprite waits a second, it doesn't wait less
- gamebeater187
-
1000+ posts
What does turbo mode mean?
do not necropostit makes the animation faster Idk what it is
but, if a sprite waits a second, it doesn't wait less
- jeffthelandshrk
-
18 posts
What does turbo mode mean?
Turbo mode is a feature that speeds up projects, and is useful when making slow projects such as raytracers render quicker.Why do most of your posts have to do with Sonic? I don't think the OP wants that answer. In a nutshell, it makes your projects fast as Sonic.
Turbo mode gives a project a Kanohi Kakama (For every Sonic post you do, i'll do a BIONICLE one).
what is a raytracer?
- Discussion Forums
- » Questions about Scratch
-
» What does turbo mode mean?