Tile-board grid mode
A discrete board mode inside the field overlay. A field script hands the engine a small grid; the game fills it with random tiles, and the player then steps one cell per D-pad press. Walls block, animated tiles cycle as you walk, and reaching an event or trigger tile ends the board and raises story flags. No shipped scene installs one.
At a glance
- Installed by
- Field-VM op
0x49sub-op0x05, a fixed 14-byte inline header (_DAT_8007B450) - Controller
- Walk state machine
FUN_801EF2B0in PROT 0897, fifteen states, jump table0x801CF65C - Cells
width x heightbytes, heap-allocated and filled procedurally- Drawing
- One field actor per cell value, repositioned and drawn per cell; the board carries no geometry
- On the retail disc
- A disc-wide census of every scene script finds no install site
- Port
engine-minigames::tile_board+World::tick_tile_board;LEGAIA_TILE_BOARD_DEMO=1synthesises an install
This is not town movement
Towns use free movement through a separate controller, covered on field locomotion. The board shares the overlay and reads the same pad, but its one-cell steps, per-cell tile actors and procedural fill are its own. It is a puzzle / board minigame surface that the shipped game leaves script-reachable and unused.
The board and its state machine
Cell values
| Value | Meaning |
|---|---|
2 | wall: a destination cell of 2 rejects the move |
3..6 | walkable terrain; writes the facing octant (v - 3) * 2 |
7 | trigger: routes the walk machine to its exit |
8..0xA | event tile: consumes the header’s two flag bases, and the walker stops half a step short of its centre |
0xB..0xE | animated: every plain arrival steps each one 0xB → 0xC → 0xD → 0xE → 0xB across the whole board |
| other | plain floor |
Each tile is 0x80 world units and the walker sits on the centre: world = (header_origin + cell) * 0x80 + 0x40 on each axis.
One step
- A Triangle edge opens the quit prompt.
- The held pad is remapped through a quantised 45-degree rotation, so “screen up” follows the octant the scene authored.
- One direction is decoded, the destination cell is bounds-checked and tested against
2; a wall or the edge is a bonk and the state stays put. - An accepted step commits the new cell and walks the actor to its centre, each axis clamped to
0x20a tick.
What an event tile writes
With v = cell - 8 and the header’s two bases A and B, state 8 sets system flag A + v + 1, tests flag B + v, and when that test is clear also sets flag A. Each of the three event cells owns one flag above the base, the base records “an event cell was reached”, and the B bank lets a script pre-mark cells whose reach should not raise it.
The board ends by zeroing a byte in the scene control block. The op-0x49 subsystem actor polls it, retires, and the parked opcode reads that as done and advances past its operand block.
See also
The header layout, the procedural fill, the octant store, the walk legs and the render tail are in docs/subsystems/tile-board.md.