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)
Offline
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
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.
Offline
and i think its easiest or intresting because most other velocity games i see the variables go to the really small numbers
Offline
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!
Offline
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
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.
Offline
You might want to use the if-then-else block to handle the situation.
Offline