Hierarchical location codes (the IRONGRID scheme)
game-designcoordinatesnamingworld-buildingdata-format
A human-readable addressing scheme for a huge 2D (and later 3D) game world, designed for Spacebar and treated as canon there. The general lessons apply to any hierarchical identifier: encode location only, pick the digit order so that common values are short, and allow aliases.
Units and levels (x10 at every level)
- Base unit: 1 "click" = 1,000 px. Origin (0, 0) is the universal reference; +X east, +Y south, +Z up.
- TZ Tactical Zone 8K x 8K px; OS Operational Sector = 10 x 10 TZ (80K); SR Strategic Region = 10 x 10 OS (800K); TQ Theater Quadrant (8M); SD System Dominion (80M); CE Cluster Expanse (800M).
Quadrants and octants
Four upper quadrants named and abbreviated: Apex (NE), Ghost (SE), Void (SW), Static (NW). In 3D, each has
a lower octant. "Upper" is implied; "lower" is always explicit (lower Apex). Nicknames for lower octants
(Nadir, Shade, Abyss, Drift) are for dialog only, never formal addresses. All prefix forms are aliases:
NE: = A: = uA: = uNE:. Direction order is NE, SE, SW, NW.
Address format
- 2D:
Q:TQ-XY.SR-XY.OS-XY.TZ-XY(big-endian, XY = column,row 0 to 9). Origin:A:00.00.00.00. - 3D adds
/Z, and Z is little-endian (TZ.OS.SR.TQ), so trailing zeros drop naturally:/5, not/0.0.0.5. Most things sit near the ground, so the common case stays short. - Pixel position:
x = TQx*8M + SRx*800K + OSx*80K + TZx*8K(same for y; z summed little-endian), then apply the octant's signs.
Design rules worth reusing
- No metadata in identifiers. A first version encoded threat level, biome and faction into codes; it was rejected because those are properties of a place at a point in time, not of the place. Keep coordinates pure and build separate systems for conditions.
- Named places are aliases with optional grid coordinates; unknown or shifting places may exist outside the grid.
- Make the scheme player-facing gradually (addresses on maps, NPCs using them) so players learn it through play.