Big Man,
You mean to say you can't figure this out, after three years of programming? Sorry to be critical.
If you are going for generic ball movement, it is quite simple. The x coordinate has two directions(left and right), and the y coordinate has two directions(up and down). We know that if the ball hits the right wall or the right paddle then it should shift its direction on the x coordinate to go left. It would be vice-versa when hitting the left wall and paddle. The y direction would stay the same, since they are vertical walls.
Now, when the ball hits the ceiling, the ball's y direction should shift to a now downward direction. For the floor, it would be vice-versa. When these two movements are placed together on the ball, we get a specified angled movement.
For understandability, I will use two string variables to flag the direction of the ball on both coorinates. The x coordinate is either "left" or "right", and the y coordinate is either "up" or "down". Let us start the code by giving the ball random start directions.
Example 1:
if rnd(1) = 0
xdir$ = "left"
else
xdir$ = "right"
endif
if rnd(1) = 0
ydir$ = "down"
else
ydir$ = "up"
endif
Now we should place in the main loop, the section of code that will make the ball move, given the two directions. We will use the method I spoke of above.
Example 2:
if xdir$ = "right" then inc xpos,2
if xdir$ = "left" then dec xpos#,2
if ydir$ = "down" then inc ypos#,2
if ydir$ = "up" then dec ypos#,2
Now, for the basic collision checking system. We do not need to check for collision with the side walls, well, except to figure if that side has lost the ball to the goal. Lets check if the ball goes above the ceiling or below the floor, and if it comes within a specific deistance from the paddles. When the ball hits the ceiling or the floor, we will shift only it's y direction. When it hits the paddles, we will shift only it's x direction.
Example 3:
if ypos# < topline then ydir$ = "down"
if ypos# > bottomline then ydir$ = "up"
The paddle collision I did not code, that I will not be coding the pieces which are unecessary to, in order to show you this method. This is basicly it.

+NanoBrain+