Computer Science Canada pong game help |
Author: | tupac [ Sun Feb 19, 2006 9:03 am ] | ||
Post subject: | pong game help | ||
k, so i got the ball to travel in a path I directed it, but now i want it 2 bounce off the walls (imade somethin like that on turing, but it was a lot easier). so my code is: <form includes a timer and a ball>
thnx for any help:) |
Author: | pavol [ Sun Feb 19, 2006 9:58 am ] |
Post subject: | |
just curious, why are you using .Top to test if the ball is >= 4800 and then make dx negative? shouldn't you be using shape1.Left or shape1Right if you want to change dx, and shape1.Left and shape1Down if you want to change dy. |
Author: | tupac [ Tue Feb 21, 2006 9:15 pm ] |
Post subject: | |
i used that just cuz 4 some reason thats wat works... iduno, its weird... |
Author: | cool dude [ Wed Feb 22, 2006 6:41 pm ] | ||
Post subject: | |||
try something like this it should work. put the following code in your timer
note i did not use the same variables as u so just change the variable names ![]() |