Opened 6 years ago

Closed 3 years ago

#4935 closed defect (fixed)

Formation movement

Reported by: Silier Owned by: wraitii
Priority: Must Have Milestone: Alpha 24
Component: Simulation Keywords:
Cc: Patch: Phab:D3209

Description

Units in formation stuck on movement if they / or part of them are / is surrounded by units without formation.

They move if their formation is released.

steps to reproduce: https://imgur.com/a/KfJRD

Attachments (2)

commands.txt (25.4 KB ) - added by Silier 6 years ago.
commands.2.txt (24.9 KB ) - added by wraitii 4 years ago.
A24 replay, also showing the "elephant surrounded by units" case but with rams

Download all attachments as: .zip

Change History (9)

by Silier, 6 years ago

Attachment: commands.txt added

comment:1 by temple, 6 years ago

The formation controller has a large passability class so I think it's getting stuck inside/between the other units (like if you had an elephant surrounded by units with no space to escape). Maybe the formation controller should only collide with static obstructions?

There's a separate issue with individual units getting stuck on obstructions: https://i.imgur.com/GHLGRMH.jpg

comment:2 by Itms, 6 years ago

Milestone: Backlog

comment:3 by Imarok, 5 years ago

Component: UI & SimulationSimulation

Move tickets to Simulation as UI & Simulation got some sub components.

comment:4 by wraitii, 5 years ago

Can be reproduced with upstream changes - I agree with temple above that this is likely just the formation controller being stuck.

by wraitii, 4 years ago

Attachment: commands.2.txt added

A24 replay, also showing the "elephant surrounded by units" case but with rams

comment:5 by wraitii, 4 years ago

Milestone: BacklogAlpha 24

Seems confirmed in the above replay.

Removing collision with units from the formation controller sounds like it _could_ fix it, but it would also make the formation controller able to "get away" from the formation units, in case they are stuck behind some entity (see https://trac.wildfiregames.com/ticket/5624#comment:4, if the formation controller has no collisions with units, it will simply move through the gap and think it's at destination). This may or may not be a problem, depending on other factors.

I think a simpler handling would be to try giving units an individual move-order if the formation controller appears sufficiently stuck (E.G. on "likely_failure", not on "obstructed").

I'm moving this to A24, it sounds easy enough to try a fix.

comment:6 by wraitii, 3 years ago

Owner: set to wraitii
Patch: Phab:D3209

Phab:D3209 implements the above idea.

comment:7 by wraitii, 3 years ago

Resolution: fixed
Status: newclosed

In 24511:

Improve behaviour of formations stuck within other units.

Large units risk being stuck between other units. This is true in general, but particularly weird with formations, since individual units may well not be stuck, only the invisible formation controller.
This alleviates the issue by ordering units to move individually when the controller appears stuck.

It introduces a new "VERY_OBSTRUCTED" unit motion message, which triggers when a unit has failed to move for several turns.

Reported By: Angen

Reviewed By: Freagarach

Fixes #4935

Differential Revision: https://code.wildfiregames.com/D3209

Note: See TracTickets for help on using tickets.