Grid Graph vs Recast performance

  • A* version: lastest

  • Unity version: 6000.3.9f

    Hi, please, I want to migrate from my current grid graph to recast graph because I suppose that is much more optimiced

    Currently I have a map of 160 x 160 cells, I think that compute paths in that amount of cells is more heavy that compute the same path in recast graph, I know that is more performant to modify cells of grid graph, but that modifications happens very very low times.

    I want to be sure that my performance increase will be notorious

    I am develop a RTS with 600~ units per battle moving in the whole current map of 160x160 cells

    Thanks so much!

I’d take a look at the profiler and see where you’re losing frametime to start. What part of pathfinding is bottlenecking your agents in the profiler?

160x160 isn’t particularly huge for a grid graph, so I’m wondering where you’re seeing the bottleneck- is just when you modify your graph or searching the paths? If it’s the former, how are you modifying your graphs- the whole thing at once or in sections?

Hi @tealtxgr
Here is the complete deep profile that show me something related to astar path

This is the profiler of only 100 units moving about 20 units of distance

May be I am execute something in wrong way?

I am confident about take care of each call optimization, but I don’t know

May be you can help me after see this

Thanks so much!

1 Like

Whats your total frametime on a frame like this? Also if you can post your agent and graph settings (and ideally a video too so I can better piece this together) that would help

Note that in this particular example, the game is running pretty slowly (due to deep profiling). The FollowerEntity systems have had to resort to run 19 times in a single frame to try to ensure movement is still predictable despite the low frame rate. This makes it seem much more expensive than it actually is at a more reasonable frame rate.