why does scratch have a 300 clone limit

id: 530802

category: Questions about Scratch

posts: 8

kat-coder kat-coder loading
Probably because if you have more than 300 clones, it will lag your project really badly.
If you accidentally had a loop that created clones without limit, it would probably crash your computer.
TurboWarp has an option to disable the clone limit. You should try it with this:

when green flag clicked
forever
broadcast [clone v]
end
when I receive [clone v]
create clone of [myself v]

This is an extremely common mistake that users make with making clones. I'll let you see how quick it is to break the project player.
Za-Chary Za-Chary loading
It's to prevent lag on as many devices as possible. There's no doubt that some devices could handle 500 clones, but the 300 clone limit was chosen as a happy medium to make sure that as many Scratch projects could work on as many devices as possible.

Scratchyman6 wrote:

t
i
t
l
e
Well, Scratch wanted the Scratchers to see it without lag (free-lag), since a few computers/laptops doesn't really work effeciently.
I’d say 300 clones is enough, and I found out a way to decrease the limit if you like.

creating a clone:
add [clone] to [list v]
create clone of [myself v]

deleting a clone:
delete (1 v) of [list v]
delete this clone

clone limit detection:
if <(length of [list v] :: list) > [200]> then
delete (200) clones::custom
end
this block must have Run Without Screen Refresh on:
define delete (value) clones
repeat (value)
delete (1 v) of [list v]
delete this clone
I think it might be because having lots of clones puts a lot of strain on your graphics chip.