   computer controlled pong paddle
  Hi everyone,    I am pretty new to making games.  I have made a tetris game in SDL which was a sprite based game and i made a breakout type game using allegro which was just using shape primitives, just drawing rectangles and circles on the screen.  I want to make a pong game in allegro by drawing primitive shapes directly to the screen, 2 filled rectangles for the paddles and a circle for the ball.  My question is what is the best way to control the computer paddle?    I have a couple ideas so far.  One, just start the paddle in the same direction as the ball at some speed and if they meet great, if not the computer loses?  It seems this would not work that well because the paddle going vertically has less travel distance then the ball and the paddle would over run the ball most of the time, is there a way to calculate where the ball will end up and have the paddle stop there if it gets to that spot, and if the ball is traveling faster then the paddle the ball could get there first?Thanks for any feedback.   
  You could make the paddle move according to the ball x position, which would make it meet the ball. However, depending on the ball (and paddle) speed, you could end up making the computer unbeatable.I suggest you make the paddle move to the ball x position, but multiply the velocity of the paddle by some constant that would make it go slower. Then you could change the constant depending on the computer difficulty, to make it easier or harder to beat the computer.   