PathForge — Fast, Deterministic Pathfinding


PathForge on one side, a reference A* written in C# on the other - timings and counters on ... No more "why did that unit take a different corner this time?" ... Ships where your game ships


by Birdblu


Price History +

Keep your map. Upgrade your pathfinding. Twice as fast as A* in C#, exact and deterministic - no GC per query, no extra threads, on Windows, macOS, Linux and Android.
  • Shortest-path engine: A* pathfinding for supported graph and cost models; complete shortest route plus total cost for the supplied graph.
  • Query API: QueryPath(source, target, buffer) writes into a caller-provided, reusable uint[] route buffer.
  • Managed allocations: 0 B managed GC allocation per path query in the documented reusable-buffer workflow. This is not a claim of zero native allocations or zero Unity GC activity elsewhere.
  • Six built-in graph adapters: Grid, Weighted Tilemap, Hex, Waypoint, Triangle Mesh and Baked NavMesh.
  • Dynamic maps: block and unblock cells, raise edge costs and close single edges at runtime without a graph rebuild (BlockVertex, UnblockVertex, SetEdgeWeight, CloseEdge); dynamicCell builder option for Grid, Tilemap and Hex; no managed allocation per call. Lowering a cost below its build-time value, or adding cells, still needs a rebuild.
  • Custom graphs: IGraphSource interface and AddEdges edge import.
  • Edge weights: integers from 1 to 536,870,912; a batch with an invalid edge is rejected as a whole, with a message naming the rule.
  • Determinism: consistent shortest-path decisions for the same graph and query across repeated runs and supported platforms.
  • Rust kernel: native core exposed through a stable C ABI; Mono and IL2CPP support; no third-party runtime dependencies.
  • Included proof: runnable head-to-head benchmark against the bundled reference A*, with visible route timings and per-query counters. The benchmark is a scenario-specific reference comparison, not a comparison with other Asset Store products.
  • Diagnostics: query time, node expansions, edge scans, path cost and DnskNative.Diagnose() for native integration checks.
  • Samples: five scenes - QuickStart, Benchmark, Determinism, Graph Gallery, Base Demo.
  • Native binaries: Windows x86_64; macOS 11+ x86_64 and Apple Silicon; Linux x86_64 and ARM64; Android ARM64 (16 KB page-aligned, as Google Play requires).
  • Documentation: Documentation~/ with Getting Started, API Reference, Bring Your Graph, Troubleshooting and FAQ.
  • AI setup: a setup file for coding assistants (Agent Skills format) in Documentation~/pathforge-setup/SKILL.md and at https://birdblu.com/pathforge/pathforge-setup/SKILL.md - one prompt finds the package, checks the native plugin, picks the adapter, writes the solver code and verifies one route.
  • Not included: agent movement controllers, steering, avoidance and Pro shared-field features.

Keep your map. Upgrade your pathfinding.

Your hex strategy map is already built. Your Tilemap already has terrain costs. Your 3D level already has a baked NavMesh. And your agents already know how to move.


Then the wave comes. Every unit asks for a route in the same frame, and the profiler shows exactly where the time goes.


You need better route calculations - not another system to rebuild your game around. PathForge replaces the route calculation. Nothing else changes.


Your world stays yours. Your movement stays yours. PathForge handles the route.



Twice as fast as A* in C#. Still the exact shortest path

Every query returns the exact shortest route through your graph, together with its total cost. Not an approximation.


One route takes about 0.5% of a 60 fps frame - room for more than 200 routes in a single frame. PathForge runs on the thread that calls it and starts no threads of its own, so the rest of the CPU stays with your game.


Nothing for the garbage collector either: you hand PathForge a uint[] buffer, and it writes the route into it. 0 KB managed allocation per query.


A benchmark you can run, not just a speed claim

The package includes a head-to-head scene: two identical 80x80 maps, 40 agents per side, 100 routes per side. PathForge on one side, a reference A* written in C# on the other - timings and counters on screen.


79.9 microseconds per route against 158.8 : twice as fast


Run it on your own machine. Those numbers are yours, not ours.


Same input. Same route.

Same graph, same query, same route - on every run and on every supported platform. No more "why did that unit take a different corner this time?"


AI bugs become reproducible, and replays and lockstep multiplayer get routes they can rely on.


Ships where your game ships

  • Windows x64
  • macOS - Intel and Apple Silicon
  • Linux - x64 and ARM64
  • Android ARM64 - already aligned for Google Play's 16 KB page-size requirement

Mono and IL2CPP. No third-party dependencies. On Android, PathForge works exactly as on desktop: the same native code, nothing for the garbage collector, no extra threads.


Built for the map you actually use


Six graph adapters are included:

  • Grid - classic cell maps
  • Weighted Tilemap - terrain costs change the route, not just the look
  • Hex - six neighbours for strategy maps
  • Waypoint - your own nodes and connections
  • Baked NavMesh - keep Unity's bake, let PathForge compute the route
  • Triangle Mesh - route on the mesh itself, no grid conversion and no NavMesh bake

Your own graph format? Implement IGraphSource, or push edges in with AddEdges.


Three lines. No new framework.


PathForge answers one question: what is the shortest route from here to there on this graph?


var solver = new DnskSolver(builder.NumVertices);

solver.BuildFrom(builder);

var result = solver.QueryPath(start, goal, pathBuffer);


No base class to inherit. No component on your prefabs. No scene to restructure. You decide when to ask for a route and how your agents follow it - steering, avoidance and animation stay in your code.


Paste one line. Your assistant wires it in.

No afternoon in the docs before the first route. Give this line to Claude Code, Codex, Cursor or any coding assistant that can open a link or read your project files:

Read and execute https://birdblu.com/pathforge/pathforge-setup/SKILL.md

The assistant finds PathForge in your open Unity project, checks the native plugin, picks the adapter for your map, writes the solver code and runs one route to confirm it works. The same setup file ships in the package, so you can read every step before you run it.


Everything you need to evaluate it


Every query reports route cost, nodes expanded, edge scans and time - in the sample panels and through GetCounters() in your own code. DnskNative.Diagnose() checks the native integration in one call.


Five sample scenes: QuickStart, Benchmark, Determinism, Graph Gallery and Base Demo. The documentation ships in the package and is online, so you can read it before you buy. Support runs through the public issue tracker, and every report is read.


When one path becomes a crowd


PathForge Base is complete on its own. When many agents head for the same place, PathForge Pro uses the same core to compute one shared field that every agent reads.


What's inside


- Native Rust route engine - exact shortest routes, zero managed GC allocation per query

- The same route on every run and every supported platform

- Runs on the calling thread - no threads of its own

- Six graph adapters, plus IGraphSource and AddEdges for your own graphs

- Five sample scenes, including the runnable head-to-head benchmark

- Per-query counters and DnskNative.Diagnose()

- Windows, macOS, Linux and Android ARM64 - Mono and IL2CPP

- Documentation in the package and online, public issue tracker


Documentation: https://birdblugmbh.github.io/pathforge/docs/

Issue tracker: https://github.com/BirdbluGmbH/pathforge/issues


Benchmark: two 80x80 maps, 40 agents per side, 100 routes each, desktop, against the reference A* in C# - scene and reference ship in the package. 79.9 µs is about 0.5% of a 60 fps frame.