Opened 8 years ago
Last modified 7 years ago
#3644 new defect
Ships stuck at docks
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Must Have | Milestone: | Backlog |
Component: | Core engine | Keywords: | pathfinding |
Cc: | Patch: |
Description (last modified by )
In the replay in attachment:commands.txt:ticket:3637 for r17298, I built a dock where the fishing ships would become stuck. Every now and then I selected them and ordered them to dropoff, but after that they would become stuck again.
Usually fishing ships still work, but in this case the dock might have been placed in a bad location.
Refs #3577
Attachments (4)
Change History (7)
comment:1 by , 8 years ago
comment:2 by , 7 years ago
Description: | modified (diff) |
---|
I investigated what I believe is a similar issue when working on unit sliding. The issue there was a discrepancy between unit motion and the short pathfinder. If two units are very close together with their obstruction squares overlapping, and you request a short path for one unit to go to the other side of the second unit, the short pathfinder will often say the first unit can simply go directly to the goal point. Unit motion, however, knows that the first unit can't go directly to the goal point, so the first unit is never able to follow the short path it was given, resulting in it being stuck.
I believe this is probably the issue here, with the dock's obstruction square taking the place of the second unit.
Why does the short pathfinder act like that? I haven't thoroughly investigated, but it may have to do with the fact that for unit motion, unit obstruction squares are shrunk slightly which lets the un-shrunk squares overlap. The short pathfinder would treat these overlapping squares as colliding. The short pathfinder allows colliding units to move out of collision, so it would allow the first unit to move "out of collision" all the way through the second unit. There's also something going on with EDGE_EXPAND_DELTA in CCmpPathfinder_Vertex.cpp which alters the obstructions that the short pathfinder sees, and may contribute to the problem.
To fix this problem, the short pathfinder would need to be more conservative than unit motion - never returning a path that unit motion can't follow.
by , 7 years ago
Attachment: | screenshot0970.jpg added |
---|
by , 7 years ago
Attachment: | screenshot0971.jpg added |
---|
by , 7 years ago
Attachment: | screenshot0972.jpg added |
---|
comment:3 by , 7 years ago
Description: | modified (diff) |
---|---|
Priority: | Should Have → Must Have |
Summary: | Fish ships stuck at dock → Ships stuck at docks |
After the ship was stuck at the right side of dock in the attached replay, orders to the left of the dock failed, an order to the right side worked:
This bug is extremely annoying when having to flee from an enemy or just trying to move with the fleet past some docks and half of the ships being stuck there.
My friend, can you upload a screenshot of the game?