Layout glyphs
. |
Floor |
# |
Wall |
O |
Hole |
E |
Exit |
, |
Rough patch (stops slide, re-slide any direction) |
@ |
Puck start (exactly one) |
Pieces are never glyphs — always entities:.
Positions
at: [x, y] — x right, y down,
[0, 0] is top-left.
Piece kinds (one minimal example each)
entities:
- id: npc-1
kind: npc
at: [1, 1]
dialogue:
- lines: [Hello!]
- id: sw-1
kind: switch
at: [2, 1]
trigger: pass # pass|rest, default pass
behavior: toggle # toggle|latch, default toggle
- id: door-1
kind: door
at: [3, 1]
open-when: sw-1 # absent = permanently closed
- id: coin-1
kind: collectible
at: [4, 1]
group: coin
- id: crate-1
kind: breakable
at: [5, 1]
durability: 2 # default 1
open-when grammar
expr := name | all(list) | any(list) | atLeast(n, list) |
exactly(n, list) | has(name)
Examples: has(gold-key),
atLeast(2, red)
groups
entities:
- id: sw-1
kind: switch
at: [1, 1]
- id: sw-2
kind: switch
at: [2, 1]
groups:
red:
- sw-1
- sw-2
Objectives
Every Objective is requirement: required or
requirement: bonus.
objectives:
- id: exit
kind: reach-exit
requirement: required
- id: loot
kind: collect-all
requirement: bonus
group: coin
Full guide:
docs/guide/world-format.md