OpenMU icon indicating copy to clipboard operation
OpenMU copied to clipboard

[Error] PathFind Monster overlapping

Open And3rsL opened this issue 6 years ago • 1 comments

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

And3rsL avatar Feb 10 '19 17:02 And3rsL

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.

sven-n avatar Feb 10 '19 18:02 sven-n

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

Mosch0512 avatar Dec 21 '22 19:12 Mosch0512

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.

sven-n avatar Jan 04 '23 11:01 sven-n