A Pico-Park-style couch co-op party game where one screen is the "stage" and up to 8 phones become controllers.
Docker Desktop includes both Docker and Docker Compose, making it the easiest way to get started.
Windows:
- Download Docker Desktop from: https://www.docker.com/products/docker-desktop/
- Run the installer and follow the setup wizard
- Restart your computer when prompted
- Launch Docker Desktop and wait for it to start (whale icon in system tray)
- Verify installation:
docker --version docker-compose --version
macOS:
- Download Docker Desktop for Mac: https://www.docker.com/products/docker-desktop/
- Drag Docker.app to Applications folder
- Launch Docker Desktop from Applications
- Grant necessary permissions when prompted
- Verify installation:
docker --version docker-compose --version
Linux (Ubuntu/Debian):
# Install Docker
sudo apt-get update
sudo apt-get install docker.io docker-compose
# Add your user to docker group (to run without sudo)
sudo usermod -aG docker $USER
# Log out and back in, then verify
docker --version
docker-compose --versionClaude Code is an AI coding assistant that can help you develop, debug, and understand the codebase.
Installation:
- Open Visual Studio Code
- Go to Extensions (Ctrl+Shift+X or Cmd+Shift+X)
- Search for "Claude Code"
- Click "Install" on the official Claude Code extension by Anthropic
- After installation, open VS Code Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
- Type
/loginand press Enter - Follow the authentication prompts in your browser
- You'll need an active Claude subscription (Claude Pro or API access)
Usage:
- Press
Ctrl+L(orCmd+Lon Mac) to open Claude chat - Type
/to see available commands - Ask Claude questions about the code, request features, or get debugging help
- Claude can read your files, make edits, run commands, and more
Useful commands:
/help- Get help with Claude Code features/clear- Clear conversation history- Ask questions like "How does the WebSocket connection work?" or "Add a new level to the game"
- Modern web browser (Chrome, Firefox, Safari, or Edge)
- Smartphone(s) on the same WiFi network as your computer (for multiplayer)
Make sure Docker Desktop is running (check for whale icon in system tray), then:
docker-compose up --buildThis command will:
- Download necessary Docker images (first time: ~2-3 minutes)
- Build the Python backend server
- Start Redis database for room management
- Start host client web server (port 9001)
- Start controller client web server (port 3001)
- Start backend API (port 9000)
Option A: Full Multiplayer Mode (TV + Phones)
-
Open Host Screen on TV/Laptop:
- Navigate to:
http://localhost:9001 - A 6-digit room code and QR code will appear
- Navigate to:
-
Connect Controllers (Phones):
- Option 1: Scan the QR code with your phone camera
- Option 2: Manually navigate to
http://YOUR-LAPTOP-IP:3001and enter room code
Finding your laptop IP:
- Windows: Open Command Prompt and type
ipconfig(look for IPv4 Address) - Mac: Open Terminal and type
ifconfig | grep "inet " - Linux: Open Terminal and type
hostname -I - Example:
http://192.168.1.100:3001
-
Start Playing:
- Once players join the lobby, click "Start Game" on the host screen
- Use phone touch controls to move players on the TV
Option B: Local Testing Mode (No Phone Required)
Perfect for solo development and testing:
- Open:
http://localhost:9001 - Click "Test Locally (No Phone)" button
- Select 1 or 2 players
- Use keyboard controls:
- Player 1: W (jump), A (left), D (right)
- Player 2: โ (jump), โ (left), โ (right)
Press Ctrl+C in the terminal where docker-compose is running, then:
docker-compose downTo completely remove all data and start fresh:
docker-compose down -vFor comprehensive guides, see the docs/ folder:
- docs/SETUP.md - Complete installation guide
- docs/GETTING_STARTED.md - Detailed quick start
- docs/HOW_TO_PLAY.md - Gameplay guide
- docs/DEVELOPMENT.md - Developer guide
sofafriends/
โโโ server/ # FastAPI game server
โ โโโ app/
โ โ โโโ main.py # WebSocket + REST API
โ โ โโโ __init__.py
โ โโโ requirements.txt
โ โโโ Dockerfile
โโโ host/ # Host screen client
โ โโโ index.html
โ โโโ game.js
โโโ controller/ # Phone controller client
โ โโโ index.html
โ โโโ controller.js
โ โโโ manifest.json # PWA config
โโโ docker-compose.yml
- Left Side - Move left
- Top Right - Jump
- Bottom Right - Action/Interact
- Work together with all players
- Collect the key
- Reach the exit together
- Stand on the exit for 1.5s to win
Basic Operations:
# Start all services (rebuilds if needed)
docker-compose up --build
# Start in background/detached mode
docker-compose up -d
# Stop all services
docker-compose down
# Stop and remove all data (fresh start)
docker-compose down -v
# Restart specific service
docker-compose restart server
# View logs for all services
docker-compose logs -f
# View logs for specific service
docker-compose logs -f serverDebugging:
# List running containers
docker ps
# Execute command in running container
docker-compose exec server bash
# Check resource usage
docker stats
# Rebuild only one service
docker-compose build server
docker-compose up -d serverClean Up:
# Remove stopped containers
docker container prune
# Remove unused images
docker image prune
# Remove everything (use carefully!)
docker system prune -aIf you prefer not to use Docker, you can run services manually:
Prerequisites:
- Python 3.11+
- Node.js 20+
- Redis server
Terminal 1 - Redis:
redis-serverTerminal 2 - Backend Server:
cd server
pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadTerminal 3 - Host Client:
cd host
npx http-server -p 3000 --corsTerminal 4 - Controller Client:
cd controller
npx http-server -p 3001 --corsNote: Update WebSocket URLs in code to use ws://localhost:8000 instead of ws://localhost:9000
Windows:
ipconfig
# Look for "IPv4 Address" under your WiFi adapter
# Example: 192.168.1.100Mac/Linux:
# Mac
ipconfig getifaddr en0
# Linux
hostname -IThen use http://YOUR-IP:3001 on your phone to access the controller.
- Backend: Python 3.11 + FastAPI + WebSockets
- Host Client: Vanilla JS + Canvas (no framework)
- Controller: Progressive Web App (PWA)
- Real-time: WebSocket at 20 TPS (ticks per second)
- Storage: Redis (for room state)
- Host creates room via REST API โ gets room code
- Controllers join via WebSocket โ appear in lobby
- Host starts game โ server begins 20 TPS game loop
- Controllers send input โ server updates physics โ broadcasts state to host
- Host renders at 60fps using interpolation
Currently supports 8 players. To increase:
- Update
PLAYER_COLORSarray inserver/app/main.py - Adjust
max playerscheck in WebSocket handler
- Adjust
TICK_RATEinserver/app/main.py(default: 20 TPS) - Adjust
GRAVITYconstant for jump feel
- Edit
controller/index.htmlCSS grid - Change button colors, sizes, or add new buttons
Docker Desktop not starting:
- Windows: Make sure WSL 2 is installed and updated
- Mac: Check System Preferences > Privacy & Security for blocked items
- Try restarting Docker Desktop
- Check Docker Desktop settings for resource allocation
Port already in use errors:
- Check if Stocktimus or another app is using ports 9000, 9001, or 3001
- Stop conflicting services or change ports in
docker-compose.yml - Use
docker psto see running containers
Containers won't start:
# View logs for specific service
docker-compose logs server
docker-compose logs host
docker-compose logs controller
# Rebuild from scratch
docker-compose down -v
docker-compose up --buildPhone can't connect to host:
- Ensure phone and laptop are on same WiFi network (not cellular data)
- Check firewall isn't blocking ports 3001 or 9000
- Use
http://nothttps://(no SSL in development) - Try entering IP manually instead of scanning QR code
- Some corporate/school WiFi networks block device-to-device communication
QR code not showing:
- Check browser console for JavaScript errors (F12)
- Ensure QRCode.js library loaded from CDN
- Try refreshing the page
- Check that backend is running:
docker-compose logs server
Input lag or stuttering:
- Check WebSocket connection (status indicator on phone)
- Reduce number of players if CPU is overloaded
- Check Docker Desktop resource allocation (increase if needed)
- Close other applications using CPU/network
Game doesn't start:
- Ensure at least 1 controller is connected
- Check server logs:
docker-compose logs server - Verify all containers are running:
docker ps - Try restarting:
docker-compose restart
Claude not responding:
- Check your Claude subscription is active
- Run
/loginagain to refresh authentication - Check internet connection
- Try
/clearto reset conversation
Claude can't run commands:
- Make sure you've granted terminal permissions in VS Code
- Check that Docker is running before asking Claude to start services
For production deployment:
- Add PostgreSQL for persistent user/room data
- Use Redis for session management
- Add HTTPS with Let's Encrypt
- Deploy server to cloud (AWS/GCP/Heroku)
- Use NGINX for static file serving
- Add authentication with JWT
- Level 1: Simple platforming + key collection
- Level 2: Shared block pushing mechanics
- Level 3: Pressure plate puzzles
- Reconnection handling for dropped players
- Ghost/respawn mechanic
- Phaser 3 integration for advanced graphics
- Sound effects and music
- Touch gesture improvements (tilt controls)
- Leaderboard and stats tracking
Once you have Claude Code set up in VS Code, here are some helpful ways to use it:
Understanding the Codebase:
- "Explain how the WebSocket connection works between host and controller"
- "Show me how player physics are calculated"
- "Where is the death animation system implemented?"
- "How does the level loading work?"
Adding Features:
- "Add a third level with moving platforms"
- "Implement a power-up system for players"
- "Add sound effects when players jump"
- "Create a settings menu to adjust game speed"
Debugging:
- "Why are players not jumping properly?"
- "The WebSocket connection keeps dropping, help me debug"
- "Players are falling through platforms, what's wrong?"
Development Tasks:
- "Start the Docker services for me"
- "Check the server logs for errors"
- "Run the game in local test mode"
- "Update the player colors to be more vibrant"
Best Practices:
- Claude can read your CLAUDE.md file (project instructions) automatically
- Reference specific files like "in host/game.js, how does..."
- Ask Claude to run tests after making changes
- Use Claude to write documentation for new features
This is a prototype project. To contribute:
- Fork the repo and clone to your machine
- Install prerequisites (Docker Desktop, optionally Claude Code)
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes and test locally with
docker-compose up - Ask Claude to help review your code (optional but recommended)
- Commit your changes:
git commit -m "Add some feature" - Push to your fork:
git push origin feature/your-feature-name - Submit a pull request with a clear description of changes
Development Tips:
- Use the local testing mode to iterate quickly without needing phones
- Check the admin test panel at
http://localhost:9001/admin/test-panel.html - Review CLAUDE.md for detailed architecture and code structure
- Ask Claude to explain any code you don't understand
MIT License - feel free to use for learning or your own party games!
Inspired by Pico Park - a brilliant co-op party game.
Built with โค๏ธ using Python, FastAPI, and WebSockets.
Have fun! ๐ฎ๐น๏ธ