Avoiding moving objects

Hello, my game has a number of NPCs moving around a Grid Graph. All seems to work well except that they have trouble when their paths cross, bumping into each other. I am thinking about recalculating the path everytime a node is reached if any of the nodes is blocked, and then have the NPCs block the node they are about to move into and constantly on each update check if the next node in the path is blocked.

But I wonder if I am somehow reinventing the wheel and this functionality is already built-in. Is it?

Also, debugging-wise, is there a way to visualize blocked nodes?

Thanks.

Hi

Usually for NPC - NPC avoidance you use some kind of local avoidance, you can read more about that here: A* Pathfinding Project

Unwalkable nodes will by default be highlighted with a red cube.

You might also be interested in this page: Utilities for turn-based games - A* Pathfinding Project