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
Package Location
Screens
Located insrc/screens/:
| Screen | Purpose |
|---|---|
LoginScreen | Privy authentication |
UsernameSelectionScreen | First-time username entry |
CharacterSelectScreen | Choose existing character |
CharacterEditorScreen | Create/edit character (VRM preview) |
DashboardScreen | Game hub and lobby |
GameClient | Main 3D gameplay |
LoadingScreen | Asset loading state |
StreamingMode | Optimized streaming capture (minimal UI overhead) - NEW March 2026 |
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)
- 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 insrc/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
Production Build
Mobile Builds
iOS
Requires macOS with Xcode installed.Android
Requires Android Studio installed.Capacitor Sync
Dependencies
| Package | Purpose |
|---|---|
react | UI framework (v19) |
react-dom | React DOM renderer |
vite | Build tool |
three | 3D rendering |
@capacitor/core | Mobile builds |
@hyperscape/shared | Core engine |
@privy-io/react-auth | Authentication |
@farcaster/miniapp-sdk | Farcaster integration |
styled-components | CSS-in-JS |
tailwindcss | Utility CSS |
livekit-client | Voice chat |
Deployment
Cloudflare Pages
Key Files
| File | Purpose |
|---|---|
src/index.tsx | React entry point |
src/game/ | Game loop and logic |
src/screens/ | UI screens |
vite.config.ts | Vite configuration |
capacitor.config.ts | Mobile configuration |
wrangler.toml | Cloudflare Pages config |