Anonymous | Login | 2024-04-25 17:55 CEST |
Main | My View | View Issues | Change Log | Wiki | Tavern | News |
Viewing Issue Simple Details [ Jump to Notes ] [ Wiki ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||||||
0010104 | [DCSS] Bug Report | minor | random | 2015-11-26 18:36 | 2015-11-27 02:05 | ||||||||
Reporter | doy | View Status | public | ||||||||||
Assigned To | doy | ||||||||||||
Priority | normal | Resolution | done | ||||||||||
Status | resolved | Product Branch | 0.18 ancient branch | ||||||||||
Summary | 0010104: monster pathfinding breaks in certain situations | ||||||||||||
Description |
When there's a wall between you and a monster in certain configurations, the monster can end up getting stuck behind the wall occasionally, rather than being able to follow the player around the wall. This isn't a monster intelligence issue - it happens even with human-intelligence monsters. An example, from a real (wizmode) game: distance 6 (in los): ,......... ,.o....... ,......... ,......... ,......... ,......... ,......... ,,,,,,,#@. ,,,,,,,#.. ,,,,,,,#.. player moves south, the monster sees the player move south (since that's still in los from the monster's position) and sets the tile south of the player as its target. the monster then moves south itself, since the tile to the south is closer to the target than its current tile. this moves the monster out of los, and it never reenters los (so the remaining moves are all based on the player's remembered position). distance 6 (not in los): ,,,,,,,,,, ,,........ ,,o....... ,,,,...... ,,,,,..... ,,,,,,.... ,,,,,,,... ,,,,,,,#.. ,,,,,,,#@. ,,,,,,,#.. distance 5 (not in los): ,,,,,,,,,, ,,........ ,,,....... ,,,o...... ,,,,,..... ,,,,,,.... ,,,,,,,... ,,,,,,,#.. ,,,,,,,#@. ,,,,,,,#.. distance 4 (not in los): ,,,,,,,,,, ,,........ ,,,....... ,,,,...... ,,,,o..... ,,,,,,.... ,,,,,,,... ,,,,,,,#.. ,,,,,,,#@. ,,,,,,,#.. distance 3 (not in los): ,,,,,,,,,, ,,........ ,,,....... ,,,,...... ,,,,,..... ,,,,,o.... ,,,,,,,... ,,,,,,,#.. ,,,,,,,#@. ,,,,,,,#.. distance 2 (not in los): ,,,,,,,,,, ,,........ ,,,....... ,,,,...... ,,,,,..... ,,,,,,.... ,,,,,,o... ,,,,,,,#.. ,,,,,,,#@. ,,,,,,,#.. at this point, it wants to move southeast, since that's the only way for a move to bring it closer to the target. there's a wall in the way, though, so it can't, so it picks either east or south arbitrarily. it picks arbitrarily because the initial target was set by the target being in los, so it assumes that it can just walk toward the target without actually needing to run pathfinding at all. if it picks east, it has a possible next move which brings it closer to the target, and so things work fine. if it moves south, though, it runs into problems. distance 2 (not in los): ,,,,,,,,,, ,,........ ,,,....... ,,,,...... ,,,,,..... ,,,,,,.... ,,,,,,,... ,,,,,,o#.. ,,,,,,,#@. ,,,,,,,#.. again, no moves can move it closer to the target, so it picks one (is this true? or is moving south again guaranteed at this point?) distance 2 (not in los): ,,,,,,,,,, ,,........ ,,,....... ,,,,...... ,,,,,..... ,,,,,,.... ,,,,,,,... ,,,,,,,#.. ,,,,,,o#@. ,,,,,,,#.. once it gets to this point, it just keeps trying to move into the wall, and so never actually makes any more moves unless the player comes back into sight. i'm not sure why it doesn't at least try moving up or down, since that wouldn't increase the distance to the target. i think the right answer is, if the monster can't find a next move which decreases the distance from the monster to the target, it should force a real pathfind. Another option would be for it to force a pathfind immediately when a monster's move takes it out of los of the target. |
||||||||||||
Additional Information | |||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files | |||||||||||||
|
Mantis 1.1.8[^] Copyright © 2000 - 2009 Mantis Group |