There are a few changes that could be made to improve the pathfinding of boats (to produce more natural looking paths)
Adjusting border nodes
The border nodes of areas (mostly 50x50 tiles) are currently always the outermost two positions which allow transition between the area and it's neighbor.
Adjusting this behaviour to:
distance nodes a few tiles from land tiles (-> paths will not hug coasts nearly as much)
adding an additional node on long edges
should produce smoother paths
Respect speed in precalculations
The proprocessed paths are currently only chosen based on distance.
This could be optimized to favor paths with a minimal amount of "turns".
To make it actually useful, pathfinding would need to support more than 8 directions (maybe 32).
We don't need an optimal solution, so handling them as currently while saving possible offsets should be enough
Additional complexity arrises from corner nodes.
Here the boats could arrive/exit from/to three directions with different rotations, so every corner node needs to be handled three times.
This increases preprocess time a lot. A possible simplification would need to be discussed here.
Actually use waypoints to turn boats
The current behaviour of boats was already designed with this in mind.
Boats should start turning whenever they reach a waypoint, making a small curve in the direction of the next one.
Since waypoints are only spaced more than one tile in free-water areas anyways, this won't produce any problems with land collisions
There are a few changes that could be made to improve the pathfinding of boats (to produce more natural looking paths)
Adjusting border nodes
The border nodes of areas (mostly 50x50 tiles) are currently always the outermost two positions which allow transition between the area and it's neighbor. Adjusting this behaviour to:
should produce smoother paths
Respect speed in precalculations
The proprocessed paths are currently only chosen based on distance. This could be optimized to favor paths with a minimal amount of "turns". To make it actually useful, pathfinding would need to support more than 8 directions (maybe 32). We don't need an optimal solution, so handling them as currently while saving possible offsets should be enough
Additional complexity arrises from corner nodes. Here the boats could arrive/exit from/to three directions with different rotations, so every corner node needs to be handled three times. This increases preprocess time a lot. A possible simplification would need to be discussed here.
Actually use waypoints to turn boats
The current behaviour of boats was already designed with this in mind. Boats should start turning whenever they reach a waypoint, making a small curve in the direction of the next one. Since waypoints are only spaced more than one tile in free-water areas anyways, this won't produce any problems with land collisions