February 12, 2019

Roads IV: Take to the Sea!

Sea routes are essential for trade between people. I suppose you could have robust trade networks if you were confined to land, but it's a lot easier (not without risk) to put a bunch of stuff on a ship, rather than haul it across a dangerous terrain.

So naturally I needed to update my sea current algorithms and make sure everything is peachy there.

Once that's done, I can use my A* algorithms to place "roads" in the sea. Going with the current is easier, but the more you turn against the current, the more difficult it is. This means that a double-edged graph is in hysteresis: the return journey must take a different route.


It takes a while. The roads are by definition close by - sea routes theoretically make shorter work of a much longer journey. In addition, there are too many function calls in the algorithm right now, so I'll have to work on that.

Unlike roads, there is no maximum number of routes that may pass in a certain hex or a minimum score for a hex to support a route. You just sail through it. A higher number of routes might mean a higher risk of piracy, though.

I'd also like to add in a maximum distance that the route can be based on the development or infrastructure level of the originating harbor. A small fishing village will not be launching transoceanic trade routes.

It might also be good to penalize routes that are too far from a coast. It's harder to resupply when you strike out more than a day or two from a large landmass. But not impossible. So I'll work on that. It might make the route take longer but if you can avoid really long, empty routes, that would be desirable.

Even the shortest route here spends about 40 days out of sight of land
Regardless, this will be an interesting addition to the trade network.

No comments:

Post a Comment