Multiplayer Pong running entirely in the browser — no backend needed — powered by BrowserPod.
Edit .env and replace your_api_key_here with your real key:
VITE_BP_APIKEY=your_actual_key
Get a free key at: https://console.browserpod.io
npm install
npm run devOpen http://localhost:5173 in your browser.
- Single Player — play against the AI right away
- Multiplayer — click "Multiplayer", copy the portal URL that appears, and send it to a friend. They open it and join as Player 2 instantly.
Move your mouse up/down over the canvas to control your paddle.
pong-pod/
├── src/main.js ← boots BrowserPod, copies files, starts Node server
├── index.html ← outer shell (iframe + terminal)
├── public/project/
│ ├── server.js ← Node.js HTTP + WebSocket game server (runs in pod)
│ ├── index.html ← game UI (served from inside pod)
│ ├── game.js ← canvas rendering + WebSocket client
│ └── package.json ← inner project deps (ws only)
├── vite.config.js ← COEP/COOP headers required by BrowserPod
└── .env ← your API key goes here