Bumper Cars — play while Claude Code / Codex generates
A multiplayer bumper-cars game designed to fill the wait while an AI coding
agent is generating. Real people can join the same room and play against each
other; bots fill the rest of the arena so a match is never empty or dead.
Run it locally
One Node server does everything on one port — it serves the game client
over HTTP and runs the multiplayer WebSocket on that same port:
cd server
npm install # installs `ws` (already present if node_modules/ exists)
node server.js # http://localhost:8787 (PORT=9999 node server.js to change)
Then open http://localhost:8787 in a browser. That's it — no separate
static server needed: GET / returns the game client and the client
connects its WebSocket back to the same origin (ws://localhost:8787).
GET /health returns {"ok":true}.
Client server address logic (in client/index.html), in order:
?server=ws://HOST:PORT in the URL always wins (dev / LAN override, e.g.
?server=ws://192.168.1.5:8787 for a friend on your LAN; this is also
how the Claude Code plugin's opener points the page at the real server).
- Served over
https: → connects to the same host over wss:.
- Served from
localhost / 127.0.0.1 (e.g. by the Claude plugin's local
bridge) → the public multiplayer server
wss://bumper-cars-gfye.onrender.com, because a local page is not a
game server.
- Served over plain
http: from another host → same host over ws:.
- Opened as a
file:// page → falls back to ws://localhost:8787
(you can still open client/index.html directly that way).
The page also supports ?auto=1&name=<name>&room=<CODE> — preset the
player name and join immediately (Quick Match, or the given room) with no
click. The Claude Code plugin's opener uses this.
Play: enter a name → Quick Match, or enter a 4-letter room code → Join by code.
The room code is shown in-game — share it so friends land in your exact room.
Controls: arrow keys / WASD on desktop. On touch devices you get a two-thumb
layout — ◀ ▶ steering bottom-left, GAS / BRAKE pedals bottom-right
(large multi-touch buttons: hold GAS with one thumb while steering with the
other) — plus a drag joystick: touch and drag anywhere on the arena and
the car drives toward the drag direction. All three input sources combine.
The in-game layout fits a phone screen without scrolling, and the canvas
renders at devicePixelRatio for crisp graphics on retina displays.
Install as a Claude Code plugin
This repo doubles as a Claude Code plugin marketplace (marketplace name:
bumper-cars). In a Claude Code session, type these with the leading
slash — without it, Claude treats the line as a chat message and the
plugin system never sees it:
/plugin marketplace add Sun-Wukhan/bumper-cars-plugin
/plugin install bumper-cars@bumper-cars
The first command should reply Successfully added marketplace: bumper-cars. The @bumper-cars suffix on the second is required: it is
<plugin>@<marketplace>, per Anthropic's plugin docs.
Shell alternative (run in a normal terminal, no session needed):
claude plugin marketplace add Sun-Wukhan/bumper-cars-plugin
claude plugin install bumper-cars@bumper-cars
If /plugin does not appear in Claude Code's command autocomplete, your
Claude Code predates plugins — run claude update, restart it, and retry.
Requirements: Claude Code with plugin support, and Node.js on your
PATH (the plugin's hooks and bridge are zero-dependency Node scripts).
What happens once it's installed:
| Claude event | What happens |
|---|
| You submit a prompt | Nothing pops up — the game only opens when you run /bumper. Status banners update in the tab if it's already open. |
| Claude needs your attention (notification / permission request) | The game shows a pulsing "⚠️ Claude needs you — check your terminal" warning banner and flags the tab title — but never pauses: you keep driving until you've dealt with it. |
| You're away answering Claude | Your page reports itself away and a bot drives your car until you click back — you're never left parked as a target. |
| The turn finishes | A "✅ Your code is ready" banner appears; you can finish your round. |
| Any time | Type /bumper to open the game manually. |