Skip to content

Rune Engine

Rune Engine is the animation-first 2D rendering core behind Story. It exposes a managed .NET SDK over an explicit C ABI, commits immutable snapshots, and replays them on a native render thread for windowed, offscreen, preview, and export workflows.

Animation is data, not a tick loop

  • RuneValue resolves from analytical spring, bezier, physics, and expression descriptors at frame time
  • one monotonic clock drives preview, capture, and export with the same curve math
  • settle metadata keeps seeking, waiting, and deterministic rendering grounded in the same animation descriptors

Mutable nodes, immutable snapshots

  • managed callers record onto mutable RuneNode authoring state
  • node.Commit() publishes an immutable snapshot tree
  • RuneContext.Submit(snapshot) chooses what a Surface renders
  • automatic/manual runtimes and window/offscreen surfaces share the same replay model

Current capability surface

  • drawing — rects, rounded rects, double-rounded rects, ellipses, arcs, paths, trimmed strokes, gradients, image brushes, nine-slice, box shadows, and shader programs
  • compositing — child snapshot replay, group opacity, clips, motion blur, planar Layer 3D, and explicit whole-target clear plus full-root replay
  • text and resources — native text shaping with managed line layout, shared image/font/shaped-text/nine-slice/shader resources, and slot-backed retained brush/path realizations

Managed ↔ native boundary

  • RuneEngine, Surface, RuneContext, RuneNode, and Snapshot stay as thin .NET wrappers over a cdecl native ABI
  • offscreen readback and D3D11 image export support deterministic capture and media pipelines
  • the current audited backend is Direct2D on Windows with RID-specific native assets

Story relationship

Story bakes script actions into snapshot-backed playback, then reuses the same seek-and-render core for preview, frame export, cue export, live presentation, and MP4 export.

Understand the Engine systems

Read these chapters in order for the complete mental model:

  1. Architecture and runtime — Engine, Surface, Context, Node, runtime modes, and frame flow.
  2. Snapshots, commit, and replay — mutable authoring state becoming immutable render data.
  3. Animation and derived values — RuneValue, analytical curves, repeat, expressions, path sampling, settle, and seek.
  4. Drawing commands and paths — command/data recording, brushes, transforms, paths, clips, and replay.
  5. Resources and lifetime — global resources, snapshot ownership, slots, and cleanup.
  6. Compositing, layers, and effects — child boundaries, opacity, motion blur, Layer 3D, and current full replay.
  7. Text shaping and layout — native shaping, managed layout, metrics, and current public boundaries.
  8. Interop and capture — managed/native ownership, manual rendering, readback, and frame export.

Current maturity

  • Rune.Engine package version 0.1.0-beta.1
  • packaged native assets for win-x64 and win-arm64
  • public beta is Windows-first and spec-driven; the current audited backend is Direct2D

Go deeper

Rune Project brings Rune Story authoring together with the Rune Engine rendering foundation.