Unity

A* Pathfinding with Splines

A profiling and optimization case study. 30 agents and 20 obstacles run at about 70 FPS.

Following the spline

How it works

A profiling and optimization case study of A* pathfinding with splines:

  • a List replaced by a HashSet
  • custom hashing
  • a min-heap
  • Burst jobs

Result: with 30 agents and 20 obstacles in the scene, the project runs at about 70 FPS on my machine (an RTX 3070 with an Intel i9). It is a solid first result, and there is still room to optimize further.