Skip to content

Storylet Engine JS 0.1.0

Choose a tag to compare

@github-actions github-actions released this 30 Aug 19:41
· 5 commits to main since this release

The first public release, shipping alongside the Unity, Unreal and Godot runtimes on the same
version. All four play the same .storyletsc bundle with the same behaviour, held to the
shared conformance corpus.

Added

  • The engine: load a compiled bundle, hold the shared state (@world and @story), open
    and close flows, save and load a game, subscribe to the trace and read the run log.
  • The flow: one playthrough. peek the stock, deal a hand, read the ranked result with
    the trace that says why each card is there, list outcomes, play one, and advance turns.
  • Qualities, scarcity and cooldowns, as the corpus pins them: ordered stage ladders,
    shared decks and cards claimed across flows, and per-flow redraw clocks.
  • describeBundle, which reports what a bundle offers without playing it.
  • The seeded PRNG (makePrng, shuffleInPlace): mulberry32, the algorithm every runtime
    implements identically, so the same seed deals the same hand in all four.

The download

The release zip carries @storylet-studio/runtime and @storylet-studio/play-helpers as
folders you copy into a project, plus storyletengine.min.js, a single self-contained
browser drop-in exposing window.StoryletEngine for a plain HTML page with no build step.

Both packages ship with their dependencies inlined, deliberately: nothing here is on npm,
so the zip has to stand on its own. The one exception is that play-helpers still imports
@storylet-studio/runtime from its sibling folder, because it wraps a live engine and a
private copy would leave the host with two of them.