▣
module · drop-in viewer
persist
The run's durable memory, in the world's runtime data under `firstlight/`. `require("firstlight.persist")`.
by·posted 1mo ago
What it does
firstlight.persist
The run's durable memory, in the world's runtime data under firstlight/.
require("firstlight.persist").
Persisted sections of Rules.state: run, body, hut, stores,
journal — one leaf each (firstlight/run, firstlight/body, ...).
Persist.load()— read the saved sections over the blackboard and restore the clock fromrun.elapsed. Returns whether a save existed.Persist.save(reason?)— write every section now.Persist.markDirty()— ask for a save at the next throttle window.Persist.tick(dt)— per frame; flushes a marked or detected change every few seconds (a store or structural value written straight onto the blackboard is detected by fingerprint).Persist.ensureSeed()— chooserun.seedonce per world and save it.Persist.hasSave(),Persist.wipe().
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.