Discuss Scratch

Chikematoodles
Scratcher
50 posts

Complex Game is Occasionally Generating a Lot of Lag!

My game, https://scratch.mit.edu/projects/930833177/, is very complex and has almost 12,000 blocks. It is extremely complex and in some cases has frozen and crashed weak laptops and had them sent to be fixed XD It seems to run somewhat okay on my computer, which I'll list its stats below:

Windows NT 10.0, Opera 107.0.0.0, No Flash version detected

Anyway, it still ocasionally has extreme lag spikes and after, it takes a few seconds for my computer to catch up with the game. This is not really a problem, but for some people, it could actually cause a major issue with their computer and I've seen it happen already. So what I'm doing in the next update, v0.13, is doing a complete makeover of all scripts and creating one “event handler” sprite or whatever you want to call it, but I'm pretty much just limiting the project to one forever loop and one “when green flag clicked” block and using broadcasts to update individual sprites. This is definitely doable, but I'll need to know if this will even make a difference, or if there's anything else I can do, like limit the sprites which I already have done a bit.

And by the way, I'd call myself a pretty experienced coder, so please don't say something obvious like “Don't put custom blocks on run without screen refresh if they have a delay”.

Thanks, Chikematoodles.

SLUGGER - Fight monsters in epic, fast-paced and ACTION PACKED Game!
PLAY NOW - https://scratch.mit.edu/projects/930833177/

This is an EXTREMELY fun and good quality game that I put a large amount of effort into.

Gameplay




AZBIDABOI
Scratcher
100+ posts

Complex Game is Occasionally Generating a Lot of Lag!

Can you simplify your game? I don't see much projects having over 12000 blocks of code

kokaAOALAAKAOKAOkokoko ‎ ‎ ‎ ‎‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎
Chikematoodles
Scratcher
50 posts

Complex Game is Occasionally Generating a Lot of Lag!

AZBIDABOI wrote:

(#2)
Can you simplify your game? I don't see much projects having over 12000 blocks of code

Not really, I kinda enjoy making large games XD

SLUGGER - Fight monsters in epic, fast-paced and ACTION PACKED Game!
PLAY NOW - https://scratch.mit.edu/projects/930833177/

This is an EXTREMELY fun and good quality game that I put a large amount of effort into.

Gameplay




AZBIDABOI
Scratcher
100+ posts

Complex Game is Occasionally Generating a Lot of Lag!

Maybe add a turbowarp link or a link that helps the game run faster.

kokaAOALAAKAOKAOkokoko ‎ ‎ ‎ ‎‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎
Chikematoodles
Scratcher
50 posts

Complex Game is Occasionally Generating a Lot of Lag!

AZBIDABOI wrote:

(#4)
Maybe add a turbowarp link or a link that helps the game run faster.
I already have.
Also, the lag that I was talking about was on TurboWarp. The game is not really playable on regular Scratch XD

SLUGGER - Fight monsters in epic, fast-paced and ACTION PACKED Game!
PLAY NOW - https://scratch.mit.edu/projects/930833177/

This is an EXTREMELY fun and good quality game that I put a large amount of effort into.

Gameplay




LUKiCREATE
Scratcher
17 posts

Complex Game is Occasionally Generating a Lot of Lag!

It works perfectly fine for me, maybe try using Google Chrome?

Last edited by LUKiCREATE (March 25, 2024 13:01:44)


Some cool projects

Check out other cool projects here: LUKiGAMES (studio)
SpyCoderX
Scratcher
100+ posts

Complex Game is Occasionally Generating a Lot of Lag!

LUKiCREATE wrote:

It works perfectly fine for me, maybe try using Google Chrome?

Works fine on Edge. (In my opinion)

Last edited by SpyCoderX (March 25, 2024 13:14:28)


New game! (link)
Have a good day/night!


\(-_-) ::#00AAAA //This is crypto. He protects my signature from the evil kumquats!
Programming is a very powerful skill. As are critical thinking and hard work.
- SpyCoderX


epicdude512
Scratcher
86 posts

Complex Game is Occasionally Generating a Lot of Lag!

On the FAQ, Opera is not offically supported by scratch, use either crome, safari, microsoft edge, or firefox

I am small developer with big ambitions who likes to frequent the forums, Currently i’m working on a game called the battle sticks! the battle sticks is a single player action game with inspired by battle cats! if thats you cup of tea then press this Link and play for yourself, if you don’t want to play, thats ok! i wont force you. Have a great day!
NamePending_
Scratcher
100+ posts

Complex Game is Occasionally Generating a Lot of Lag!

If you're looking to boil everything down to one forever loop, put this in the one loop.
forever
broadcast [loop 1 v]
broadcast [loop 2 v]
...
end

Welcome to my signature!
Was this post helpful? If so, please consider checking out my profile!
say pasta in it please
100 POSTS YESSIRRRRRRRR
Malicondi
Scratcher
1000+ posts

Complex Game is Occasionally Generating a Lot of Lag!

The project works fine for me, on chrome on my Chromebook and PC.

post #1000 post #100 i help in the forums post #1 post #500 0 second ninja
I recommend reading jvvg's essay about the scratch team before complaining, as it may change your opinion and provide insight on the topic.

coming soon :)


Powered by DjangoBB