Skip to content

Pong Game

Try It Now

To play Pong right here in your browser, click the link below:

×

Overview

The Pong Game is a minimalist recreation of the classic arcade game. Use the arrow keys or drag on the left side of the screen to move your paddle while the computer controls the paddle on the right. First to score wins!

Features

  • Keyboard/Touch Controls: Use the Up and Down arrow keys or drag on the canvas to move your paddle.
  • Computer Opponent: The AI paddle automatically tracks the ball.
  • Score Display: Points are shown below the canvas.
  • Pure Client-Side: Built entirely with HTML5 Canvas and vanilla JavaScript.

Purpose

This project demonstrates how Codex can generate a playable browser game with basic physics and input handling. The entire experience runs locally in your browser without any backend code.

How It Works

  1. Ball Movement: The ball bounces between the paddles and the top/bottom walls.
  2. Paddle Collision: When the ball hits a paddle, it reverses direction.
  3. Scoring: If the ball passes a paddle, the opposing player scores and the ball resets to the center.