Unit stuck by pathfinding

So I have an example in the replay that shows a frustrating example of a unit not being able to find its way around some other units when it clearly can.

at 0:49 in the bottom right you can see where I'm killing an easy camp. I put in a command for one of my spitefires to move back and it is the only unit moving and the unit is stuck for about 2 seconds trying to find its ways out and eventually it does finds its way which shows that there was clearly a path for it to take. The spitefire still ended up dying right as it found its way unfortunately.

You can see my movement commands in the replay and its not until I click further back that the unit finds the right path. All of my commands were in a straight line so I dont know why it only worked when i clicked further back. Maybe my other movement commands were resetting its pathfinding as I did click multiple times in the same spot.

G2a504ef7314a4719990a2c4a1cd64824 timestamp 0:49 bottom right of the map


  • Didnt see pathfinding pinned post before posting this and I cant see a way to delete this my bad

  • RequiemRequiem Member, Administrator

    Hi, thanks for the feedback!
    I took a quick look at this - there is a bit of a known issue here, but we may be able to make it work a little more smoothly in the future. We use two connected systems when we move units around the map. The first is the pathfinding system, which chooses paths around the static obstacles on the map (terrain, buildings, etc). The second is the steering system, which steers units around dynamic obstacles a unit encounters along the way (units!).

    The steering system uses a more "local" approach to getting around things -- it does a little look-ahead to detect collisions and then tries to go around. Sometimes though, it will make a poor initial decision about which way to go around something in its way, which sends it into more blockers! Units will eventually reverse course, by they might not take the path that is "clearly" correct for awhile. I think with a little bit more work we can make it make good initial decisions more consistently.

    We've actually also tried using systems which have a lot more global knowledge about units on the map for making those kind of decisions. It results in units going the correct way immediately, but creates other cases which feel really bad -- such as attack-move commands sometimes moving 180 degrees opposite the direction clicked, or repeated move commands generating radically different paths when armies go into hold-position in choke points. The steering system has some issues, but has a much more consistent response to player input.


Sign In or Register to comment.