indigo icon indicating copy to clipboard operation
indigo copied to clipboard

Consider improving `PathFinder` UX

Open davesmith00000 opened this issue 1 year ago • 0 comments

@mprevel has done a fantastic job producing a new path finder for Indigo, I've integrated it into a project and it works perfectly. :muscle:

I would however like to work on the UX a bit, not immediately, happy to let it stew for a while and see how it feels after I've been using it for a bit. Maybe this then goes into a future release along with the SearchGrid deprecation.

On PathFinder, I like a small extra method added called nextMove, which just runs findPath and gives you the next move, if there is one, i.e.:

def nextMove(start, end, pathBuilder): Option[Point]
def nextMove(start, end, pathBuilder, default: => Point): Option[Point]

Are there any other functions like that, that someone might want?

With PathBuilder I don't have many concrete asks yet, but I'd like the options to be more discover-able / configurable. Maybe it's something like (I'm making this up!):

PathBuilder
  .fromRectangle(room)
  .noDiagonals
  .withImpassible(impassible)

Also is PathBuilder really a path builder? Or is it some sort of map/grid builder? Just musing. :thinking:

davesmith00000 avatar Jan 06 '24 22:01 davesmith00000