Discuss Scratch

Googolplexic
Scratcher
3 posts

Project lag help

https://scratch.mit.edu/projects/556506736/
My work-in-progress game (so ignore the UI)

Whenever on the first ‘game/level’ played, the screen/sprites lag severely, so the game is unplayable, though after the first ‘gameover’ (goes back to start screen after lives reaches 0), the lag stops and everything works as normal (at least gameplay-wise).
Any reason why this is happening?

(As a side note, the cloud scores aren't really working as well, so if anyone can help me on the, it would be much appreciated)

Thanks!
LG125
Scratcher
500+ posts

Project lag help

Lag this severe is usually caused when a run without screen refresh block is put into any repeat loop, most likely a repeat until or forever loop. This could be the case.



Googolplexic
Scratcher
3 posts

Project lag help

That seems to be the problem
However, if I remove the run without screen refresh option or just remove the custom block entirely and use the script without the use of custom blocks it doesn't work as intended
LG125
Scratcher
500+ posts

Project lag help

Googolplexic wrote:

That seems to be the problem
However, if I remove the run without screen refresh option or just remove the custom block entirely and use the script without the use of custom blocks it doesn't work as intended
You can use a tick broadcast to run the custom block once, but there is a forever loop around the tick broadcast (untested)



Googolplexic
Scratcher
3 posts

Project lag help

The problem is that I need the tick to continuously run (hence the name tick) so the project will work
LG125
Scratcher
500+ posts

Project lag help

Googolplexic wrote:

The problem is that I need the tick to continuously run (hence the name tick) so the project will work
I don’t know why that’s a problem. Since its not in a run without screen refresh custom block, no lag should be generated.



Powered by DjangoBB