Project Mammut Wiki
Project Mammut is currently in open beta. The UI is being updated a lot during this time, and you may run into bugs. If you'd like to help develop the engine or suggest features, come find us on Bluesky or Discord.

Engine Runtime

Written 5 Aug 2026 · Updated 8 Aug 2026 · Requires Mammut 0.6.2+

The Runtime is the part of Project Mammut that actually plays a game. It is a self-contained collection of JavaScript, HTML, and CSS files that are bundled together with your file and scripts. Whatever the Build Panel produces is a complete, standalone copy of the Runtime plus your compiled project, and that combination is what ships to players.

The runtime files are completely open to view, edit and update to match your game's needs.

To see more information about use of the Runtime, see the Runtime Licence page.

This page gives an overview of what the Runtime is made of. For the full method-by-method API, see Coding.

Build Contents

A build is the Runtime's template files with your project's data and assets merged in:

  • index.html and style.css: the page shell every game runs inside.
  • A set of manager scripts, each a self-contained module: Application, Store, SceneManager, AudioManager, SaveManager, InputManager, and ParticleEngine.
  • Revealer: the dialogue and text-reveal engine.
  • Your compiled scenes: each .mmsc scene becomes its own script, built from a shared base prototype so every scene inherits the same lifecycle plumbing.
  • Your project's assets: images, audio, fonts, and chapters.

These load in a fixed order when the game starts, finishing with a main.js that hands control over to SceneManager to bring up the first scene.

The runtime's components

Each of these is an independent module with its own responsibility.

  • Application: platform-level concerns. Quitting, fullscreen, restarting, and opening URLs, all handled consistently whether the game is running as a desktop app or in a browser.
  • Variable Store: your project's runtime variables, plus the save-game snapshot built from them. This is what {$varName}-style dialogue markup reads and writes.
  • SceneManager: loading, switching, and attaching scenes. Only scenes needed at boot are loaded eagerly; everything else loads on first use.
  • Revealer: reveals dialogue text and dispatches the markup events ([ActionName(...)] tags and built-in lifecycle events) that scene scripts respond to.
  • AudioManager: controls the music, ambient sound, sound effects, and voice, each on its own volume bus.
  • InputManager: keyboard and gamepad input, exposed as both events and polling.
  • SaveManager: writing and restoring save slots, built directly on top of Store's snapshot.
  • ParticleEngine: drives Particle nodes.

Pages in this section