Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit90c9d5108d

README.md

procgen.results

What procgen made, kept in the world by what it is, so a process that needs the same output reads it instead of making it. An author's engine makes an output once and writes it here; entering play, a later boot, a collaborator's engine and a player's engine read the bytes it wrote.

  • A space is one kind of output (pieces: the meshes of quick-geometry pieces; fxprogram: the programs of effect entries). It lives under /zero/source/_cache/procgen/<space>/: <key>.record (JSON: what the output is, the version of the code that made it as maker, and the blobs it names by address) and <sha256>.<ext> (each blob, named by the SHA-256 of its bytes).
  • key(space, text) names an output by what it is made from alone, so a record stays readable across versions of the code that makes it. version(paths) states the version of that code (the checksums of the library paths named).
  • writes() answers whether this process makes outputs and keeps them: an engine that authors the world, in edit mode and in the play of an editor session (its writes go to the world's source past the play's shadow). A runtime engine, a player's, takes any record it finds; an author's engine makes the output again where a record's maker is not the version it runs.
  • read(space, key), blob(space, address, ext), put(space, bytes, ext) (writes a blob once and answers its address) and write(space, key, record) (files a record, after the blobs it names).

A world keeps what is under _cache like any other content, so zm add, zm commit and zm push carry it to every engine that opens the world.

Part of @builtin::systems.procgen; required as @builtin::systems.procgen.results.