Discuss Scratch

TheCreatorOfUnTV
Scratcher
1000+ posts

Run without screen refresh workaround

I am looking for a workaround to “run without screen refresh” because of Scratch 1.4, which lacks the feature. However, the only solution seems to be to duplicate the code or turn on turbo mode - which is a big problem. First of all, turbo mode cannot be turned on programmatically - it has to be done manually by the player. For the other solution, duplicating the code is easy, but there are 2 problems:
1. It causes there to be MUCH less space if you need to run something many times - you need 500 blocks to run 5 blocks 100 times. If a script is too large, you could start running into issues while unshared, never mind sharing it!
2. It is very hard to run something a variable number of times - the only way to do it is checking and stopping a script if a condition is true, duplicate the blocks a bunch of times and run it in a forever loop.

I tried using broadcasts to do it, however there were some major problems which made it practically useless.
broadcast [ v] // The script only goes on the last time when you broadcast multiple times.
broadcast [ v] and wait // Runs a screen refresh when done which is exactly what I am trying to avoid.

I want to know if there is any solution to these problems or not, and if so, what it is.
Catscratcher07
Scratcher
1000+ posts

Run without screen refresh workaround

Unless I'm missing something, why can't you use
 
repeat ()

end
.
Also, why do you care about 1.4 compatibility.

TheCreatorOfUnTV
Scratcher
1000+ posts

Run without screen refresh workaround

Catscratcher07 wrote:

Unless I'm missing something, why can't you use
repeat ()

end
Because that refreshes the screen without Turbo Mode, which makes the project unnecessarily and extremely slow, because it's sometimes hard for someone to understand what is happening when the block does it instantly.

Catscratcher07 wrote:

Also, why do you care about 1.4 compatibility.
I'm planning to push the limits of Scratch 1.4, and this is the one major obstacle I need to get across which I haven't seen a workaround for yet.

Last edited by TheCreatorOfUnTV (Aug. 31, 2024 17:58:55)

Catscratcher07
Scratcher
1000+ posts

Run without screen refresh workaround

TheCreatorOfUnTV wrote:

Catscratcher07 wrote:

Unless I'm missing something, why can't you use
repeat ()

end
Because that refreshes the screen without Turbo Mode, which makes the project unnecessarily and extremely slow, because it's sometimes hard for someone to understand what is happening when the block does it instantly.

Catscratcher07 wrote:

Also, why do you care about 1.4 compatibility.
I'm planning to push the limits of Scratch 1.4, and this is the one major obstacle I need to get across which I haven't seen a workaround for yet.
doesn't 1.4 have the all at once C-block?

edit: add me to the Scratchers getting bamboozled by Scratch 1.4 compilation.

Last edited by Catscratcher07 (Aug. 31, 2024 18:28:51)

TheCreatorOfUnTV
Scratcher
1000+ posts

Run without screen refresh workaround

Catscratcher07 wrote:

TheCreatorOfUnTV wrote:

Catscratcher07 wrote:

Unless I'm missing something, why can't you use
repeat ()

end
Because that refreshes the screen without Turbo Mode, which makes the project unnecessarily and extremely slow, because it's sometimes hard for someone to understand what is happening when the block does it instantly.

Catscratcher07 wrote:

Also, why do you care about 1.4 compatibility.
I'm planning to push the limits of Scratch 1.4, and this is the one major obstacle I need to get across which I haven't seen a workaround for yet.
doesn't 1.4 have the all at once C-block?
No, that's from the 2.0 beta.
souleymane2
Scratcher
100+ posts

Run without screen refresh workaround

Hey there,

Heres some code I wrote that allows you to loop through up to 50 items (nearly) instantly whilst only causing 1 screen refresh: https://scratch.mit.edu/projects/1061873667/

Hope this helps!
TheCreatorOfUnTV
Scratcher
1000+ posts

Run without screen refresh workaround

souleymane2 wrote:

Hey there,

Heres some code I wrote that allows you to loop through up to 50 items (nearly) instantly whilst only causing 1 screen refresh: https://scratch.mit.edu/projects/1061873667/

Hope this helps!
That would work…but there's no clones in Scratch 1.4, so it didn't work.
SpyCoderX
Scratcher
1000+ posts

Run without screen refresh workaround

Ideas:

Make a block run itself by putting that block at the end of the block.

Make multiple sprites which all run a broadcast many times per frame. Then, in another sprite, run some code in that broadcast. The code should be run many times in the same frame.
TheCreatorOfUnTV
Scratcher
1000+ posts

Run without screen refresh workaround

SpyCoderX wrote:

Ideas:

Make a block run itself by putting that block at the end of the block.

Make multiple sprites which all run a broadcast many times per frame. Then, in another sprite, run some code in that broadcast. The code should be run many times in the same frame.
That sadly didn't work…it doesn't run without screen refresh, unless you duplicate the code, which has the problems I listed in the original post.
SpyCoderX
Scratcher
1000+ posts

Run without screen refresh workaround

TheCreatorOfUnTV wrote:

SpyCoderX wrote:

Ideas:

Make a block run itself by putting that block at the end of the block.

Make multiple sprites which all run a broadcast many times per frame. Then, in another sprite, run some code in that broadcast. The code should be run many times in the same frame.
That sadly didn't work…it doesn't run without screen refresh, unless you duplicate the code, which has the problems I listed in the original post.
Oof. Idk then
sorry
TheCreatorOfUnTV
Scratcher
1000+ posts

Run without screen refresh workaround

Bump

Powered by DjangoBB