Isometric pathfinding
Skill 0xheycat/isometric-game-skills/skills/isometric-pathfinding
Agent-ready toolkit for isometric games: ComfyUI art pipelines, seamless terrain, sprites, grid math, Canvas2D rendering, pathfinding, and asset automation.
npx -y skills add 0xheycat/isometric-game-skills --skill isometric-pathfindingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when units must navigate an isometric grid around obstacles using A* on the walkable layer with correct iso neighbor rules.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
1.8 KB, as published. Nobody here has run it
Isometric Pathfinding
Overview
Pathfinding runs on grid coordinates, not screen pixels. This skill implements A* over the walkable layer with proper diagonal handling so units take natural paths and never cut through blocked corners.
When to Use
- Units or NPCs need to move to a target around obstacles.
- Characters walk through walls or take ugly paths.
- You have a walkable layer and need movement on it.
Process
- Run A* on grid coords using the tilemap walkable layer.
- Define neighbors: 4-way or 8-way; for 8-way, forbid cutting blocked corners.
- Use an admissible heuristic (octile distance for 8-way).
- Return a path of grid tiles, then convert to screen with
isometric-grid-math. - Smooth the path (string-pulling) to avoid zig-zag.
- Recompute or repath when the map or target changes.
- Cap search cost (node budget) for large maps.
heuristic (octile): dx=|x1-x2|, dy=|y1-y2|; h = (dx+dy) + (1.414-2)*min(dx,dy)
Rationalizations (Stop Lying to Yourself)
| Excuse | Reality |
|---|---|
| "Straight-line movement is fine" | Units will walk into walls. Use A* on the walkable layer. |
| "Corner cutting looks fine" | Units clip through diagonal walls. Forbid blocked-corner cuts. |
Red Flags - STOP if you catch yourself:
- Pathfinding on screen coords instead of grid coords.
- Allowing diagonal moves through blocked corners.
- No node budget so large maps freeze.
Verification
You are NOT done until every box is checked:
- A* finds paths around obstacles on the walkable layer.
- Diagonal moves never cut blocked corners.
- Path converts correctly back to screen positions.