Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Game optimization
- EpsilonXTest
-
7 posts
Game optimization
The game: https://scratch.mit.edu/projects/1229465781/
The problem: the collision script takes to long too run. The current script runs like this:
sprite: Ball
Note: both of these scripts are running in clones, not the actual sprites.
The problem: the collision script takes to long too run. The current script runs like this:
sprite: Ball
if <touching [Blocks v] ?> thensprite: Blocks
broadcast [check if touching ball v] and wait
end
when I receive [check if touching ball v]However, this takes far too long to run. Any help would be appreciated!
if <touching [Ball v] ?> then
change costume
end
Note: both of these scripts are running in clones, not the actual sprites.
Last edited by EpsilonXTest (Oct. 15, 2025 21:46:51)
- RokCoder
-
1000+ posts
Game optimization
Using a broadcast and wait block within a non-refresh custom block causes the lag. You['re doing this in your Tick custom block in your Ball sprite.
- EpsilonXTest
-
7 posts
Game optimization
Thanks! I didn't even think to check that. It works fine now.
- Discussion Forums
- » Help with Scripts
-
» Game optimization