Gamedev Hub

Platformer Pathfinding

Pathfinding in a platformer is uniquely challenging because movement is constrained by gravity and momentum. Agents cannot move freely; they must walk, jump, fall, or climb.

1. The Challenge: Non-Holonomic Movement

In a top-down game, if there is a path, you can usually just walk there. In a platformer:

A platformer nav-graph consists of platforms (nodes) and different types of movement (edges):

  1. Walk: Moving horizontally on a surface.
  2. Fall: Dropping off an edge.
  3. Jump: A parabolic arc from one platform to another.
  4. Ledge Grab: Jumping to an edge and pulling up.

3. Physics-Based Edge Generation

To “bake” a jump link, the engine must simulate the agent’s physics:

4. AI Execution (The Controller)

Finding a path is only half the battle. The AI must execute it:

5. Implementation Strategy