
Draw a route with permission to stop anywhere, then trace it under the wall-stop rule. Mark the first corner that demanded an impossible mid-corridor turn.
Gravity SWITCH offers a useful setting for studying route planning. The example here follows one task: launch toward the next wall.
The cost of a detour
A route can be represented as a sequence of connections with different costs. A useful place to observe the distinction is a sliding maze. Count the parts that consume the resource you care about: time, turns, exposure or repeated actions. A path with the smallest number of segments only minimizes that count when each segment costs the same amount.
Build a paper version of the scene
This comparison uses an original sample, so a reader can repeat the arithmetic without owning Gravity SWITCH. Use three paper routes between the same endpoints. Route A needs 10 segments at 6 units apiece, then pays a junction cost of 6. Route C needs 16 segments at 4 each with no additional toll. Their totals are 66 and 64; comparing lengths alone gives a different piece of information.

Read the figures as text
| Candidate | Segments × cost + junction toll | Total |
|---|---|---|
| Route A | 10 × 6 + 6 | 66 cost units |
| Route B | 13 × 5 + 7 | 72 cost units |
| Route C | 16 × 4 + 0 | 64 cost units |
The example uses additive costs. A reusable unlock, an action that changes the map or an ability with a cooldown can make the cost of a later segment depend on an earlier one. Expand the state when that dependency matters.
What to record in a sliding maze
Mark the start, the goal and one intermediate landmark. Keep a note beside the result about the possibility of assuming the avatar can stop halfway. Compare two routes that actually connect those same points. If a route ends closer to the following objective, write that down separately rather than crediting its final segment twice.
Reverse the starting position or add a small extra cost at the busiest junction. The observation to retain for Gravity SWITCH is whether the character rests on the planned square. A tiny change that swaps the preferred route usually means the alternatives were close, not that either calculation was wrong. Look for the point where their costs cross. A shortest path drawn with ordinary walking rules can look convincing on paper while demanding a turn the game never allows.
Xbox · Gravity SWITCH official listing · AStarGrid2D · Godot documentation
Sources and further reading
Cover photograph: Xbox Series S with controller by AsmodeanUnderscore. CC BY-SA 4.0. Cropped and typeset for this cover. The photograph illustrates the topic. This image adaptation uses the same share-alike license.
