1v1 browser fighting game. Move your head to move your bird. Yell into your mic to launch eggs. Go to http://hackhackgoose.onrender.com/ to play!
Requirements: Python 3.10+, a webcam, a microphone, Chrome or Firefox.
git clone https://github.com/tarpat/hackhackgoose
cd hackhackgoose
cp .env.example .env # add your ANTHROPIC_API_KEY if you want Claude taunts
./start.shThe browser opens automatically. Click Create Room, share the 4-letter code with your opponent.
By default the game only works on the same WiFi. For cross-network play, do this once:
1. Install cloudflared
brew install cloudflare/cloudflare/cloudflared2. Deploy the signaling service (maps room codes to your tunnel URL)
Go to render.com, create a new Web Service from this repo, and set the start command to:
uvicorn signaling.main:app --host 0.0.0.0 --port $PORT
Copy the URL Render gives you (e.g. https://hackhackgoose.onrender.com).
3. Add it to .env
SIGNALING_URL=https://hackhackgoose.onrender.com
Now ./start.sh will print a public tunnel URL. Your opponent opens that URL, enters your room code, and you're in — no matter what network they're on.
- Host runs
./start.sh, clicks Create Room - Share the 4-letter code with your opponent
- Opponent opens the game URL, clicks Join Room, enters the code
- Press Start Calibration and hold still for 3 seconds
- Fight
| Move | Head gesture |
|---|---|
| Up | Tilt head up |
| Down | Nod down |
| Left | Lean left |
| Right | Lean right |
| Attack | How |
|---|---|
| Make noise | Fills your honk meter |
| Meter hits 100% | Fires an egg at your opponent |
Crates spawn on the map every 5–10 seconds (up to 3 at a time). Walk over one to pick it up. Your next honk uses the powerup.
| Crate | Effect |
|---|---|
| Shotgun | Fires 3 eggs simultaneously across 3 rows |
| Boomerang | Egg travels forward then returns — hits on both passes |
| Bomb | Slow projectile that explodes on impact, deals AOE damage and destroys nearby walls |
Each round generates a random set of wall tiles (hay bales). Eggs are blocked by walls. Bombs destroy walls in a 3×3 area around the impact point.
- Each round: 100 HP, 90 second timer
- First to 0 HP loses the round
- First player to win 1 round wins the match
- Claude generates a trash-talk message at the end (requires
ANTHROPIC_API_KEYin.env)
server/ Python game server (FastAPI + WebSockets)
main.py Routes, WebSocket handler, 20Hz server-authoritative game loop
game.py All game logic: movement, eggs, powerups, walls, HP, rounds
room_manager.py Room creation and player slots
claude_api.py Claude API call for victory message
signaling/ Tiny relay service — deploy once to Render/Railway
main.py Maps room code → tunnel URL
static/ Browser frontend
index.html Create / join room
game.html Game screen with calibration, pause, end screen
style.css Global styles
js/audio.js Mic calibration and volume meter
js/camera.js MediaPipe head tracking
js/renderer.js Canvas drawing
js/network.js WebSocket client
*.mp3 Sound effects (honk, hit, explosion)
dead_duck.png End screen image
dead_goose.png End screen image
start.sh Starts the server, cloudflared tunnel, and opens the browser
ANTHROPIC_API_KEY=sk-ant-... # optional — enables Claude victory messages
SIGNALING_URL=https://... # optional — enables cross-network play