Prerequisites
Before you begin, ensure you have:- Bun v1.1.38 or higher
- Git LFS for large file support (game assets)
- Docker for CDN and PostgreSQL
- Privy account for authentication (recommended)
- WebGPU-compatible browser (Chrome 113+, Edge 113+, Safari 18+)
- macOS
- Linux
Installation
Configure environment (optional)
Create Set your Privy credentials:
.env files if you want persistent authentication:packages/client/.env: SetPUBLIC_PRIVY_APP_IDpackages/server/.env: SetPRIVY_APP_IDandPRIVY_APP_SECRET
Build the project
First build takes 5-10 minutes due to PhysX WASM compilation. Subsequent builds are cached.
Start the game
Production mode:Open http://localhost:5555 in your browser.Development mode (with hot reload):
- Client: http://localhost:3333 (Vite HMR)
- Server:
ws://localhost:5555/ws
Running with AI Agents
To run the game with ElizaOS AI agents:You need ElizaOS configured with an LLM provider (OpenAI, Anthropic, or OpenRouter) in your environment variables.
Running Streaming Duel Arena
To run the complete streaming duel stack with AI vs AI combat:- Game server with streaming duel scheduler
- Duel matchmaker bots (AI agents fighting each other)
- RTMP bridge for multi-platform streaming (Twitch, Kick, X/Twitter)
- Local HLS stream for web playback
packages/server/.env:
The betting stack has been moved to a separate repository: HyperscapeAI/hyperbet. The duel oracle remains in Hyperscape for verifiable outcome publishing.
What Gets Started
| Service | Port | Description |
|---|---|---|
| Client | 3333 | Vite dev server with hot reload (dev mode) |
| Server | 5555 | Game server (Fastify + WebSockets) |
| CDN | 8080 | Asset server (Docker nginx, if started) |
Quick Play Guide
- Start the game - Your character spawns in a starter town
- Find green cubes (goblins) - Click to attack
- Gain XP - Level up Attack, Strength, Defense, Constitution
- Collect loot - Coins and equipment drops
- Visit shops - Buy tools (hatchet, fishing rod, tinderbox, hammer)
- Train gathering skills - Chop trees, mine ore, fish
- Train artisan skills - Light fires, cook food, smelt bars, smith equipment
- Press F5 - Toggle FPS debug panel to monitor performance
Controls & Keybinds
| Key | Action |
|---|---|
| Left-click | Primary action (attack, gather, eat, wield) |
| Right-click | Context menu |
| Shift-click | Drop item (inventory) |
| F5 or \ | Toggle FPS debug panel |
| WASD | Camera movement |
| Mouse wheel | Zoom camera |