Your Grid Should Be a Rule Authority, Not a Visual Helper

Apr 14, 2026

Your Grid Should Be a Rule Authority, Not a Visual Helper

Tactical RPG battle grid with selected unit, highlighted tiles, and visible enemy positions

A lot of tactical RPG grids start life as presentation.

You add tiles so movement is easier to read. You highlight reachable cells. You show a cursor. Maybe you tint attack range red and movement range blue. It works. The battle looks like a tactics game, and for a while that is enough.

The trouble starts when the grid keeps its visual job, but never gets the architectural one.

That is usually when movement legality, targeting checks, occupancy, and pathfinding begin drifting apart. The board still looks coherent on screen. The rules underneath it are not.

One script decides whether a tile is blocked. Another calculates movement range. A third one checks whether an attack can land. The UI builds highlights from its own logic because it needs fast feedback. Now you do not really have one grid system. You have several systems making spatial guesses in parallel.

That shape works longer than it should, which is part of the problem. You do not notice the drift right away. You notice it when one tile highlights as valid but movement fails. Or when an enemy appears targetable from a cell the unit can never legally reach. Or when a dead unit frees the space visually, but some other part of the game still thinks the cell is occupied.

At that point the bug does not feel spatial anymore. It feels random.

It usually is not random. It is a missing authority boundary.

What helped here was treating the grid as a rule layer instead of a rendering convenience.

The important job of the grid is not drawing tiles. It is answering spatial questions that every other system depends on:

  • is this cell valid
  • is it walkable
  • is it occupied
  • who is standing there
  • can this unit reach it
  • what path connects these two positions

That changes the rest of the battle more than it sounds like it should.

Input/UI -> ask grid what is legal
Action logic -> ask grid what is reachable
Targeting -> ask grid what is occupied
Visualization -> show what the grid already decided

Once the grid becomes the place where spatial legality lives, the rest of the battle can stop inventing local truth.

That does not mean the grid should own everything. It should not decide whose turn it is. It should not know whether an attack is a good idea. It should not manage battle outcome. But it should be the trusted answer source for spatial reality.

When the grid is only a visual helper, every new mechanic tends to smuggle in one more spatial rule somewhere convenient. Terrain cost ends up in movement code. Occupancy checks end up inside targeting. Hazard validation gets bolted onto action scripts. Before long, "where is this legal" is scattered across the project.

When the grid is treated as spatial authority, those mechanics have a place to attach.

A small example makes the difference obvious.

The fragile version looks like this:

# movement code checks one thing
if tile.is_walkable():
	move_to(tile)

# targeting code checks something else
if target_tile in attack_range:
	attack(target)

# UI code guesses legality for highlights
show_highlights(compute_tiles_somewhere_else())

The stronger version pushes those questions back through one authority:

if GridService.is_walkable(tile) and GridService.is_reachable(unit, tile):
	move_to(tile)

if GridService.is_occupied(target_tile) and is_in_attack_range(unit, target_tile):
	attack(target)

Even that small shift changes the feel of the whole codebase. Bugs get easier to localize because disagreement has fewer places to hide. Features get easier to extend because new spatial rules are added to a layer that already owns legality. And the UI gets less fragile because highlights are consuming rule output instead of pretending to define it.

It also pays off in places people do not always think about at first. AI gets more reliable when it reasons over the same spatial truth the player is playing against. Objectives get cleaner when positional checks do not need custom logic in every encounter. Death, movement, blocking, and terrain changes become easier to reason about because they all feed the same board state.

The grid should answer where play is legal.

Other systems can decide what to do with that answer.

If you want the bigger picture, I go deeper into how this same boundary connects to battle flow, action validation, combat resolution, and AI in the full tactical RPG architecture course.

GodotLabs

GodotLabs

Your Grid Should Be a Rule Authority, Not a Visual Helper | Blog