Expand description
Terrain transitions (docs/spec/FORMAT.md section 13): the profile’s
rules that choose the edge, corner and variant tiles around painted
terrain, and the deterministic resolver that applies them.
A world’s source stores only the terrain a brush paints.
Transitions::resolve_chunk derives a chunk’s ground tiles from its
terrain and its neighbours’, across chunk edges, so the compiler, the
editor and every other tool draw the same tiles.
Structs§
- Pattern
- The variants of one pattern, at least one, with the running sum of their weights.
- Resolved
Chunk - A chunk’s ground tiles with transitions applied: for each ground layer,
each tile’s prototype, or
Nonefor an empty tile. Values borrow from the source grids and the transitions. - Terrain
- One terrain: the prototypes that are it when painted.
- Transition
- One transition of a terrain.
- Transitions
- A profile’s terrain transitions, as read and checked by the loader.
- Variant
- One variant of a pattern’s tile.
Enums§
- Draw
- Where a transition draws.
- Model
- The neighbourhood a transition reads, and the patterns it maps to tiles.
Constants§
- MAXIMUM_
TERRAINS - Most terrains a transitions document declares.
- MAXIMUM_
TERRAIN_ PROTOS - Most prototypes one terrain lists.
- MAXIMUM_
TERRAIN_ TRANSITIONS - Most transitions one terrain has.
- MAXIMUM_
TILE_ TRANSITIONS - Most transitions resolving one tile evaluates, however large the document: the transitions of the tile’s own terrain and of the terrains of its eight neighbours, since an outside transition draws only next to its terrain.
- MAXIMUM_
TRANSITIONS - Most transitions a transitions document has in all.
- MAXIMUM_
VARIANTS - Most variants one pattern lists.
- MAXIMUM_
WEIGHT - Largest weight of a variant.
- TRANSITIONS_
FORMAT - The
formatof a transitions document.
Traits§
- Terrain
Source - Where the resolver reads painted terrain: the ground grids of chunks by
address. A
Planeis one; an editor can implement it over its own chunks, such as ones with unsaved edits.
Functions§
- variant_
hash - The hash that picks a tile’s variant (
docs/spec/FORMAT.mdsection 13): the transition’s seed and the tile’s layer and plane coordinates, mixed in that order, so the same world always picks the same variants.