Villager pathing is still awful

:arrow_forward: GAME INFORMATION

:point_down: These details are CRITICAL; DO NOT skip them or your issue may not be reviewed.

  • GAME BUILD #: I still have no idea what this is supposed to be
  • OPERATING SYSTEM: Windows 10

:arrow_forward: ISSUE EXPERIENCED


A recent game update said that villagers pathing was fixed, it is not.

This villagers take extremely awkward paths when they are ordered to achieve a task, whether it’s building, or collecting resources.

When asked to build, they often walk three to FIVE tiles away from the location of the building before they turn around, instead of simply turning around.

When asked to collect resources, they often “disco dance” (example in video below) before they start collecting, and they have to be individually retasked to go to a specific location near the resource so that this “disco dance” stops.

I consider this to be the most annoying issue in DE, since villagers are the heart of the game. It has been there since DE came out, and it’s only getting worse. It’s high time that it was fixed.

:arrow_forward: FREQUENCY OF ISSUE

:point_down: How often does the issue occur? CHOSE ONE; DELETE THE REST!

  • 100% of the time / matches I play (ALWAYS)

:arrow_forward: REPRODUCTION STEPS

:point_down: List CLEAR and DETAILED STEPS we can take to reproduce the issue ourselves… Be descriptive!

Here’s the steps to reproduce the issue:

  1. Order a group of villagers to collect a sheep or a cow
  2. Or place a building on the same tile as the villager is standing on
  3. Watch the disco dance

:arrow_forward: EXPECTED RESULT

:point_down: What was SUPPOSED to happen if the bug you encountered were not present?

The pathing is supposed to work. Villagers should walk directly to their goal and turn around efficiently, not 5 km further. Just look at the video I posted below, why are the 2 villagers doing a bonfire dance around the others ?

And at the end, why does the last villager stops 1 tile away from the cow, turns around and goes all the way to the other side, only to find itself blocked by passing sheep, and here again he decides to go all the other way around instead of waiting a microsecond for the sheep to pass ? I picked this video because it’s from my last game, but I have experienced situations which are even more ridiculous than this one, believe it or not.

:arrow_forward: IMAGE

:point_down: ALWAYS attach a PICTURE (.jpg, .png, .gif) or VIDEO (.mp4, YouTube link) that highlights the problem.

:arrow_forward: GAME FILES (SAVE / RECORDING)

:point_down: Attach a SAVE GAME (.aoe2spgame) or GAME RECORDING (.aoe2record) of the match where you encountered the issue. Link it below if using an external file service.

  • The recording is in the video above.

I do agree with op, pathfinding is still awful. Thanks for the video that would be a big help to the devs.

It’s the patch number you see in the announcement of the hotfix in the News section. 47820, I think as of today.

It is pretty bad, though one of your comments explains part of why it’s so difficult. How does the villager know to wait “a microsecond for the sheep to pass”? Should he decide to pause and wait for the sheep? What if the sheep is also waiting “a microsecond for the villager to pass”? I think this kind of logic was behind the truckload of “stuck” vills in past versions. Literal im"pass"es. So the solution they chose is find another route ASAP rather than be stuck. But it can be hard to predict whether the other route will be longer than waiting.

One approach might be to project where the other unit is going and at what speed. Could ask: “After 0.5 seconds, will the other unit be clear of my path if it keeps going the way it’s going?” If so, don’t take the detour. But that could be an intensive calculation to do on a large scale…

It’s pretty simple… the villager should calculate which route takes which amount of time to go to the destination and always choose the fastest. The sheep is in my control and it was asked to walk straight, units in your control should share their calculations so that the villager understands that he just has to wait 0.2 sec to keep going.

I don’t understand why it would be so hard, literally every RTS I’ve played does this without trouble. Command & Conquer, Age of Mythology, 8-bit army, AoE II (before Steam), Empire Earth, Cossacks, etc…

But if the fastest route for both sheep and village involves the same tile at the same time… :slight_smile:

Yeah, they should take a cue from games with better pathfinding… but I remember Empire Earth and pathfinding was no picnic in that one!

Idk man, it used to work much better than that. I’m not a coding expert so I can’t say how exactly it’s supposed to work, but surely it can be better than this. Like the vill doesn’t have to wait, he could just have gone back, and realise the sheep is gone so the fastest path is clear. But in the video, he didn’t realise that and he kept going all the way around whereas the fast way was clear 0.1 sec after he turned back.

Agreed, the right thing is intuitively obvious. But hard to implement :confused:

Maybe a good algorithm would be something like:

  1. If obstructed, calculate a detour and the time it would take (e.g. 2 seconds).
  2. Wait 0.1 seconds to check if the obstruction is moving at all (i.e. not stuck, waiting for you to move). If obstruction is not moving, take the detour.
  3. Otherwise, if it is moving, wait up to half the detour time (1 second) for the path to clear. If it’s clear before then, continue.
  4. If half the detour time elapses without the obstruction being fixed, take the detour.

I mean this isn’t even the biggest issue here. This worst thing is when they collide into each other and become like bumper cars… I’ve played a game a few hours ago where 2 villagers were battling themselves around my lumber camp, I seriously believe that it could have went on for a solid minute if I didn’t intervene.

I think they should just reduce the width of villagers’ hitbox, so that they can “slide” next to one another.

1 Like