Written by Ian Elliot   
Wednesday, 27 October 2010

Pong in Javascript

You don't need HTML5 to create a classic computer game. All you need is standard HTML that works on almost any browser and some Javascript.

Pong in JavaScript

This simple game implementation was inspired by the account of how Nolan Bushnell created Pong.

This project implements a classic looking version of the classic game using nothing but JavaScript and some object-oriented ideas that come under the general label of Spartan Ajax. It also proves that you don't need HTML5 to create simple animations.

You can read all of the details of how the program was constructed in the article JavaScript Pong.

If you would like the code for this project then register and click on CodeBin.

The program started running as soon as you loaded this page. All you need to know to play the game are  that the A and Z keys move the left bat and the K and M keys move the right bat and the game is over when either side gets to nine.

To ensure that the key presses are sent to the game click on it to select it.

To restart the game at any time just click your browser's reload button.

 

Last Updated ( Friday, 30 November 2012 )
 
 

   
RSS feed of all content
I Programmer - full contents
Copyright © 2014 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.