Skip to main content

Overview

The @hyperscape/client package is the web game client:
  • Vite for fast builds with HMR
  • React 19 UI framework
  • Three.js WebGPU rendering (WebGPU required - no WebGL fallback)
  • Capacitor for iOS/Android mobile builds
  • Privy authentication
  • Farcaster miniapp SDK
WebGPU Required: The client requires WebGPU support. All shaders use TSL (Three Shading Language) which only works with WebGPU. There is no WebGL fallback. Requires Chrome 113+, Edge 113+, or Safari 18+ (macOS 15+).Breaking Change (Feb 2026): WebGL fallback was completely removed. Users on browsers without WebGPU will see an error screen with upgrade instructions. Check browser support at webgpureport.org.

Package Location

Screens

Located in src/screens/:

Streaming Entry Points (March 2026)

The client includes dedicated entry points for streaming capture (commit 71dcba8): Entry Points:
  • src/index.html / src/index.tsx - Main game (full UI)
  • src/stream.html / src/stream.tsx - Streaming mode (minimal UI)
Viewport Mode Detection:
Vite Multi-Page Build: The Vite configuration builds separate bundles for game and streaming:
Benefits:
  • Optimized streaming capture with minimal UI overhead
  • Separate bundles reduce streaming page load time
  • Automatic viewport mode detection for conditional rendering
  • Clear separation between game and streaming entry points

UI Components

Located in src/components/:

HUD Components

  • Health/Constitution display
  • Combat status indicators
  • Skills panel with XP progress
  • 28-slot inventory grid
  • Equipment slots display
  • Bank interface (unlimited storage)
  • Chat window
  • Minimap with compass

Game Components

  • Three.js 3D renderer
  • Camera controller (third-person, click-to-move)
  • Input handler (WASD movement, click actions)
  • Entity renderers (players, mobs, items)
  • VRM avatar display with emotes

Environment Variables

Running

Development

Opens at http://localhost:3333

Production Build

Mobile Builds

iOS

Requires macOS with Xcode installed.

Android

Requires Android Studio installed.

Capacitor Sync

Dependencies

Deployment

Cloudflare Pages

Key Files