react-pong

view
0:0

Shall we play a game?press enter to start

normal

press ? for help

Nobody lands on a 404 page on purpose. In 2016 I hid a game of Pong on Moved’s, an easter egg meant to turn a small frustration into something surprisingly delightful: “Lost? Feel free to pong for a while.” react-pong rebuilds that game from scratch for a modern page. It is the one playing above: until you serve, the computer plays itself. Click the court and press Enter to take over the right paddle with the up and down arrows.

It is a small TypeScript library, a framework-free engine with a React component on top, and a good guest on someone else’s page: the keys reach it only while the court has focus, and several games can share a page. The opponent has four difficulties and plenty to say. Every option can be tried in the playground, and releases install straight from GitHub. It was written by Claude Code and tuned by a lot of play testing. The whole story is in this blog entry.

built with Claude Code, TypeScript, React, CSS, Web Audio, Vite, Vitest, GitHub Actions, GitHub Pages