Skip to main content

Prerequisites

Before you begin, ensure you have:
  • Bun v1.1.38 or higher
  • Git LFS for large file support (game assets)
  • Docker (optional, for CDN and PostgreSQL)
  • Privy account for authentication (optional)

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 CDN

The CDN serves game assets (models, textures, audio, manifests):
This starts a Docker nginx container on port 8080. The server will fetch manifests from the CDN at startup.
5

Start the game

Development mode (with hot reload):
Production mode:
Open http://localhost:5555 in your browser.
The server fetches manifests from PUBLIC_CDN_URL at startup. In development, it skips the fetch if local manifests exist.
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.

Play Online

You can play Hyperscape online without installing anything:
The staging environment is updated automatically when changes are merged to the staging branch. Use it to test new features before they reach production.

Running with AI Agents

To run the game with ElizaOS AI agents:
This starts both the game and ElizaOS runtime concurrently:
  • Game server on port 5555
  • Client on port 3333
  • ElizaOS runtime on port 4001
The AI agent will connect as a player and autonomously play the game using LLM-driven decision making.
Requires ElizaOS 1.7.0+ with an LLM provider (OpenAI, Anthropic, OpenRouter, or Ollama) configured in your environment variables.

AI Agent Features

  • THINKING+ACTION format - Agents explain their reasoning before acting
  • Target locking - Agents finish killing one mob before switching
  • Force flee - Auto-flee at less than 25% health with threats nearby
  • Combat readiness - Agents assess if they’re prepared for combat
  • Goal templates - Structured beginner flows (woodcutting, mining, combat)
  • Real-time thoughts - Watch agent decision-making in the dashboard

What Gets Started

The server fetches manifests from the CDN at startup. In production, manifests are served from Cloudflare R2. In development, the local CDN serves them from packages/server/world/assets/.

Quick Play Guide

  1. Start the game - Your character spawns in Central Haven (starter town)
  2. Find green cubes (goblins) - Click to attack
  3. Gain XP - Level up Attack, Strength, Defense, Constitution, Prayer, Agility
  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. Challenge players - Visit the Duel Arena to challenge other players to PvP combat
  9. 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