Discuss Scratch

armique
New Scratcher
39 posts

My project is getting slower and slower...

Hello, everyone!

I´m doing a projet to try the things I've learned lately: clones, lists and math-drived movements.
But every time I add a new element the project becomes slower.
I´ve seen projects with more sprites, more clones and more programs, so I´m sure the problem is my way of scripting.
Could some of you check my project to see the main problems with scripts?
Or show me a good tutorial for beginners related to this?

Thanks in advance, this is the project:
http://scratch.mit.edu.ezproxyberklee.flo.org/projects/10283711
drmcw
Scratcher
1000+ posts

My project is getting slower and slower...

Go easy with define blocks some of them are not really necessary in your project but to get rid of the lag remove the wait from the cloud define block.
armique
New Scratcher
39 posts

My project is getting slower and slower...

Thank you, drmcw, I'll try it
armique
New Scratcher
39 posts

My project is getting slower and slower...

Thank you, drmcw, I'll try it
drmcw
Scratcher
1000+ posts

My project is getting slower and slower...

Echo?

If for some reason you wanted to keep the wait then the thing you must do is re-enable the screen refresh for the define. If you disable screen refresh in a define then you must make sure everything goes as fast as possible so no waits otherwise you'll get the lag you've experienced.
armique
New Scratcher
39 posts

My project is getting slower and slower...

Hecho!!

If I take out the wait from the cloud blocks everything is faster. Do this mean the wait defined in one sprite affects ALL the others?
I cannot understand what you mean with “disabling screen refresh”. Is a block?
Thankyou so much for helping!!!
ErnieParke
Scratcher
1000+ posts

My project is getting slower and slower...

armique wrote:

Hecho!!

If I take out the wait from the cloud blocks everything is faster. Do this mean the wait defined in one sprite affects ALL the others?
I cannot understand what you mean with “disabling screen refresh”. Is a block?
Thankyou so much for helping!!!
Well, it depends on where the wait is. It certainly can effect all other scripts.

And no, “disabling screen refresh” isn't a block. If you right click a custom block in the block palette, there'll be a menu that pops up, just like when you first made the block. Then click on the little grey arrow pointing downwards, and you'll see a little box where you can turn on/off screen refresh.

With regards,

ErnieParke
drmcw
Scratcher
1000+ posts

My project is getting slower and slower...

armique wrote:

Hecho!!

If I take out the wait from the cloud blocks everything is faster. Do this mean the wait defined in one sprite affects ALL the others?
I cannot understand what you mean with “disabling screen refresh”. Is a block?
Thankyou so much for helping!!!

Because you set the screen not to refresh in the define block it will effect the whole of the scratch program as scratch has to wait for the whole script to complete before it can do anything. Putting a wait in there is adding lag to whole program. So it's a case of remove the wait or put screen refresh back on so the rest of the program can do something. ErnieParke has shown you where the screen refresh tick box is.

Last edited by drmcw (June 18, 2013 08:16:01)

armique
New Scratcher
39 posts

My project is getting slower and slower...

Understood!! Thank you very much to both!
armique
New Scratcher
39 posts

My project is getting slower and slower...

Sorry: I tried to implement all this and put the screen refresh back but when I right click the define block no Scratch menu pop up, only pops up a Flash Player configuration menu.
I work on Mac and online, Has this any sense?
armique
New Scratcher
39 posts

My project is getting slower and slower...

Oops, done
In my mouse is central click XD

Powered by DjangoBB