My problem is, that "wait until running" does not seem to work. When the program enters it first, everything is fine. But when the program leaves the "repeat until not running" loop and again comes to "wait until running" the browser (Firefox) produces a high load. When I open the URL "about:processes" I can see that the Snap tab eats 50% CPU. My expectation was that it should do nothing, because it should wait for a keyboard input.
Instead it's checking the value of a variable. It has to keep checking, in case (as you in fact expect) some other script changes the variable's value.
Imho the surprising thing is that it works better the first time!
Silver brick has a "generic when", for every clone, 60 times a second.
Pixel perfect collision detection is quite resource intensive. For the Ball you use a much more effective strategy - first check the bounding box and/or the pixel perfect.
Well, actually, the FOR is still running. I don't know how big SPEED is, so I don't know how important that it. But maybe you want a CATCH/THROW to short-circuit that case.
And then, the REPEAT UNTIL is still running, although only the test part, not the WARP. It shouldn't use up the entire CPU, though; it should test once per clock tick, when it's that script's turn to run. I think.
i feel like the 50% cpu thing kinda got glossed over. the wait block only checks a variable once per frame. it really shouldn't be eating cpu like that? there's clearly still some kind of snap bug here.