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 elexis)

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)

commands_stuck_ship.txt (9.4 KB ) - added by elexis 7 years ago.
Concise r19874 replay
screenshot0970.jpg (564.9 KB ) - added by elexis 7 years ago.
screenshot0971.jpg (511.0 KB ) - added by elexis 7 years ago.
screenshot0972.jpg (517.4 KB ) - added by elexis 7 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by gameboy, 8 years ago

My friend, can you upload a screenshot of the game?

comment:2 by causative, 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.

Last edited 7 years ago by causative (previous) (diff)

by elexis, 7 years ago

Attachment: commands_stuck_ship.txt added

Concise r19874 replay

by elexis, 7 years ago

Attachment: screenshot0970.jpg added

by elexis, 7 years ago

Attachment: screenshot0971.jpg added

by elexis, 7 years ago

Attachment: screenshot0972.jpg added

comment:3 by elexis, 7 years ago

Description: modified (diff)
Priority: Should HaveMust Have
Summary: Fish ships stuck at dockShips 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:

https://trac.wildfiregames.com/raw-attachment/ticket/3644/screenshot0970.jpg https://trac.wildfiregames.com/raw-attachment/ticket/3644/screenshot0971.jpg https://trac.wildfiregames.com/raw-attachment/ticket/3644/screenshot0972.jpg

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.

Note: See TracTickets for help on using tickets.