Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofpackage procgen.package·originates fromworld 07158574-5…

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 wrot…

by◐lumi·posted 2d ago
What it does

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.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

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 edit session 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). It lives under `/zero/source/_cache/procgen/<space>/`: <key>.record the record (JSON): what the output is, the version of the code that made it (`maker`) and the blobs it names by address; <sha256>.<ext> each blob, named by the SHA-256 of its bytes, so two records that hold the same bytes store them once. A key names an output by what it is made from alone (`key`), so the record stays readable across versions of the code that makes it: a process that only shows the world stands any record it finds, and an engine that authors the world makes the output again where the record's `maker` is not the version it runs (`version`).

sha(bytes: string) → string

argtypedescription
bytesstring

folderOf(space: string) → string

argtypedescription
spacestring

key(space: string, text: string) → string

The key an output of `space` made from `text` is filed under: the SHA-256 of the space, the record format and the text, as hex.

argtypedescription
spacestringThe kind of output.
textstringWhat the output is made from, in canonical form.

examples

local key = results.key("pieces", "box{depth:1,height:1,width:1}{}")

version(paths: { string }) → string

The version of the code at `paths` (library assets: modules, packages): their checksums in the manifest, joined and hashed. An output whose record names another version was made by other code.

argtypedescription
paths{ string }The library paths of the code that makes the output.

examples

local maker = results.version({ "/zero/source/libs/@builtin/systems/quickGeometry.package" })

writes( ) → boolean

Whether this process makes outputs and writes them here: an engine that authors the world, in edit mode and in the play of an editor session (a write in play goes to the world's source, past the play's shadow). A runtime engine, a player's, reads what an author's engine wrote.

examples

if results.writes() then results.write("pieces", key, record) end

read(space: string, key: string) → any

The record filed under `key` in `space`, or nil when the world holds none of this format.

argtypedescription
spacestringThe kind of output.
keystringThe key (`key`).

examples

local record = results.read("pieces", key)

blob(space: string, address: string, ext: string) → string

The bytes of the blob a record names by `address` in `space`, or nil when the world does not hold it.

argtypedescription
spacestringThe kind of output.
addressstringThe blob's address, as a record names it.
extstringThe blob's extension.

examples

local bytes = results.blob("pieces", record.mesh, "zmsh")

put(space: string, bytes: string, ext: string) →

Write `bytes` as a blob of `space` unless the world holds it already, and answer its address.

argtypedescription
spacestringThe kind of output.
bytesstringThe blob's bytes.
extstringThe blob's extension.

examples

local address = results.put("pieces", zmsh, "zmsh")

write(space: string, key: string, record: { [string]: any }) →

File `record` under `key` in `space`. Every blob the record names is written first (`put`), so a record in the world names only blobs already there.

argtypedescription
spacestringThe kind of output.
keystringThe key (`key`).
record{ [string]: any }The record's fields; `format` is set here.

examples

results.write("pieces", key, { maker = maker, mesh = address, triangles = 12 })

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.