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

#1 2008-02-12 20:57:16

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Easiest way to use velocity

My project is the easiest way to use velocity download it and use presentation mode.
Here it is:    http://scratch.mit.edu/projects/Heybrian/97720
If you jump on the variables it lags so download it and make it so they dont show by unchecking the box.

Last edited by Heybrian (2008-02-12 20:58:10)


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#2 2008-02-12 21:25:23

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: Easiest way to use velocity

Anyone?


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#3 2008-02-13 00:33:01

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Easiest way to use velocity

Heybrian, please explain *why* you think that your project is the easiest way to use velocity?  Hundreds, perhaps thousands, of projects use velocity to get smoothly moving sprites.  Tell us what is special about yours.  Advertisements for projects work best when they tell people why the project is interesting, rather than just saying it is the "easiest" or the "best". 

Perhaps you need to look at why your program "lags" on line, also, as many projects have gotten smooth velocity-based movement with the java applet.  Perhaps you have some inefficiency that could be removed?

Offline

 

#4 2008-02-13 10:38:31

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: Easiest way to use velocity

oh it lags because its supposed to touch the grey at the top  (i tryed doing it a better way it just wouldnt compute) but the variables are the exact same coler as the grey and the bottom so it gets stuck there.


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#5 2008-02-13 10:39:45

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: Easiest way to use velocity

and i think its easiest or intresting because most other velocity games i see the variables go to the really small numbers


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#6 2008-02-13 10:43:20

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: Easiest way to use velocity

I also had the most trouble! When trying to figure how to get it to work, i did
               
                             
                             <forever if><<<<  <not> <key[left]pressed?> >>  <and> <( velocity <>>  )>0 >>
                             <repeat until><( velcoty <=>  0)>
                               change velocity by on
                           i would say do that withought the if variable is greater than 0
  and it just when it went over it kept doing that!


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#7 2008-02-13 11:18:39

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Easiest way to use velocity

You need to test variables like velocity with < or > and not with =, because they are real numbers rather than integers, so can be very slightly different from the value you are testing for.  (You may see velocity of 0.000001 as the same as zero, but the computer does not.)

Offline

 

#8 2008-02-13 17:10:49

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: Easiest way to use velocity

well if i did or then if he was going left then it would be decreasing and below 0 so it would try to go up and down at the same time witch would result in the variable staying the same.


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#9 2008-02-14 00:18:17

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Easiest way to use velocity

You might want to use the if-then-else block to handle the situation.

Offline

 

#10 2008-02-14 18:46:23

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: Easiest way to use velocity

Well my way worked didnt it?


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

Board footer