Skip to content

garretthogan/react-pong

Repository files navigation

Battle Paddles

Classic Pong in 3D—play against the computer in your browser.

Play Now

Play Battle Paddles →

No install, no sign-up. Just open the link and play.


How to Play

  • Goal: Get the ball past the AI’s paddle. First to 11 points wins.
  • Your paddle is at the bottom (green by default). Keep the ball in play and try to make the AI miss.
  • Ball speed increases a bit with each hit, so rallies get faster. The ball also bounces off the side walls.

Controls

Input Action
Mouse Move left/right to move your paddle (enable “Enable Mouse Control” in the left panel first)
Arrow keys ← → to move your paddle
A / D Same as arrow keys

Click START GAME to begin. Use the left panel to turn on mouse control and change colors if you like.

What You Can Adjust

  • Right panel – Theme music: Volume slider and mute for the background music.
  • Right panel – AI difficulty: Slider from 0 (easy) to 1 (hard). Higher = faster, more accurate AI.
  • Right panel – Base ball speed: How fast the ball starts (1–50). Your choice is saved for next time.
  • Left panel – Color theme: Change paddle, ball, and court colors.
  • Left panel – Enable Mouse Control: Turn on mouse movement for the paddle.

Scores and your settings (ball speed, difficulty, volume, mute, colors) are saved in your browser so they’re there next time you play.

Run It Yourself

If you want to run the game locally (e.g. to hack on it):

  • Requirements: Node.js (v14+), npm or yarn
  • Install: npm install
  • Play locally: npm run dev then open the URL shown (e.g. http://localhost:5173)
  • Production build: npm run build

License: MIT — play, share, and modify as you like.

About

Themeable pong in the browser with a challenging opponent AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published