Option for `Room.findPath`



  • I would like to see an option for path finding which ignores the terrain costs (e.g. swamp or road) and instead finds the "real" shortest path possible.

    Room.findPath options:
    
    * ignoreTerrain : boolean
           ignores the costs imposed by terrain (e.g. roads or swamp)
    


  • I think this is already achieved by setting heuristicWeight to 0?



  • The spec is very vague on that, but I'm pretty sure, that hW 0 yields the best path possible. Setting it to a hery high value yields less optimal paths (it is unclear however, which value is appropriate).

    I do want to find the optimal path - however not in movement costs, but in terms of steps.


  • Dev Team

    You can achieve that by setting heuristicWeight to any large value, say, 1000. You can read more about A* search algorithm in this Wikipedia article.