Skip to content
JavaScript Pong
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

JavaScript Pong – Building a Retro Arcade Classic

This is the source code for a tutorial on my blog. The tutorial is available here...

JavaScript Pong – Building a Retro Arcade Classic

The tutorial walks through the development of a JavaScript clone of Pong and covers the following topics

  • The game canvas
  • The game loop
  • The special effects (two-dimensional rendering)
  • Event listeners
  • Collision detection
  • Player movement
  • NPC movement
  • Game Screens

The game is a clone for tutorial purposes and you are welcome to download, fork and modify as you see fit.

Prerequisites and Requirements

To complete the tutorial, all you need is a simple text editor and a browser. I used Visual Studio Code, but any editor will suffice. The game can run on your browsers file:// protocol so there are no requirements to host a local server. I used Chrome for the tutorial I suggest you do the same. The game has not been tested on IE, Safari or Edge.

Play Pong on my website

There is a more complete version of Pong on my website. You can play it here.

Play JavaScript Pong


You can’t perform that action at this time.