Computer Science Canada why wont my paddle move |
Author: | Genisis [ Tue Nov 01, 2005 9:36 am ] | ||
Post subject: | why wont my paddle move | ||
my paddle wont move can someone help me heres the code :
|
Author: | codemage [ Tue Nov 01, 2005 9:49 am ] |
Post subject: | |
Your 'outer loop' needs to start where you're drawing the stuff to screen - not just where you're checking for use input. In your code, the paddle is moving virtually - but that's not reflected on screen. |
Author: | haseeb [ Tue Nov 01, 2005 4:38 pm ] |
Post subject: | |
Here use this code. % The "StepperMotor" program. % Repeats the sequence one hundred times. for count : 1 .. 100 % Counts 0, 1, 2, and 3 which activates D0, D1, D2, % and D3 successively. for counter : 0 .. 3 % Outputs to the parallel port. parallelput (2 ** counter) % Delays for one-tenth of a second. delay (100) end for end for % Delays for two seconds. delay (2000) % Again, repeats pattern one hundred times. for count : 1 .. 100 % Counts 3, 2, 1, and 0 which activates D3, D2, D1, % and D0 successively. for decreasing counter : 3 .. 0 % Outputs to the parallel port. parallelput (2 ** counter) % Delays for one-tenth of a second. delay (100) end for end for |
Author: | Mr. T [ Tue Nov 01, 2005 7:37 pm ] |
Post subject: | Alex's Opinion |
Time for your monthly check-up with Dr. BAN, haseeb. ![]() |
Author: | codemage [ Wed Nov 02, 2005 8:47 am ] |
Post subject: | |
I thought haseeb was already banned. If not, it's definitely that time. |
Author: | Tony [ Wed Nov 02, 2005 11:47 am ] |
Post subject: | |
codemage wrote: I thought haseeb was already banned.
well users would usually have ![]() you guys got to point those newbcakes out to me sooner. Feel free to PM |
Author: | Jekate [ Thu Nov 03, 2005 2:28 pm ] | ||
Post subject: | |||
Here is a little help:
I took out yy1 and yy2 because all you needed to do was to put "y1 + 60" or however big you wanted the paddle. You also have to put the Input.KeyDown (key) in the loop so it can get input everytime, not just once. |
Author: | RedRogueXIII [ Sat Nov 05, 2005 1:34 pm ] | ||
Post subject: | |||
Just an edit - it will refresh the paddle so that it doesnt end up with a huge green line on the side.
|
Author: | Jekate [ Sat Nov 05, 2005 2:58 pm ] |
Post subject: | |
Another suggestion is to take a picture of your background so that when the paddles or ball passes over any of the lines, the lines are still there. |
Author: | Mr. T [ Sat Nov 05, 2005 3:28 pm ] |
Post subject: | Alex's Opinion |
You don't necessarilly need a picture background in order ensure lines won't get deleted. You just have to make sure you're redrawing everything every time the program loops. |
Author: | Geminias [ Sat Nov 05, 2005 3:31 pm ] |
Post subject: | |
why is haseeb banned? i'm just curious so i dont also do it and get myself banned |
Author: | Cervantes [ Sat Nov 05, 2005 6:23 pm ] |
Post subject: | |
Geminias wrote: why is haseeb banned?
i'm just curious so i dont also do it and get myself banned Spamming, inappropriately giving out answers, making totally unrelated/off topic posts. Be sure to check out the rules announcement in General Discussion. |