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

#1 2013-01-03 01:17:26

jlc6687
New Scratcher
Registered: 2012-12-19
Posts: 4

Help! Smoothness of motion

Hello I'm new to scratch and I've encountered a problem. When I test out the code by clicking on them separately, the motion is smooth and fast, but when I put the project in presentation mode, the motion is slow and choppy. Does anyone know how I can fix this problem? Please help. Urgent. Thank you in advance!  smile

P.S. the motion blocks are just basic forever-if-key pressed-change x/y by 5/-5 repeated

Offline

 

#2 2013-01-03 05:55:22

CrystalStar-
Scratcher
Registered: 2012-11-18
Posts: 6

Re: Help! Smoothness of motion

I think it's because when you only run one script at a time by clicking it, there is only 1 script to run so it's faster, but when you press the green flag and play in presentation mode, it has to run all of the scripts in the project and since there's so many it becomes slower. I don't think you can fix it, just try and use less scripts maybe?

Offline

 

#3 2013-01-03 06:15:28

iaoumeur
Scratcher
Registered: 2012-11-24
Posts: 500+

Re: Help! Smoothness of motion

Try adding all the scripts to one script. (if that makes sense)

Instead of

when gf clicked
forever
  change x by (5)
end
when gf clicked
forever
  change y by (5)
end
Do this:

when gf clicked
forever
  change x by (5)
end
forever
  change y by (5)
end
Hope this helps!


The Dot 3 is out!!! Play it here!

Offline

 

#4 2013-01-03 06:23:37

thescratchytim
Scratcher
Registered: 2010-09-10
Posts: 25

Re: Help! Smoothness of motion

iaoumeur wrote:

Try adding all the scripts to one script. (if that makes sense)

Instead of

when gf clicked
forever
  change x by (5)
end
when gf clicked
forever
  change y by (5)
end
Do this:

when gf clicked
forever
  change x by (5)
end
forever
  change y by (5)
end
Hope this helps!

Doesn't. Scratch will do change x forever, then the change y will never happen  tongue


Hello! I'm thescratchytim!  Check out my projects here. Scratch on!
Status: http://blocks.scratchr.org/API.php?user=thescratchytim&action=onlineStatus&type=circle • Also, this project seems to be my most successful. I don't know why  tongue

Offline

 

#5 2013-01-03 15:49:55

lalala3
Scratcher
Registered: 2008-10-03
Posts: 100+

Re: Help! Smoothness of motion

thescratchytim wrote:

iaoumeur wrote:

Try adding all the scripts to one script. (if that makes sense)

Instead of

when gf clicked
forever
  change x by (5)
end
when gf clicked
forever
  change y by (5)
end
Do this:

when gf clicked
forever
  change x by (5)
end
forever
  change y by (5)
end
Hope this helps!

Doesn't. Scratch will do change x forever, then the change y will never happen  tongue

Another thing: forever blocks don't do that. They're like 'stop this script' and 'stop all' blocks in that you can't attach anything under them.


http://img515.imageshack.us/img515/9374/signature2nt.png

Offline

 

#6 2013-01-04 12:18:00

iaoumeur
Scratcher
Registered: 2012-11-24
Posts: 500+

Re: Help! Smoothness of motion

lalala3 wrote:

thescratchytim wrote:

iaoumeur wrote:

Try adding all the scripts to one script. (if that makes sense)

Instead of

when gf clicked
forever
  change x by (5)
end
when gf clicked
forever
  change y by (5)
end
Do this:

when gf clicked
forever
  change x by (5)
end
forever
  change y by (5)
end
Hope this helps!

Doesn't. Scratch will do change x forever, then the change y will never happen  tongue

Another thing: forever blocks don't do that. They're like 'stop this script' and 'stop all' blocks in that you can't attach anything under them.

Yes I know but it's just an example.


The Dot 3 is out!!! Play it here!

Offline

 

#7 2013-02-17 19:52:55

jlc6687
New Scratcher
Registered: 2012-12-19
Posts: 4

Re: Help! Smoothness of motion

Thank you! Combining the scripts helped a lot  smile

Offline

 

Board footer