Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

proc

Code-authored, graph-backed procedural generation for the Zero engine.

A graph is one function of g: proc.define(function(g) ... end). Nodes are called by family and name (g.<family>.<name>({ ... })), inputs are declared with g:input(name, default, opts), the returned table is the graph's outputs, and io.output is how the graph stands in the world. builder.module/README.md holds every rule of that form.

This module owns the whole procedural model: the graph builder + data model, the operation registry, the type system, the lazy cached evaluator, deterministic scoped hashing, and the node-family op implementations. Authored .procGraph graphs are persisted via procGraph.assetType; the procgen.preview / procgen.spawn operations live in procgen.toolbox and are invoked as tools: tools.use("procgen", "preview", args) from a script or an agent's tool_exec script, or zero procgen preview in the shell. Generated meshes/materials/textures/bundles are persisted through their own .assetType.

An op family can also come from outside this package: a .procPack asset registers its ops in the same registry, called as g.op.<id>(...) exactly like the ones shipped here (proc.registerPack(name, ops) is what it registers through, and what a test or a tool calls to hold a family for the life of one VM). terrain.* is one such pack, shipped in terrainSystem.package/procPacks/ and covering a whole landscape; guides { path = "systems/terrainSystem/documentation/terrain" } is its guide.

To find out what the registry holds, use the procgen toolbox: searchNodes searches it and describeNode describes one node or op. proc.search_ops(query) and proc.schema(id) are the same answers in-process, for a graph builder looking something up while it runs.