Hey everyone! I’m currently making a fully dynamic pathfinding system with A* for an RTS/TBS … But i’m not sure if I should use a Grid graph or a recast graph for better performance. SO here is the situation.
My current implantation uses a Grid graph, and calculates a new path up to 10 times per frame…
Basically I have 12 main Units that can have up to 20 static paths each (240total), and one dynamic path (12)
Each path need a Raycast and a smooth (504 modifiers in total), and the dynamic paths need to update often enough it wont be notable (I’m thinking 3-5 times a second);
I’m thinking a recast would run this much faster, but since I update the graph quite a bit (1 time every few seconds) I would need the graph updates to run fast too~
FYI the graph updates are all subtractive (IE; only removing obstacles) if that changes anything~
So what would be faster ?? And whats the best way to update a recast graph without a 600ms calculation time??
Hi
Ok, didn’t quite understand exactly how many paths you need to calculate per second… one line says 10 times per frame and one says 3-5 times per second (*20?).
Anyway. Recast graphs are MUCH faster to find a path on. However it is really hard to update them. At the moment, the best is a full rescan, which as you say, takes some time.
I have a development beta where navmesh graphs can be updated subtractively in < 20 ms (usually < 5, but it depends a lot on how large the region is and how complex it is).
This is however not finished yet. If it is very urgent, I might be able to give you access to that version.
Thanks for the fast reply! According to my debug log, the number of paths calculated per fame are AT MOST 10. The rest of the post is just describing whats calling the paths in more detail… so you can ignore it~
Anyway, thanks for the offer, but its not urgent enough that I need anything right this instant… But keep me posted, navmesh updates would help me greatly!!