View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002345 | The Dark Mod | AI | public | 22.08.2010 12:19 | 27.10.2011 05:16 |
Reporter | Springheel | Assigned To | grayman | ||
Priority | normal | Severity | normal | Reproducibility | sometimes |
Status | closed | Resolution | fixed | ||
Product Version | TDM 1.02 | ||||
Target Version | TDM 1.04 | Fixed in Version | TDM 1.04 | ||
Summary | 0002345: AI Getting stuck on Each Other. | ||||
Description | Haven't had huge problems with this in the past, but I have noticed it several times lately; AI becoming stuck on each other. In the last three or four missions I've played it's happened about once a mission. AI either get stuck coming out of doors when someone else is trying to go in, or one AI just stands in place for some reason (no door involved) while another one walks into him. Sometimes they're stuck facing a direction that you have to go, making it impossible to avoid alerting them. They don't seem to ever break the pattern; unless you alert them, they walk into each other indefinitely. Just a thought: I've never seen this happen; it's always outside the player POV...could interleaved thinking be involved? | ||||
Tags | No tags attached. | ||||
Reduce time needed to resolve a block when two AI collide. This means less confusion in narrow spaces. Rank is now taken into consideration when two AI try to resolve a block. If one has to stand still and let the other pass, the one standing will have the lower rank. Previously, two AI approaching each other would alter their paths so that when they met they could pass w/o touching (assuming there’s enough room). Now, if one AI has a higher rank than the other, the higher-ranked AI will continue straight and the lower-ranked AI alters its path to walk around the higher-ranked AI. AI of equal rank will use a secondary temporary ranking system to determine who walks around the other. If two AI are traveling in the same direction, the one behind will do a better job of passing the one in front if the one in front is traveling more slowly. AI no longer collide head-on and turn toward the same wall, only to get stuck treadmilling. In general, AI will get stuck less often. It can still happen, though, given the right conditions. Not all conditions can be anticipated. (This is a strong argument for properly monster-clipping a mission, to keep the AI out of trouble spots.) Because of their complexity and number, func_statics are ignored during pathfinding. Now, if an AI bumps into one, pathfinding won’t ignore it. This provides the AI with a new path around the obstacle instead of through it, which reduces treadmilling against func_statics. Fixed a restore game issue when resolving a block. Code wasn’t referencing the real end of the _state enums. Increased ‘move to position’ accuracy when handling doors. This was needed to keep AI away from closing doors with the new movement changes. In 1.03, AI approaching a closed door queue up and go through the door one at a time, the last one through closing the door. They did not behave as well if the door wasn’t originally closed. Now they queue up and go through one at a time. If an AI waiting in a door queue waits a random time between 10 and 15 seconds before it’s his turn to handle the door, he will leave the queue and return to his previous path_corner. Idle animations are turned off when handling a door. They were getting in the way of the “reach for the door” animation when opening or closing a door. Perhaps there could be a heuristic that causes an AI to stop moving and just look towards the next search point if it is very close to his current position, to avoid circling movements. rev 4472: ResolveMovementBlockTask.cpp ResolveMovementBlockTask.h State.cpp MovementSubsystem.h MovementSubsystem.cpp ai.cpp ai.h HandleDoorTask.cpp HandleDoorTask.h MoveToCoverTask.cpp BinaryFrobMover.cpp darkmodHidingSpotTree.h UserManager.cpp UserManager.h ai_pathing.cpp physics_player.cpp physics_player.h actor.cpp actor.h player.cpp Changes made to support Fidcal’s map: 1) If an AI runs into another AI, don’t skip the resolve block code when either is door-handling. Let them resolve the block. 2) Don’t pick ANY obstacle door as the door to go to. Select the first obstacle door at the same time you’re picking the first obstacle. They may or may not be the same. 3) When an AI finishes his door task, the new master is no longer the closest to the door, but the next on the list. 4) An AI will leave a door queue if the master doesn’t move for 10s times its position in the queue. 5) If an AI arrives at a closed door and is close to it, but isn’t the AI that’s going to open the door, the new AI will step away from the door to reduce the chance of blocking the door when it’s opened. 6) Idle animations are turned off while the AI is engaged with the door. No more magical door openings/closings while an AI is stretching. rev 4497: ai_pathing.cpp State.cpp HandleDoorTask.cpp HandleDoorTask.h ResolveMovementBlockTask.cpp ResolveMovementBlockTask.h MovementSubsystem.cpp MovementSubsystem.h UserManager.cpp UserManager.h ai.cpp ai.h Further changes based on Fidcal’s suggestions: 1. Fidcal's suggestion that AI walk away from a door queue if some time has passed. They'll return to their previous path_corner, then continue their patrol from there. They'll leave the queue 10-15s after joining. (Thanks for this; it helps keep them out of trouble.) 2. AI now close doors if they're the last one through, regardless of whether the door was initially found open or not. This helps with performance, though it might bother players who leave doors open on purpose to mark where they've been. 3. If an AI arriving at a door is very close to the door (perhaps he just walked around a corner and found the door), and he has to join a door queue, he will step away from the door to make more room. 4. AI who get pinned to the wall behind an opening door will now close the door to free themselves, if they're unable to find a way around the door first. 5. Idle animations are turned off when an AI enters a door-opening or door-closing stage. Watching numerous arm-stretch or eating animations while a door is magically opening or closing drove me to make this change. rev 4540: State.cpp PathCornerTask.cpp IdleAnimationTask.cpp HandleDoorTask.cpp HandleDoorTask.h ResolveMovementBlockTask.cpp ResolveMovementBlockTask.h DoorInfo.cpp DoorInfo.h MovementSubsystem.cpp MovementSubsystem.h BinaryFrobMover.cpp BinaryFrobMover.h UserManager.cpp ai.cpp ai.h ai_pathing.cpp Further changes: 1. Fixed rare crash when an AI resolves a block w/another AI and returns to handling a door. 2. Higher-ranked AI will walk around a lower-ranked AI that’s slower than them and walking in the same direction. 3. Less treadmilling against func_statics. 4. Less jostling when an AI walks through a door and encounters another AI. 5. An AI that gets hung up on another AI while trying to open or close a door will now “reach around” the other AI to open/close the door. 6. A better chance of getting around an AI that stands still to help resolve a block. rev 4553: State.cpp HandleDoorTask.cpp ResolveMovementBlockTask.cpp MovementSubsystem.cpp MovementSubsystem.h ai_pathing.cpp |
|
Date Modified | Username | Field | Change |
---|---|---|---|
22.08.2010 12:19 | Springheel | New Issue | |
25.10.2010 04:21 | grayman | Assigned To | => grayman |
25.10.2010 04:21 | grayman | Reproducibility | have not tried => sometimes |
25.10.2010 04:21 | grayman | Status | new => assigned |
25.10.2010 04:21 | grayman | Product Version | => TDM 1.02 |
25.10.2010 04:21 | grayman | Target Version | => TDM 1.03 |
25.10.2010 12:17 | greebo | Target Version | TDM 1.03 => |
05.02.2011 15:48 | grayman | Note Added: 0003563 | |
05.02.2011 15:48 | grayman | Status | assigned => resolved |
05.02.2011 15:48 | grayman | Resolution | open => fixed |
05.02.2011 15:48 | grayman | Fixed in Version | => TDM 1.04 |
05.02.2011 15:48 | grayman | Target Version | => TDM 1.04 |
27.10.2011 05:16 | greebo | Status | resolved => closed |