Tennis Game

Unfortunately, this won't work on a mobile device or tablet yet. I am working on that. Right now only works on a desktop browser. This is a new version complete with sounds for hitting the ball, scoring, and a win and loose sound. Control the left paddle with the mouse. The right paddle is controlled by the computer. If you score 21 before the computer does, you win! You can make the ball go where you want it to by hitting the ball with the upper and lower parts of the paddle. This also makes the ball go faster. So, you can make the ball go to the other side of the screen opposite the computer's paddle and the computer won't be able to get back to the ball fast enough to keep you from scoring. You must keep the mouse cursor in the black game area or you won't be able to move the left paddle.

I have put all of the CSS and JavaScript right in the HTML file. To see all of the code just right-click on this page and select "View Page Source".

Click on the screen to start the game. Enjoy!

Update your browser to a modern one that supports the HTML5 canvas element.