Skip to content

Overview

This section describes the engine’s internals: the model each subsystem imposes on a game, how that subsystem behaves, and why it is shaped that way. It states the model and the guarantees; the exact surface is at APIs and the idioms are at Usage.

Each subsystem resolves one part of a browser game that is the same in every browser game, and the model it imposes is what makes a build’s behavior reproducible across runs and examinable from outside. Two properties run through every page. A game reaches the engine only through the scoped api handed to the function it is in, and everything the engine observes it broadcasts as an event a caller subscribes to.

PageCovers
FrameThe loop, simulated time, the clock behind delta time, and pacing.
ViewportThe fixed logical design size, the letterboxed fit, the measurement seam, and the per-frame resync.
InputNamed actions over bindings, magnitudes and edges, the pointer, and the touch layout catalogue.
AudioSynthesized and file-backed cues, the first-interaction unlock, and the cue events.
AssetsThe single asset root, path resolution, and the load events.
DiagnosticsNamed sources, reading them back, and the overlay drawn in device space.
Debug SurfaceThe object initialize returns beside the state, whose poses and readings a build is driven and read through from code.
RecordingThe wrapper over the drawing context, per-frame inherited state, and independently drawable frames.