Ground types
repo: land-of-lor (game + director + tools/world-editor) and this workspace (deliverables, site/play) · depends on: world-map-and-portals · updated 2026-08-18
What this is
Kris wrote the spec on 2026-08-17: land-of-lor/docs/specs/GROUND_TYPES.md. Read it first;
this overview does not restate it. The short version: a cell’s ground is a hexagram. The
lower trigram says what the ground is — Lake is deep water, Mountain is a mountain,
Earth is grass, Wind is sand, Fire is lava, Water is water, Thunder is snow and ice, Heaven is
stone, tiles and decorative floors. The upper trigram is one of eight flavours of that
type. Water and lava sit lower than the ground around them; mountains stand up out of the
cell (taller when ringed by eight more); a cell holds exactly one type but the picture shows
soft transitions to its neighbours rather than hard block edges.
This epic is the implementation of that spec, end to end: the lookup that puts the hexagram at the centre of the code, the storage and the wire, the rendering, the eight looks and their variations, painting every existing Area (plain grass everywhere; a river through the Village; every type on show in the Badlands), and an area map editor reachable from the world editor.
Where it started from
Until this epic there was no per-cell data anywhere: the floor of every Area was one flat green
plane, the server grid held only walkable / wall / portal flags, and three places in the code
carried an explicit “ground types don’t exist yet” placeholder waiting for exactly this —
grid.gd’s build_for_area, area_server.gd’s _area_payload (“when authored terrain
exists it gets a cells key right here”), and the disabled Edit the cell map · later
button in the world editor’s inspector. The parked world-traversal-and-ground epic was
waiting on the spec that now exists; its one task is answered by it, and that epic stays
parked for the deeper traversal questions (fertile ground, what a player does to ground on
purpose) which this spec deliberately does not settle.
Decisions taken with Kris (2026-08-17, planning session)
- Mountain and Deep Water block movement now, on the server and in client prediction
through the one shared
is_walkable. Water and Lava stay open — creatures don’t have a nature yet, and the spec says not to restrict them until they do. - Placeholder looks are procedural, generated in the engine from data in
elements.js; a folder convention lets a real texture override any of the 64 later without code. - The area editor is built directly in the world editor’s own visual language — it is Kris’s local tool, not a public surface — rather than going through a design brief first.
- A new epic, not the parked one:
world-traversal-and-groundwas scoped as spec-only, and this is a build.
Design decisions the tasks are built on
Written down once so sessions don’t re-derive them; the full reasoning is in the planning session’s plan and in each task file.
- Ground data lives inside the two existing globals in
game/shell/elements.js—LOR_TRIGRAMS[<lower>].ground(the eight types) andLOR_ELEMENTS[kw].groundVariant(the 64 flavours) — because the card editor regenerates that file from exactly those two objects; a third global would be lost on Kris’s next export. - Storage is a new
areas.ground SMALLINT[]column, its own column on purpose: thestateblob belongs to the world process’s snapshots and the loader must be able to write ground. - The wire carries ground as a plain array on
hello_ack.area.ground; the protocol version moves to 4 because a client that can’t see a mountain would walk into an invisible wall. - Authored ground is a per-area file,
game/content/areas/<slug>.ground.json, one row of cells per line, applied byload-worldlike the world file — never embedded inspellgrove.world.json. - Portal cells, the hub entry cell, the default spawn (1,1) and the home landing cell must stay passable and mutually reachable; the loader, the editor and the generators all refuse paint that breaks this.
- The floor is one procedurally built mesh per Area on an inset lattice (so a one-cell river is a trough, not a row of dimples); transitions ship first as vertex-colour blends, then as a textured shader; mountains are one MultiMesh.
- Unpainted ground is hexagram 2, Earth over Earth.
Non-goals
- Restricting Water and Lava by creature nature (no natures yet).
- Ground that changes during play (terraforming) — the storage leaves room for it, nothing here builds it.
- An area map viewer on the site or in the game.
- The fertile-ground rule and the rest of
world-traversal-and-ground’s questions. - Real art. Everything here is a placeholder that looks like one, by the project’s stated policy.
Relevant docs
land-of-lor/docs/specs/GROUND_TYPES.md— the spec (human-owned; agents read only).land-of-lor/docs/specs/CORE_ENTITIES.md— Area / Portal; explicitly left ground undefined.land-of-lor/docs/README.md§3, §7 — the floor slot, “a lava field is Mountain-over-Fire as ground”, changing lines. One tension to keep in view rather than resolve: §3 says “stone is a Mountain-faced hexagram”; the spec makes Heaven-lower the stone and Mountain-lower the mountain.land-of-lor/game/README.md— the world map, its editor,load-world, the droplet deploy.epics/world-map-and-portals/— the Area/Portal model this builds on.
Status
8 done
Next: Done — all eight signed off 2026-08-18. The look itself continues in ground-look-and-levels.
Deliverables (3)
- #13 — The first painted tiles — sixty-four textures land on the ground of Lor (2026-08-18)
- #12 — The Village before the real tiles — what the ground looked like on 18 August 2026 (2026-08-18)
- #10 — The ground has types — 64 kinds of ground, a river through the Village, and mountains in the Badlands (2026-08-17)
Tasks (8)
done (8)
-
ground-types/001— The model — a hexagram is a ground type, in every runtime (priority 1, estimate M ) -
ground-types/002— Storage, hydrate, wire — areas.ground, the hydrate file, hello_ack, protocol 4 (priority 1, estimate L ) -
ground-types/003— Client rendering, stage 1 — the lattice mesh, sunken cells, mountains, and people standing in water (priority 1, estimate L ) -
ground-types/004— Client rendering, stage 2 — textured transitions, and the renderer check on web and phone (priority 1, estimate M ) -
ground-types/005— Content pipeline — ground files, the loader, presets, and the six painted Areas (priority 1, estimate M ) -
ground-types/007— The area map editor — paint an Area's ground from the world editor (priority 1, estimate L ) -
ground-types/008— Verify, deploy, ship — the ground goes live, on the web and on the phone (priority 1, estimate M , delivers #10) -
ground-types/006— The looks — tune the eight ground types and their 64 variations (priority 2, estimate M )
Ask an agent about this epic
Paste your AI Task Runner API key once. It stays in this browser and is sent only to kris.ai-task-runner.com.
Also available as raw markdown.