Question on dynamic pathfinding, in a multiplayer game (after a long break from A*)

I’ve recently started on a project which is using A* (pro). I’ve used A* in the past but it’s been a year or so. I am interested in changing the pathable areas at runtime.

This would be both additive and subtractive. Additive meaning, a bridge could be created to cross a chasm, and new paths would need to be generated for monsters. Subtractive meaning that you can build a wall that enemies would need to path around. It’s also ideal that the pathfinding can have multiple levels (like someone can path underneath a bridge, that something else is pathing over)

The changes in the graphs need to not cause hiccups for players, but they will be sort of “one-shot stamp” changes, not like dynamic moving platforms that need to be constantly updated.


My question is, is this possible, and which type of graph is the best to use? I see that the Recast graph has Navmesh Cutting - but you mention here that it’s only for obstacles and not an additive process.

However I also see here: that things can work additively - is this using a different type of graph (grid graph?)

In this case, I’m wondering the pros/cons of a Recast and Grid Graph (or possibly other that might suit a need). A grid graph seems more versatile, but is recast faster?

Also, this is a multiplayer game, but all AI would be handled by the server, so I assume I would need to just run the pathfinding on the server machine? May also have all or part of the level dynamically generated on game start, but again this would be run by the server right after the level is loaded, and I can lock off joining the game until all of that is done.

Thanks so much :smiley:

Also have been just skimming through this:

Didn’t know they had the author of recast/detour on staff. But it seems like Unity still doesn’t have a viable solution for generating at runtime. (could be wrong, I’ve only skimmed through the vid)