Installation
Get a Quantum Forge game running in under 5 minutes.
Prerequisites
- Node.js 18+
- Git
Quick Start
Option 1: CLI Scaffold (Recommended)
bash
npx quantum-forge init my-game
cd my-game
npm run devThe CLI creates a complete project with Quantum Forge configured, Vite dev server, and the four-layer architecture in place. Choose from:
- Starter — minimal game loop with player movement
- Quantum Pong — full example with quantum mechanics, audio, AI opponent, and 75 tests
Option 2: Git Dependency
Add to an existing project's package.json:
json
{
"dependencies": {
"@quantum-realm-games/quantum-forge-framework": "git+ssh://git@github.com:quantum-realm-games/quantum-forge.git#framework-v1.9.1"
}
}Then import by feature:
typescript
import { Engine } from "@quantum-realm-games/quantum-forge-framework/engine";
import { PixiRenderer, GameLoop } from "@quantum-realm-games/quantum-forge-framework/rendering";
import { InputManager } from "@quantum-realm-games/quantum-forge-framework/input";
import { QuantumPropertyManager, ensureLoaded } from "@quantum-realm-games/quantum-forge-framework/quantum";Building Quantum Forge
The WASM module must be built from source:
bash
npm run setupThis interactive script:
- Detects or installs Emscripten
- Builds the WASM module (~30 seconds for small preset)
- Copies artifacts to
dist/
See Quantum Setup for build variants and configuration.
Vite Configuration
Add the Quantum Forge Vite plugin to serve WASM during development:
typescript
// vite.config.ts
import { quantumForgeVitePlugin } from "@quantum-realm-games/quantum-forge-framework/vite-plugin";
export default defineConfig({
plugins: [quantumForgeVitePlugin()],
build: {
rollupOptions: {
external: [/quantum-forge-web-api/],
},
},
});Verify
bash
npm run devOpen http://localhost:3000. If you see the starter game running, Quantum Forge is configured and ready.
Next Steps
- Project Structure — understand the four-layer pattern
- First Quantum Game — step-by-step tutorial
- Why Quantum? — what makes quantum different from
Math.random()