← All journal notes

Tactical design

What can an interactive pathfinding demo teach a player?

An interactive pathfinding demo can help you understand why a route changes when destinations, obstacles or movement costs change. Its biggest benefit is making a rule visible: you can predict a result, change one input and compare the outcome. It can't tell you how a particular game handles enemies, hidden information or action budgets unless those rules are explicitly represented.

You don't need to be a programmer to get something out of it. We'd treat a demo as a small puzzle about what the system knows and what it's trying to minimise, and aim to walk away with better questions for the next movement preview you meet.

Which resource is a useful starting point?

Start with a resource that explains its inputs alongside the animation. Knowing what the colours, numbers and controls represent matters more than watching an impressive pattern spread across a board.

Red Blob Games' introduction to A* has interactive diagrams of pathfinding, including movable endpoints, search exploration and movement-cost comparisons. It describes locations and their connections as a graph instead of assuming the artwork defines movement, and its movement-cost section distinguishes counting steps from adding costs.

As a player, begin with the diagrams and the explanations around them, and leave the code for later if it grabs you. Pick one question before touching a control. "Why did that route bend?" is manageable. "How does every part of pathfinding work?" is a fairly ambitious opening move!

Read the legend first, then check which quantities each diagram exposes. Panels don't all share the same controls, and a displayed search value isn't necessarily the action-point price a soldier would pay.

How should you run a useful experiment?

Record a starting state, make a prediction and change one thing. Then you've got a reason to inspect the result instead of simply accepting whatever the animation draws.

With any suitable demo, we'd try this:

If a route surprises you, pin down how. Did it use more steps, spend a larger displayed cost, or just pick the other side of a symmetrical obstacle? Each points to a different explanation.

Keep a small note such as "same start, destination moved one tile, obstacle unchanged". It guards against a common slip: blaming the last change you remember while overlooking another input that also moved. This is a suggested learning exercise, not a write-up of one we've run.

What can changing one movement cost reveal?

It can show the point at which a route with fewer steps stops being the cheaper one. You can explore that on paper even when a demo doesn't let you edit every cost.

Take a hypothetical network with exactly two routes from S to G. The upper route is S–A–G. Its first connection costs one point; its second costs X. The lower route is S–B–C–G, with each of its three connections costing one point. There are no cross-connections, hazards, enemies or other costs. The task is simply to minimise the sum of connection costs.

When X is one, the upper route costs two and wins. When X is two, both routes cost three. When X is four, the upper route costs five, so the lower route wins at three despite having an extra step.

Hypothetical network with an upper two-step route costing one plus X and a lower three-step route costing three. At X equals one the upper route wins; at X equals two they tie; at X equals four the lower route wins.
View full-size diagram

Our own two-route network with made-up prices, drawn for this article rather than captured from the Red Blob demo. Line lengths here don't reflect movement costs.

At the tie, either route meets the stated goal. If a demo picks one consistently, that alone doesn't show it prefers protection, shorter animations or a particular tactical position; those would be extra claims needing evidence. The route-cost guide explains why movement cost and danger should stay separate questions.

How is drawing a line different from finding a route?

Drawing a line identifies a geometric trace; finding a route has to respect the allowed connections and the task being solved. A straight-looking line isn't enough evidence that a unit can follow it.

Red Blob Games' grid-line guide makes good companion reading. Its diagrams let you move endpoints and see how lines select grid cells, with later sections covering different grid-walking approaches. That's a separate investigation from choosing a low-cost path around obstacles.

Try writing the question above each resource: "Which cells does this line touch?" versus "Which allowed route has the lowest cost?" Keeping them apart helps when a game draws movement, sight and targeting lines on the same board. For how legal steps and corner rules shape a movement preview, see drawing diagonal movement on a grid.

What should you avoid concluding about a real game?

Don't treat a teaching model as evidence of a game's implementation or tactical judgement. A route can answer the demo's question perfectly while leaving the player's actual problem unresolved.

The invented network says nothing about whether arriving at G leaves enough actions to interact, whether crossing A triggers an attack, or whether B is visible. Add any of those rules and you have a new decision. The room-route example shows how paying for an action after arrival can change the preferred plan.

Take the habit of investigation back to the game: inspect its preview, read its own rules, and keep repeatable observations apart from explanations you haven't verified. A good outcome is being able to say, "This route costs less under these rules; I still need to check exposure and the objective."

Is there a movement preview you've always followed on trust and would love to actually understand? Bring it to the studio Discord and we'll puzzle over it together.

How do tactical games create interesting decisions?

Closely related notes on this topic and its neighbours.

New to the genre? Start with the guide How do turn-based tactics games work?

Explore this reading path