Grid chain

This page is the canonical reference for the Grid chain in GridPlacement 6.0.

The grid chain is the sequence of systems and state that makes the grid authoritative: coordinate math, bounds, occupancy, and how placement/manipulation read and mutate that state.

Boundary

  • Core owns the authoritative grid state
    • Occupancy, bounds, coordinate math live in engine-agnostic Core.
  • Godot owns presentation
    • Tilemap visuals, highlights, and input are engine-side.

6.0 grid chain

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
Grid configuration (dimensions/settings)
Grid state (authoritative)
  - bounds
  - occupancy
  - indexing
Grid services
  - query occupancy
  - apply placement/removal updates
Consumers
  - Targeting chain (snap/clamp)
  - Placement chain (validate + commit)
  - Manipulation chain (move/demolish)

Key invariants

  • Bounds are authoritative: any chain validating positions must respect grid bounds.
  • Occupancy is authoritative: placement commits update occupancy; removal clears it.
  • Coordinate conversion is deterministic: the same world/grid conversions must be used consistently.

Output contract

What the grid chain guarantees:

  • A stable model of what tiles are occupied and what the grid bounds are.
  • Deterministic coordinate math helpers.

What it does NOT guarantee:

  • It does not decide input routing.
  • It does not decide visuals.

Existing deep dives