Opened 9 years ago

Closed 8 years ago

Last modified 5 years ago

#3471 closed defect (fixed)

Units not detecting invalid path.

Reported by: Stan Owned by:
Priority: Release Blocker Milestone: Alpha 19
Component: Core engine Keywords: pathfinding
Cc: Itms Patch:

Description (last modified by elexis)

We played a match today with elexis and ffm, and we noticed that units would often try to go from a point 'a' to a point 'b' without realising they wouldn't be able to reach it. So they just walk into the void.

https://trac.wildfiregames.com/raw-attachment/ticket/3471/stuck_cav.gif

The only we could workaround it, is by cancelling orders, and removing formations (setting it to none)

FFM stated formation should be disabled whereas I think it should be set to none by default.

Attachments (6)

commands.txt (759.2 KB ) - added by Stan 9 years ago.
The game commands.txt
stuck_cav.gif (780.5 KB ) - added by elexis 9 years ago.
Initial cavalry (entity ID 259) stuck at turn 1114 (9min 17sec). With regards to getting stuck, the replay still works with r17131. The cavalry gets a gather order at turn 1059 and on turn 1115 this storehouse (entity ID 6392) is placed.
commands_cav_stuck_minimal.txt (3.0 KB ) - added by elexis 9 years ago.
Minimum replay for r17144. Contains only one command. Despite #3530, the chicken is killed and gathered from. After that, the cavalry wants to move away (second 3), but is stuck without an obstruction being close enough. Then another chicken moves near the dead one and somehow the cavalry is unstuck (second 15)..
FixStuckUnits.patch (4.8 KB ) - added by wraitii 8 years ago.
invalidPath.png (534.4 KB ) - added by wraitii 8 years ago.
FixStuckUnitsV2.patch (5.9 KB ) - added by wraitii 8 years ago.
Fix the building issue I noticed.

Change History (14)

by Stan, 9 years ago

Attachment: commands.txt added

The game commands.txt

comment:1 by elexis, 9 years ago

Keywords: pathfinding added

Replay was done with r17088.

The quickest solution to the formation-question would be #3457 in my opinion. Unfortunately we are already in string freeze and can't add that option for a19.

For the pathfinding issue see also http://wildfiregames.com/forum/index.php?showtopic=20073#entry309471

Also notice my cavalry that is stuck at minute 8:30 near the storehouse near the metal/stone at the cc (probably UnitAI not pathfinder in that case).

by elexis, 9 years ago

Attachment: stuck_cav.gif added

Initial cavalry (entity ID 259) stuck at turn 1114 (9min 17sec). With regards to getting stuck, the replay still works with r17131. The cavalry gets a gather order at turn 1059 and on turn 1115 this storehouse (entity ID 6392) is placed.

comment:2 by elexis, 9 years ago

Description: modified (diff)
Milestone: BacklogAlpha 19
Priority: Should HaveMust Have

I think this is the same bug as in #3505. We'll see.

by elexis, 9 years ago

Minimum replay for r17144. Contains only one command. Despite #3530, the chicken is killed and gathered from. After that, the cavalry wants to move away (second 3), but is stuck without an obstruction being close enough. Then another chicken moves near the dead one and somehow the cavalry is unstuck (second 15)..

comment:3 by wraitii, 8 years ago

Priority: Must HaveRelease Blocker

Attached patch should fix those cases. Needs to be tested. It's, again, not RC yet.

I have also attached a screenshot explaining why I did my clearance changes: there were some cases where the long-range pathfinder saw paths where the short-range didn't. This is now impossible.

Pushing this to release blocker as this patch is a real functional change, and I think it'd also fix #3505 directly.

by wraitii, 8 years ago

Attachment: FixStuckUnits.patch added

by wraitii, 8 years ago

Attachment: invalidPath.png added

by wraitii, 8 years ago

Attachment: FixStuckUnitsV2.patch added

Fix the building issue I noticed.

comment:4 by elexis, 8 years ago

Couldn't reproduce any stuck case with this patch, so it's promising and committing it would definitely improve the situation tremendously. Didn't look at the code though.

comment:5 by wraitii, 8 years ago

In 17161:

Fix more pathfinding issues.

Change the way the long-range pathfinder rasterisation works slightly so that we have a better compatibility with the short-range pathfinder. Should fix the "stuck units" issues, though I am not sure so I am not marking them as fixed so far. Refs #3471, #3505, and possibly #3292.

Caveat: I am now using clearance of 0.8 for "default" class, which might have side-effects: please report anything weird.

Also fix leftover style issues.

comment:6 by wraitii, 8 years ago

Resolution: fixed
Status: newclosed

Testing no longer shows the issue, I believe I have fixed it for the most part. Closing.

comment:7 by wraitii, 8 years ago

In 17225:

Fix a rare case where units might get stuck around other idle entities, and clarify a related comment.

Refs #3471

comment:8 by elexis, 5 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.