Pathing ignores walls on room edge



  • When requesting a path to an exit any pathing attempt will ignore walls at the edge of the room, causing the creep to bounce against the wall infinitely.

    This can currently only be solved by an additional look request for the exit destination to check for structures or terrain walls.



  • Is this still a problem on the production server? It was a problem late January when I respawned, but OCS users are reporting otherwise.

    Do you have a room example or does this only occur on private servers?



  • I had this issue yesterday on the production server. Several of my creeps did a long range pathing (old pathing code) and got all stuck in a terrain wall that was placed at the edge of a map where supposedly also an exit was placed. Since I had the moveTo line displayed, I can with absolute certainty say that this was a pathing issue of the live game version.



  • "terrain wall that was placed at the edge of a map"

    I'm really interested in this. Was it a respawn / novice wall or a player placed structure? Were its coordinates on top of or adjacent to the exit or were they 2 spaces from an exit?

    For walls placed at range 2 from an exit - this is a code problem that everyone has to solve. I'm helping OCS work out some way to enumerate and record all exit segments.



  • It was a standard terrain wall as randomly generated. It was also placed at the exact same spot as the exit, which I think caused the error.

    The path was calculated by the Map.findRoute function.



  • This definitely sounds like a map bug. There's nothing you can do apart from detect that a creep is on the exit square but did not move to the adjacent room.

    This is normal for highway rooms adjacent to unavailable rooms, and previously normal when you're in a closed novice zone trying to cross from one closed quadrant to another closed quad.



  • The screep was not on the exit square, the terrain wall was. The screep just bumped into that wall over and over again.



  • Now I'm not sure you're describing this consistently. A room name will help communicate your problem better.


  • Culture

    TwoThe-

    Is there any change you're generating your own costmatrixes?



  • Not for this function, that is plain ol' creep.moveTo.



  • Here's the engine code that does the default costmatrix: https://github.com/screeps/engine/blob/c318a920e3c04c1285c885e328d89ef748d7004c/src/game/rooms.js#L58

     

    if you can run Game.rooms[roomName].find(FIND_STRUCTURES, {filter:i=>i.pos.x===0||i.pos.x===49||i.pos.y===0||i.pos.y===49}) and let us know if that wall shows up then it will be easier to identify where the bug is.

     

    It could be that the underlying pathfind ignores the last square in a room because there is no intent needed to move to the first square in the next room.