Installation
Prerequisites
Section titled “Prerequisites”Before installing DownDraft Engine, ensure you have the following tools installed:
DownDraft uses Bun as its package manager and default JS runtime — games execute against the native platform library via runtime-adapted FFI (bun:ffi under Bun). Node+tsx (koffi) and Deno (Deno.dlopen) are also supported hosts via draft dev --runtime=node|deno and as packaged runtimes via draft release --runtime=node|deno (linux), but Bun is required regardless for dependency installation (bun.lock), bun test, and as the packager’s own host.
curl -fsSL https://bun.sh/install | bashRust (optional, for native modules)
Section titled “Rust (optional, for native modules)”Rust is only needed if you’re building the platform or audio native libraries from source.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shGet the Source
Section titled “Get the Source”git clone https://github.com/knackstedt/downdraft-engine.gitcd downdraft-engineInstall Dependencies
Section titled “Install Dependencies”bun installThis installs all workspace dependencies via Bun workspaces. Games are separate repos — if you develop a game alongside the engine under games/, run bun run link:games to link @downdraft/* packages into each game’s node_modules.
Verify Installation
Section titled “Verify Installation”Scaffold a game and run it to verify everything works:
draft new my-gamecd my-gamedraft devThis launches the game on the native runtime via its src/native-entry.ts entrypoint. You should see a native window with the WebGPU-rendered scene and devtools overlay.
Running an Existing Game
Section titled “Running an Existing Game”cd <game-directory> && draft devNext Steps
Section titled “Next Steps”- Development — Learn the dev workflow and project structure
- ECS Guide — Understand the entity component system
- CLI Reference — Explore the
draftCLI commands