How to fix lag in a certain project that is using (a lot) of clones?

Play this game that I created and you will know that there is a lot of lag. Halloween Version 2D Square Slasher

How to reduce all lag? Maybe completely remove the lag? Thanks!

Gee, that does not help -_-

Then, if the lag is my computer, then why am I having this problem with only Snap and not Scratch or any other coding website?

no, not for me. nothing really lags on scratch

thats what is in my project.

I cant count. Its on "forever"
Halloween version 2D Square Slasher  script pic

Bruh, please stop deleting posts. I had to go all the way back to this topic for nothing.

the computer, or the lag?

RIP my computer.

ummm, what do you mean by that?

ohhhh, oki, i get it now.

1 Like

I haven't yet looked into this version of your project, however I remember from yesterday's version that I wanted to suggest you the following.

I have learned by doing projects similar to yours one, that fading is much less 'laggy' if done without any clones, and - instead of clones - doing an emulation of fading in the following way.

Namely, by forever making a big (i.e. stage-size big) sprite's (which needs to be 98% transparent) 'stampings' over everything else's stampings (i.e. stampings made by any other sprite).

I don't know if I wrote the way I wrote it is understandable to you; I will expand and re-write if necessary.

Can I make the stamp disappear?

Yes, that's what I meant and was explaining to you (or at least I tried to explain) how the glow-sword's (i.e. your sprite's) 'stampings' - which need to be forever-made (instead of any clones) - are forced to gradually disappear by the forever-made big-size & 98% transparent sprite's stampings.

So, you need to create this big sprite; I usually name it 'overlay' sprite.

1 Like

So, I need to make a black colored background that is in the front layer and replace the glow-sword's clones with
Halloween version 2D Square Slasher  script pic (1)?

EDIT: It's glow is not turning transparent. ermmmm

1 Like

Yes. You may additionally want to control the speed of the 'fading' (which is being emulated by the disappearance caused by the big & 98% transparent 'overlay' sprite's - that you called 'background' - stampings).

You can control the fading speed by the wait 0.73 sec block as you did when you were still using clones above.

1 Like

I did this;
Halloween version 2D Square Slasher  script pic (2)
but then it just made the whole sprite slowly disappear, and not the stamps of it (Well the stamps do disappear, but only when the sprite itself disappears, the other stamps that the glow-sword made when it was visible still stay visible).

I'm not good at explaining in words; it is harder then than showing, so look into a remix of your project to find out what I was not able to explain in words.

1 Like

I understand, and thanks. :)

1 Like

Did I jump too quickly from trying to explain to just showing the remix? I'm sorry...

I admire Brian @bh because he doesn't jump so quickly from patiently trying to explain to just showing...