I’m working on a Diablo like game where I already experimented with the AStar Pro version.
One of the problems I encountered till now are that agents don’t take other agents into account without RVO
-> with RVO they gain unlovely movement behaviours (steering, sliding, imprecise movement)
Cooperative movement (which isn’t included yet and I’m not sure if it’s coming) would not work too due to the limitations that aron wrote in his article about it. (different unit sizes/speeds)
Also I’m currently using a Grid based Graph due to the fact of the random dungeon generating. Some adjustements to this code RVONavmesh equivalent for GridGraph added the Obstacles to the borders of the walkable area to prevent them to steer off the boundaries caused by the RVO. But this is a fairly ugly solution in my opinion and does not change the partially weird movement of the agents.
When looking at Diablo based Games there is this typical movement where enemies walk past other enemies to surround you, or generally don’t try to push everything in their way away but find another way to the nearest point to the target.
I’m a little lost in where to search for a solution… Does someone has experience with this problem or is someone able to guide me into the right direction? Is it just a false implementation of the RVO System from me or is it really not that good for this case because I want full control about their movement (no steering, pushing and so on…)?
They gave me the idea to set nodes to not walkable where my enemies will go into a “locked” state, which should change the pathfinding behaviour of following enemies to another route to the target. To accomplish this without destroying the whole plugin is what I will start now.
But I would still be glad if someone would come along with a great idea!
Setting the nodes to “not walkable” will cause many path failed exceptions, due to the fact, that there is no valid way to the target in some situations. In my case it resulted in enemies running of the grid into a never ending adventure.
Next thing I tested was to set penalty nodes with the GraphUpdateScene on the current bounds of each enemy. They weren’t updating after setting them, even after changing their points. In the documentation the “Apply()” is recommended for this purpose but it resulted in an never finishing Scan-progress, event when setting “Batch Graph Updates” (it seems to ignore it).
The next thing I tried was to directly get the bounds of the enemy and setting the penalty of the nodes without GraphUpdateScene, which didn’t give me the result I wanted.
So… I looked at Torchlight II and saw that there is a behaviour where enemies don’t have collisions between themselves but won’t overlap when chasing you. So when they are following you, they are looking to don’t overlap but when getting near they have no problem with overlapping which works quite nice.
-> I’m changing the RVOController radius between a Min/Max value dependent on the Distance to the player.
-> Far away = Max collider
-> In front of player = Min collider
This seems to give me an acceptable result for the current state of the project, but I’m not that happy with the solution.
Still waiting for someone, riding into this Thread with a white horse and telling me that a programmer is never too late or too early, that the answear will just arrive at the moment that the programmer wanted and giving me the dream solution.