Documentation
Every page here is a file in the repository's docs/ folder, read as it is.
Start
Design
Sariema is an open-source native game engine that plugs into any React Native app as a Fabric component and runs games downloaded at run time, with no WebView. The host app ships the engine in its binary; each game…
The engine
crates/sariema-engine makes one engine of the lanes: the game runtime (sariema-runtime) stepped at a fixed 1/60 s with the collision module (sariema-physics), the animator (sariema-anim), the mixer (sariema-audio) and…
Game API
A Sariema game is data plus one WebAssembly module of logic. The engine calls the module once per fixed simulation step; the module reads that step's events and writes commands. Everything that repeats every frame…
Modules
Physics
crates/sariema-physics moves characters through a room: a deterministic kinematic character controller over 3D collision queries, with triggers, moving platforms, scripted moves along searched paths, and a camera…
Actors
An actor is a character or a prop that moves: a skinned mesh, its skeleton, its clips, its sockets and its face atlases. This page covers the whole path, from a glTF file to an animated actor drawn in a room:
Cutscenes
A cutscene is a JSON file (schemas/cutscene.schema.json) in the project's cutscene directory: the roles it casts, where each one starts, and the steps the engine plays. sariema build validates it against the schema,…
Audio
crates/sariema-audio is the engine's mixer: buses, streamed music with loop points, crossfades, stingers, ducking under voice, and loudness checks at packaging time. A game's sounds are packaged into a sound bank…
UI
crates/sariema-ui is the engine's in-game UI: a retained tree of boxes, text, images, rings and strokes laid out with flexbox, animated on the fixed simulation step, driven by multi-touch, and turned into one list of…
Platforms
Web and WebViews
The engine runs in a browser tab and in a React Native WebView as one WebAssembly module, whole games included: a game pack's logic, collision, animation, sound and HUD step as they do natively, to the same…
Performance
How to measure what a frame costs, where the cost goes, what the renderer does to keep it low, and what the numbers were on the reference machine.