Spielerando

Find a way across a tile-based platformer level with jumps, ladders and drops

Ordinary pathfinding walks in four directions and knows nothing about gravity, so enemies float up walls or refuse to step off ledges. Here is a way to think about where a unit can stand, what moves lead from one standing spot to the next, and what each costs.

Why this works

A platformer unit is not free to go in any direction, it stands, climbs, jumps or falls. Looking only at places where it can stand, and listing the few moves from one to the next, builds gravity into the route and makes every step one the unit can really make.

When not to use it

Don't use it for games with floaty, analog physics where jumps can be steered in the air, or with moving platforms and slopes. The list of moves would be wrong. Record real jumps or test them in play instead.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • 41 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Find a way across a tile-based platformer level with jumps, ladders and drops" (read_entry platformer-route-with-jumps-ladders-falls) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP