Skip to main content

Prerequisites

Before you begin, ensure you have:
  • Bun v1.3.14 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+)
Hyperscape requires WebGPU for rendering. All shaders use Three.js Shading Language (TSL) which only compiles to WebGPU. Browsers without WebGPU support will show an error screen with upgrade instructions. Note: Safari 17 support was removed - Safari 18+ (macOS 15+) is now required.

Installation

1

Clone the repository

2

Configure environment (optional)

Create .env files if you want persistent authentication:
Set your Privy credentials:
  • packages/client/.env: Set PUBLIC_PRIVY_APP_ID
  • packages/server/.env: Set PRIVY_APP_ID and PRIVY_APP_SECRET
3

Build the project

First build takes 5-10 minutes due to PhysX WASM compilation. Subsequent builds are cached.
4

Start the game

Production mode:
Open http://localhost:5555 in your browser.Development mode (with hot reload):
Without Privy credentials, the game runs in anonymous mode where users get a new identity on every page refresh. Characters will appear to vanish because they’re tied to the old anonymous account.

Running with AI Agents

To run the game with ElizaOS AI agents:
This starts the game server plus the ElizaOS agent runtime. The AI agent will connect as a player and autonomously play the game.
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:
This starts:
  • 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
Streaming Options:
RTMP Configuration: Set stream keys in 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

Quick Play Guide

  1. Start the game - Your character spawns in a starter town
  2. Find green cubes (goblins) - Click to attack
  3. Gain XP - Level up Attack, Strength, Defense, Constitution
  4. Collect loot - Coins and equipment drops
  5. Visit shops - Buy tools (hatchet, fishing rod, tinderbox, hammer)
  6. Train gathering skills - Chop trees, mine ore, fish
  7. Train artisan skills - Light fires, cook food, smelt bars, smith equipment
  8. Press F5 - Toggle FPS debug panel to monitor performance

Controls & Keybinds

Commands Reference

Next Steps

Architecture

Learn about the monorepo structure

Development

Set up your development workflow