
The objective of this game requires two player to control two moving paddles on each side. When the ball hit any player's paddle, it will be deflected by an angle and return in a different path to the other player. During game play, if any player miss hitting the ball, one point will be added to the other player's score. The ball will then be reset to start position and start serving to the losing player. At any time, if a player's score is 3 points or more ahead of the other player, the losing player will have his/her paddle width extended approximately by half a centimeter. When the score difference is less than 3 points, the paddle width will automatically reduce back to its normal width.
Game Board
Defined by a single sided quads with a texture mapped onto it. The tilted game board having a height of 10 and width of 13 is rotated counterclockwise on the x-axis of the coordinate system by 50 degree having a top and low wall attached on the edge length of the board.
Moving Ball and Paddles
The moving ball is created by a sphere with a radius of 0.5 and moving constantly at a speed of 0.2. The ball actual position is defined by x, y and z. The paddles is each created by a 6 sided quads having a width of 3.0 and height of 0.5. The up and down movement of the paddles is obtain by varying it's x and y-position by a traveling speed of 0.3.

Collision detection of the moving ball (sphere as its bounding volume) and the paddle (an Axis-Aligned Bounding Box) is measured using the bounding box-sphere method. As the sphere only hit one face of the box, we only need to compare between the ball's next move (Summation of the ball's current x-position, its radius,R and the speed it is moving) with the colliding face of the paddle's x-position. If the result is greater than the paddle's x-position, then the ball will actually hit the colliding face of the paddle at next move. An additional check on the ball's y-position to ensure that the ball collide within the range of the paddle's width (y-max - y-min).
In addition, a deflection angle upon collision is calculated using a mathematical formula which test the proportion from the center of the paddle multiply by 65 degrees and give a resultant deflection of the ball between 0 to 65 degrees.
Ball and Wall
During the game, the ball either collides with the top wall or the bottom wall while traveling towards the left or right paddle. Collision detection with both the wall is check by obtaining the ball's current y-position and the ball's speed. If the result is greater than the half of board's height or less than negative half of the board's height, then the ball has collided with the top wall or the bottom wall and the ball's y-position is re-adjusted.
Paddle and Wall

The paddle for each player will either move up or down by depressing the respective keys on the keyboard. Depending on which key was depressed, the paddle's y-position is either incremented or decremented by the paddle's traveling speed. This result is constantly compared with half of the board's height. If an incremental result is greater than the positive half of the board's height, the paddle has collide with the top wall and will be stop at positive edge of the board. Similarly, if the decremented result is less than the negative half of the board's height, then the paddle has collided with the bottom wall and it will be stop at the negative edge of the board.
Here is a copy of my game's source code and executable file, have fun!
I would like to thank Mr Joshua Jenkins for his help on collision detection and below are some of reference links that I refer for developing this game