Spielerando

Enemies hug the wall and get snagged on every corner they pass

The shortest route runs along the very edge of the walls, where bodies get stuck on corners and the player cannot see them coming. Here is how to make routes drift to the middle of a room while narrow passages still work.

Why this works

The shortest route often grazes every wall, where bodies snag on corners. Making cells next to walls cost a little extra, fading with distance, pulls routes toward the middle of open space and still allows narrow passages, which are just priced higher.

When not to use it

Skip it for units that should creep along walls, such as sneaking thieves or crawlers, or on tight maps where every cell is next to a wall and the extra cost changes nothing. Then it only slows the search down.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • 59 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 "Enemies hug the wall and get snagged on every corner they pass" (read_entry keep-units-off-the-walls) 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