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

#1 2010-03-24 23:19:46

Common_Sense
Scratcher
Registered: 2009-12-21
Posts: 100+

Code speed testing

As you probably know, Scratch is quite slow. I think it'd be a good idea if we post our projects and people look at the code/methods to see if they can optimize it.

I'm pretty good at it, so I'll take a look at projects posted here.
(Although don't post a piece of junk, just to get a view from me)

Projects must be somewhat small, I'm not going to load a game that's huge because of a sound file.


http://i44.tinypic.com/6dvort.png

Offline

 

#2 2010-03-25 00:30:11

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Code speed testing

Scratch is very slow.  sad

Which means that you can't do hundredths or thousandths of seconds in your timer projects. :'(


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#3 2010-03-25 00:57:45

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Code speed testing

tongue  Yeah. >.> Very slow. You see my Core 2 Duo run Xenotype 8, with my added non-existant features? *shudder* Even RHY3756547's Intel Core i7 can't run his games.  sad


Hai.

Offline

 

#4 2010-03-25 01:12:45

Common_Sense
Scratcher
Registered: 2009-12-21
Posts: 100+

Re: Code speed testing

Be sure to post a link to your project, so more people will take a look at it.


http://i44.tinypic.com/6dvort.png

Offline

 

#5 2010-03-25 14:07:05

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Code speed testing

fg123 wrote:

Even RHY3756547's Intel Core i7 can't run his games.  sad

Yes, but my Athlon II dual-core can  big_smile

Last edited by nXIII (2010-03-25 14:07:16)


nXIII

Offline

 

#6 2010-03-25 14:11:19

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Code speed testing

By the way, I just have a few tips on making projects speedy:
#1 - DON'T use repeat (unless you REALLY REALLY have to)
   Use stacks of the same operation.
#2 - Don't waste time with reporters
   If you use the same reporters a bunch of time in a small amount of code, I believe (someone can correct me if I'm wrong) that it is faster to set a variable and use that variable's reporter.
#3 - DON'T use 'broadcast'
   The 'broadcast' and 'receive' blocks are very slow.
I shall add more...

Tip: If you're making a game, resist the temptation to tell users to run your project in turbo speed. Turbo speed is designed so that it does less repainting and more processing, so there will be small (but EXTREMELY noticeable) gaps between each repaint and movement (among other things) will not be smooth.

Last edited by nXIII (2010-03-25 14:13:44)


nXIII

Offline

 

Board footer