Open source · Apache-2.0

The game engine that fits inside your app.

Sariema is written in Rust on wgpu. Games ship as data packs with sandboxed WebAssembly logic, and step to the same hash on desktop and in the browser.

examples/climbStill frameThe engine in your browser, as WebAssembly

Measured, not promised

Apple M5, Metal, medium tier, release builds; medians of three repetitions on a shared machine. From the performance notes.

CPU for one step of examples/climb and its frame at 1920×1080
0.88ms
GPU for that frame: room, actors, HUD and post-processing
1.21ms
actors walking under collision, each looping a clip, in 1.36 ms a step
2,000
render passes for the full look, down from 23; a frame's CPU follows the pass count
16

One engine, every module wired

Write the game, then put it anywhere

A game's logic, with sariema-sdk.

use sariema_sdk::{Command, Ctx, Entity, Event, Events, Game, Kind, game, id};

const NEAR_FRIEND: u32 = 1;
const MEET: u32 = id("meet");

pub struct Hello {
    hero: Entity,
}

impl Game for Hello {
    fn new(ctx: &mut Ctx<'_>) -> Hello {
        let hero = ctx.spawn(Kind::Actor, id("hero"));
        ctx.send(Command::SetHero { entity: hero, speed: 2.0 });
        ctx.send(Command::Zone { zone: NEAR_FRIEND, center: [0.0, 0.0, -8.0], radius: 3.0 });
        Hello { hero }
    }

    fn tick(&mut self, ctx: &mut Ctx<'_>, events: Events<'_>) {
        for event in events {
            if let Event::TriggerEnter { trigger: NEAR_FRIEND, entity } = event {
                if entity == self.hero {
                    ctx.bind(id("hero"), self.hero);
                    ctx.play_cutscene(MEET);
                }
            }
        }
    }
}

game!(Hello);

Where it runs

Works today

Desktop

The sariema CLI and its window player, natively through wgpu.

Works today

Web

WebGPU, or WebGL2 through the downlevel path, with the native engine_hash.

Works today

App WebViews

WKWebView and Android's System WebView run the same web package.

Planned natively

React Native

Inside react-native-webview now; a native Fabric component is the design's goal.