This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-07-18 17:52:46

vortex19
Scratcher
Registered: 2009-06-03
Posts: 100+

Scratch is running slow...

I've noticed that whenever I make a long script, it sometimes takes a while for the blocks to snap together. Is there any way to speed it up because it really is ruining my efficiency.

Offline

 

#2 2010-07-18 17:54:30

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Scratch is running slow...

There really is no way to speed this up; it's just because Scratch has to redraw the entire script every time you change a block.

You might be able to stop it from crashing (which it does to me a lot), or maybe speed it up a tiny bit by changing its priority in the Task Manager (Task Manager > Processes > right-click Scratch.exe > Set Priority > High), but it's not very effective...

Offline

 

#3 2010-07-18 17:58:07

vortex19
Scratcher
Registered: 2009-06-03
Posts: 100+

Re: Scratch is running slow...

Oh ok. I guess I might break my script into smaller pieces. But will the speed be improved in Scratch 2.0?

Offline

 

#4 2010-07-18 18:01:18

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Scratch is running slow...

vortex19 wrote:

Oh ok. I guess I might break my script into smaller pieces. But will the speed be improved in Scratch 2.0?

Hopefully. It's been an issue since the creation of Scratch and I hope it's on the top of the list for 2.0.

Offline

 

#5 2010-07-18 18:14:21

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: Scratch is running slow...

You can break your script up both permanently, or if necessary just temporarily while editing to speed up editing. It gets tiring BUT it is amazing inspiration to optimize your script, lol. The more you break it up, the more you find ways to split routines up among sprites, the stage script, etc. Of course, you are getting more parallel in your programing so you need to make sure you use a rigid trigger system with variables to ensure that the program loop repeats correctly.

I love it though cause Archmage pointed out how redundant my script was in my Pacman project and he is right! Part of my problem is I am still so new to a lot of these routines that I plan on getting them working first, then optimizing them later. Another thing is that the vast majority of my projects are just mini projects designed to demo some game-related script, so I am planning on prettying them up later. I am also worried that too much optimizing will make it harder for newer Scratchers to figure out whatever routine I am demoing.


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#6 2010-07-18 23:11:14

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Scratch is running slow...

Yup, that just happens with long scripts.

One thing you can do would be to break your script up into a series of shorter scripts, each one triggering the next once it finishes. So part 1 would run, then broadcast something. Part 2 would recieve the broadcast and run, etc.

Once you're done editing your script, you can take out the broadcasts and snap it all together.  big_smile


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer