Discuss Scratch

Glu_furro
Scratcher
5 posts

Laggy game

My game using griffpatchs lemonoids tutorial is EXTREMELY laggy (Btw i am on a chromebook and dont really wanna use turbowarp because im tryna boot it to the scratch app so i can play it offline)
https://scratch.mit.edu/projects/723249897/
Muyaolu123
Scratcher
100+ posts

Laggy game

It wasn’t laggy at all for me, though your could try putting an empty sprite with no code and with just a blank costume in front of all the other sprites. I heard that reduces lag. (Needs verification)

Edit:
Also, if you have any custom blocks selected with the option: “run without screen refresh”, and you need them to repeat infinitely, try this:

Instead of putting the forever loop under the block definition like this:

defineRandomcustomblockforeverDosomestuff

Put the loop wherever it’s utilized, like this:

whenclickedforeverCustomblock

Last edited by Muyaolu123 (Aug. 21, 2022 15:06:01)

Glu_furro
Scratcher
5 posts

Laggy game

When you do a forever block in a custom block it actually lags the game more
Muyaolu123
Scratcher
100+ posts

Laggy game

I know, and to make my post clearer, the first example is a don’t do, and the second is a do if you want to infinitely repeat a custom block.

Last edited by Muyaolu123 (Aug. 21, 2022 22:36:49)

Alberknyis
Scratcher
1000+ posts

Laggy game

I'm finding it difficult to make the game lag but I have noticed a bug: Switch to sniper then restart and play the game
firedestroyer1
Scratcher
72 posts

Laggy game

As a side note, you can actually play turbowarp offline on any scratch game by using it's handy dandy project downloader, which doesn't even require you to load it to begin with. All you have to do is download the html once, then you can run it. (Even on chromebooks)
Mangofluff15
Scratcher
4 posts

Laggy game

Double click green flag. Works every time for me.
-StarryHD
New Scratcher
4 posts

Laggy game

Probably because your browser's laggy, I might suggest Opera Browser or Brave or any browser which has no ads. Hope this helps.
Redstone1080
Scratcher
1000+ posts

Laggy game

There are lots of clones (~50 clones (SA is a goshsend)), maybe try deleting clones when you don't need them.

What you could also do is increment a counter when a clone is created and decrement it when it's destroyed, and if the counter is over a certain number, the clones aren't created in the first place. Here's an example in code:
ifclones<45thencreatecloneofwhatever spritechangeclonesby1changeclonesby-1deletethisclone

Edit: Maybe somehow you could reuse clones, would be complicated though.

Last edited by Redstone1080 (Aug. 22, 2022 23:35:25)

Redstone1080
Scratcher
1000+ posts

Laggy game

-StarryHD wrote:

Probably because your browser's laggy, I might suggest Opera Browser or Brave or any browser which has no ads. Hope this helps.
Chromebooks are usually running on lower-end hardware and as such are popular for schools and parents to buy, as they are cheap and good enough for most things while browsing the web.

Last edited by Redstone1080 (Aug. 22, 2022 23:36:41)

Glu_furro
Scratcher
5 posts

Laggy game

Yea, It seems its just my computer is the problem, Which is good to know!
Thanks for the help!
Oumuamua
Scratcher
1000+ posts

Laggy game

Glu_furro wrote:

My game using griffpatchs lemonoids tutorial is EXTREMELY laggy (Btw i am on a chromebook and dont really wanna use turbowarp because im tryna boot it to the scratch app offline)so i can play it
https://scratch.mit.edu/projects/723249897/

You can download and install Turbowawarp for Desktop app.

Powered by DjangoBB