Recursive AI
LibraryC#Available

onepath

Pathfinding and navigation for .NET: grids, graphs, navigation meshes and crowds in one package, with results that are the same bits on every platform.

dotnet add package RecursiveAI.OnePath

A quick look

A path on a tile map in two lines, and a navigation mesh from level geometry in two more. Options are plain objects with presets; you never write a struct.

Getting started
Program.csC#
using RecursiveAI.OneMath;
using RecursiveAI.OnePath;
var grid = Grid.FromText(map);
GridPath path = grid.FindPath(new Cell(0, 0), new Cell(4, 3));
NavMesh level = NavMesh.Build(triangles, NavSettings.Humanoid);
PathResult route = level.FindPath(start, goal);
What it does

What it does

Grids

Square, hex and 3D voxel grids with A*, JPS, JPS+, Theta*, Lazy Theta* and HPA*, area costs, agent sizes, incremental replanning and flow fields.

Graphs

Weighted graphs and point graphs that link nearby points, with bidirectional search and landmarks for fast repeated queries.

Navigation meshes

An exact 2D builder for tile maps and outlines, and a Recast-class 3D builder for triangles or glTF, into one tiled format with tile caching and obstacles.

Queries

Paths, raycasts, nearest points, random points and distance to walls, with filters and area costs, whole or sliced over frames.

Crowds

Agents follow their corridors and avoid each other with navmesh-aware ORCA, stepped with a fixed time step from your game loop.

Built for lockstep

Grids, searches, meshes and crowds save to bytes and restore exactly. No 1.x release changes an existing result or stops reading an earlier 1.x save.

How it’s checked

Timed against the native references

Every part is timed against Recast and Detour, DetourCrowd, DetourTileCache, RVO2 and Warthog, on the same inputs and settings, on x64 and arm64. Grid searches meet a bar of 1.00 and navmesh parts 1.15, with grid costs checked against the optimal costs. A hash matrix checks that results are the same bits on JIT, scalar, NativeAOT, WebAssembly and any thread count.

The package

Go further