
-----------------------------------
maxxburnie
Tue May 07, 2013 9:41 am

need help making a pong game there is an problem where it doesn't need to hit the paddle to bounce back not sure on fix
-----------------------------------
What is it you are trying to achieve?



What is the problem you are having?



Describe what you have tried to solve this problem



Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)








Please specify what version of Turing you are using


-----------------------------------
jr5000pwp
Tue May 07, 2013 11:46 am

Re: need help making a pong game there is an problem where it doesn't need to hit the paddle to bounce back not sure on 
-----------------------------------
Looking at it for about 10 seconds I see this: %this is where the problem is, not sure whats wrong here.
    % for some reason the ball doesnt actualy have to be at the paddle, it will just bounce off the wall
    if bounce_X = go_upX_two then
	X_move := -X_move
    end if Either this is incorrectly named or your if statement is off. You are merely checking if the ball has passed the paddle, not if it has collided with it. You need to have a check on the y axis to see if the ball hit the paddle
