Discuss Scratch

dextertheidiot
Scratcher
18 posts

how can i make a lag machine

i wanna test out the new fps bar in my game so does anyone know how to make a lag machine?
Elijah999999
Scratcher
1000+ posts

how can i make a lag machine

You could try
forever
stuff
wait (pick random (0) to (0.5)) secs
end
Rondum
Scratcher
43 posts

how can i make a lag machine

define a
a
or

when I start as a clone
create clone of [myself v]
delete this clone
goldenlion06
Scratcher
500+ posts

how can i make a lag machine

this is what I did
forever
change [num] by (0.02*num)
add [num] to [list]
end
yadayadayadagoodbye
Scratcher
1000+ posts

how can i make a lag machine

Rondum wrote:

define a
a
or

when I start as a clone
create clone of [myself v]
delete this clone
Don't do this, this doesn't test your performance, it simply crashes, even a supercomputer won't be able to run it because it gets laggier the faster your computer is
redzoner
Scratcher
0 posts

how can i make a lag machine

when green flag clicked
add [] to [list v]
forever
add (list :: list) to [list v]
end
TheOriginalMusicCat
Scratcher
1 post

how can i make a lag machine

maybe try placing forever block inside forever block and place sometging and maybe it lag???
awesome-llama
Scratcher
1000+ posts

how can i make a lag machine

The “run without screen refresh” option in custom blocks allows for making a script that runs until completion, blocking anything else from running. The days since 2000 block provides sub-frame time measurements (the timer or other wait blocks only are once per frame).

Knowing this, a script that slows down a project by a controlled amount can be created like this:

wait (0.1) seconds::custom
define wait (secs) seconds // run without screen refresh
set [stop time v] to ((days since 2000) + ((secs) / (86400))) // 86400 seconds in a day
wait until <(days since 2000) > (stop time)>

This works up to 0.5 seconds (500 ms) as Scratch has a “warp timer” fallback to prevent scripts from running too long.
Infinity342
Scratcher
41 posts

how can i make a lag machine

Do this.

define a
a :: custom
when green flag clicked
a :: custom

Make sure that the a block has the run without screen refresh box ticked. On my computer, the lag is 1-2 FPS

Last edited by Infinity342 (April 22, 2026 18:03:13)

LukeSky47SCRATCH
Scratcher
41 posts

how can i make a lag machine

when green flag clicked
create clone of [ myself v]
and
when I start as a clone
create clone of [ myself v]
delete this clone
LukeSky47SCRATCH
Scratcher
41 posts

how can i make a lag machine

awesome-llama wrote:

The “run without screen refresh” option in custom blocks allows for making a script that runs until completion, blocking anything else from running. The days since 2000 block provides sub-frame time measurements (the timer or other wait blocks only are once per frame).

Knowing this, a script that slows down a project by a controlled amount can be created like this:

wait (0.1) seconds::custom
define wait (secs) seconds // run without screen refresh
set [stop time v] to ((days since 2000) + ((secs) / (86400))) // 86400 seconds in a day
wait until <(days since 2000) > (stop time)>

This works up to 0.5 seconds (500 ms) as Scratch has a “warp timer” fallback to prevent scripts from running too long.
How is this any different than the
wait (1) secs
block?
LukeSky47SCRATCH
Scratcher
41 posts

how can i make a lag machine

yadayadayadagoodbye wrote:

Rondum wrote:

define a
a
or

when I start as a clone
create clone of [myself v]
delete this clone
Don't do this, this doesn't test your performance, it simply crashes, even a supercomputer won't be able to run it because it gets laggier the faster your computer is
He asked for a crash machine. (I know he wanted one to test your performance, but is there really such a thing?)

Powered by DjangoBB