Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how to optimize in scratch 3.0 to avoid lag
- Pandadude12321
-
76 posts
how to optimize in scratch 3.0 to avoid lag
I've barely used scratch since 3.0 and need to know how to reduce lag, my PC is far from powerful, but my project is lagging like fallout 76 on the Atari 2600, and i could have sworn it wasn't near as bad for projects of the same intensity in 2.0. I know the transition from flash to HTML would be rough at first, but this is ridiculous, am i doing something wrong, or does scratch 3.0 really have this much lag?
here is the project: https://scratch.mit.edu/projects/320467838/editor/
on my PC this project barely responds at all, if I've done something to cause major lag, please let me know what it is
thanks in advance
here is the project: https://scratch.mit.edu/projects/320467838/editor/
on my PC this project barely responds at all, if I've done something to cause major lag, please let me know what it is
thanks in advance

- DD-8861
-
100+ posts
how to optimize in scratch 3.0 to avoid lag
The lag is coming from your own block
Just right click on that block and press edit. Then where it says ‘run without screen refresh’ make sure that box is NOT checked.
This is causing the lag because when you select it to run without screen refresh, that means that the define block will run all of the code under it before doing anything else (mainly, refreshing whatever is supposed to be shown on your screen). Since you put in a loop that waits until the hp < 0.1 , it is going to try stop your computer from doing anything until you finish that repeat loop by clicking 3 times.
Just right click on that block and press edit. Then where it says ‘run without screen refresh’ make sure that box is NOT checked.
This is causing the lag because when you select it to run without screen refresh, that means that the define block will run all of the code under it before doing anything else (mainly, refreshing whatever is supposed to be shown on your screen). Since you put in a loop that waits until the hp < 0.1 , it is going to try stop your computer from doing anything until you finish that repeat loop by clicking 3 times.
- Pandadude12321
-
76 posts
how to optimize in scratch 3.0 to avoid lag
Oops, my bad, thanks for pointing that out, the project runs smooth as butter now, i greatly appreciate the help!

- Discussion Forums
- » Help with Scripts
-
» how to optimize in scratch 3.0 to avoid lag