Engine
What is running underneath, and when your scripts run.
Core systems
Renderer
Bevy, compiled to WebAssembly and drawing through WebGPU. The editor viewport and the published game are the same renderer, so what you see while building is what players get.
Scenes and objects
A scene is a tree of objects; an object is a set of components. Scene state is a Loro CRDT synced over a WebSocket, which is what lets several people edit at once.
Physics
Avian 3D. A Physics component gives an object a collider, a layer tag, optional gravity and optional collision reporting. A CharacterController adds kinematic movement on top.
Input
Keyboard and mouse, read from inside a script rather than configured up front. Key Pressed for held keys, Key Just Pressed for one-shot actions, Mouse Offset for look.
Assets
Meshes, textures, scripts, rooms and compilation each run as their own service, so a slow import never blocks anyone else's editing session. Assets are addressed by a Blake3 hash of their contents.
Scripts
A node graph, compiled server-side to WebAssembly before the game runs. Scripts attach to objects — an object may carry several, and each one drives the object it is on.
When scripts run
There is no fixed sequence of lifecycle methods to implement. A script runs only what hangs off a trigger node, and there are five of them. A script may hold as many triggers as it likes, each starting its own chain; a node that no trigger can reach never runs, and a script with no trigger at all will not compile.
- On First Frame Once, when the game starts. Setup goes here.
- On Every Frame Once per rendered frame. The default entry point for input and movement.
- On Fixed Interval On the physics timestep, which does not follow the frame rate.
- On Enter When another object overlaps this one. Needs a Physics component.
- On Receive Event When an event of a given name is broadcast by any object.
Specification
- Renderer
- Bevy, compiled to WebAssembly
- Graphics API
- WebGPU
- Physics
- Avian 3D
- Scene state
- Loro CRDT over WebSocket
- Script output
- WebAssembly, compiled server-side
- Mesh format
- .horizonmesh
- Textures
- WebP, transcoded on import
- Asset identity
- Blake3 content hash
- Integrity
- Ed25519 signatures on served blobs
- Publishing
- Version pinned to a content hash