[Error] PathFind Monster overlapping
Monsters walk as if they did not see each other, if a monster makes the decision to walk towards an objective, 99% of the time will make the same decision and overlapping each other.
Possible solution:
Add to the GameMap a list of cordinates currently occupied by monsters and add in the pathfinding a check if position is currently occupied or not
Currently, the pathfinder is just working on the static map data. Occupied space of dynamic objects is not considered yet. As you pointed out, a list of occupied coordinates could be passed in and additional cost added to the corresponding Nodes. The pathfinder would automatically find a path with the lowest costs.. around these coordinates.
It seams like this is still thing.
So i would like to tackle this next.
DANG THAT CODE IS COMPLICATED xD I think the topic in general is xD
I am giving up for now to many things to understand here xD
Yes, it's complicated and hard to solve in a perfect way. Blocking the coordinates where several monsters will walk to is easy. However, blocking the coordinates a monster will walk through in the same time as in will be hit in the requested path - that's another level of complexity. Timing etc. plays a big role there.
From my point of view, it already works good enough. Monsters are not overlapping a lot like when the issue was initially created. The average player would not recognize this as a problem. I'll close the issue for now.