How to Improve Pathfinding Efficiency in A Pathfinding Project?

Hi everyone,

I’ve been using the A* Pathfinding Project for my Unity project, and I’m really impressed with how powerful it is. However, I’m running into a bit of a challenge when it comes to optimizing the pathfinding performance, especially when dealing with large maps and dynamic obstacles.

I’m currently using the grid graph method, and while it works fine for smaller areas, I’ve noticed that it starts to slow down as the map grows in size. Are there any tips or best practices for improving efficiency when working with larger environments?

Also, I’m curious if anyone has experience with using local avoidance in combination with pathfinding in dynamic environments. How do you manage the performance impact while ensuring smooth movement?

Lastly, are there any resources or tutorials you’d recommend for understanding advanced pathfinding algorithms or optimizing large-scale projects in the A* Pathfinding Project?

Thanks in advance for your insights!

Hi there- yes there are a few general tips for Grid Graph performance. Namely the grid size if you’re worried about large world performance. You may also want to take a look at this page on optimization and there’s also a really neat feature that may help-- the ProceduralGraphMover. This allows you to use a smaller graph that moves with your agent.

You may also want to look into RecastGraphs as well!

Yeah, the way to handle large maps is essentially: switch to using a recast graph :slight_smile:

Take a look at this tutorial for more discussion about large worlds: Large worlds - A* Pathfinding Project