Opened 9 years ago

Closed 3 years ago

Last modified 3 years ago

#3447 closed defect (fixed)

Sometimes units are stuck in a loop trying to pass left and right of each other

Reported by: ffm Owned by:
Priority: Must Have Milestone: Alpha 25
Component: Core engine Keywords: Pathfinding
Cc: Patch:

Description (last modified by Freagarach)

Sometimes a unit tries to pass another unit but cant because the units stuck in a loop trying to pass left and right of each other.

http://trac.wildfiregames.com/raw-attachment/ticket/3447/kill_it_with_fire.gif

http://trac.wildfiregames.com/raw-attachment/ticket/3447/dance.gif

In Carrier Sense Multiple Access the collision problem is solved by waiting a random backoff period. https://en.wikipedia.org/wiki/Carrier_sense_multiple_access_with_collision_detection

if last_redirection_of_this_Unit < Time_1_second
  unit_hold(randomTime_between_0_and_0.5_seconds)
endif

The Bug would happen less frequently if the unit carrying the resource has a higher priority has a higher priority than the unit on the way to gather resources, so lower prioritized unit makes way for the other one, as proposed in Ticket #3442.

Attachments (4)

commands_brit_merchantships.txt (30.1 KB ) - added by elexis 9 years ago.
British merchant ships blocking each other on r17108. Exactly that bug.
kill_it_with_fire.gif (1.4 MB ) - added by elexis 9 years ago.
As seen in the replay above.
dance.gif (757.8 KB ) - added by elexis 9 years ago.
Getting humans stuck is rather rare as they have a small radius.
commands_stuck_men.txt (7.6 KB ) - added by elexis 9 years ago.
Replay as seen on the gif above, r17131

Change History (13)

comment:1 by elexis, 9 years ago

Description: modified (diff)

This bug exists at least since alpha 17, so it's not caused by the new pathfinder.

I distinctly remember merchantships having that problem on the random map script Latium. Two of them were sufficient to loop indefinitely.

comment:2 by Lionkanzen, 9 years ago

Exist at last since Alpha 7 is very older bug.( ignored for very long time)

comment:3 by elexis, 9 years ago

Description: modified (diff)

by elexis, 9 years ago

British merchant ships blocking each other on r17108. Exactly that bug.

by elexis, 9 years ago

Attachment: kill_it_with_fire.gif added

As seen in the replay above.

by elexis, 9 years ago

Attachment: dance.gif added

Getting humans stuck is rather rare as they have a small radius.

by elexis, 9 years ago

Attachment: commands_stuck_men.txt added

Replay as seen on the gif above, r17131

comment:4 by elexis, 9 years ago

Description: modified (diff)

comment:5 by elexis, 9 years ago

Might be easier to fix by implementing #3442. If two colliding units have the same priority, roll the dice who may pass.

comment:6 by wraitii, 8 years ago

Bumping for A20 given the pathfinder fixes: does this still happen? I guess nothing is actually preventing it.

in reply to:  6 comment:7 by elexis, 8 years ago

Milestone: BacklogAlpha 20

Replying to wraitii:

Bumping for A20 given the pathfinder fixes: does this still happen?

Since the replay is only 40 commits old, I'm pretty sure this still happens. The bug has also persistently survived all pathfinder changes since ages.

comment:8 by elexis, 8 years ago

Milestone: Alpha 20Backlog

Backlogging due to lack of progress.

comment:9 by Freagarach, 3 years ago

Description: modified (diff)
Milestone: BacklogAlpha 25
Resolution: fixed
Status: newclosed

This won't happen anymore since the current UnitMotion system will let moving units pass through eachother.

https://code.wildfiregames.com/rP25182 / r25182

Last edited 3 years ago by Freagarach (previous) (diff)
Note: See TracTickets for help on using tickets.