Pathfinding is finally working on the map. After spending some time with a recursive function that just didn’t want to return, I have a functioning shortest-path algorithm implemented. Surprising, I had the most difficulty with moving the miniature off the grid. You’ll notice in the video that not only is it successfully finding its way around the hole in the floor, but you can also drag the miniature over the hole and it solves the path as soon as it’s on the other side.
I’ve spent some time considering different methods of movement, in particular, setting waypoints and evaluating movement at the end of the turn. After picking up and moving the mini around the map countless times, I’m currently inclined to not do waypoints. Picking up the mini and setting it down until all the moves are expended feels the most natural to me, the most like moving a real miniature. If the player really has made a mistake and needs to reset the move, the GM could undo the action and allow the player to redo some or all of the move. read more
