The recent update to Azgaar's Fantasy Map Generator introduces an overhaul of the routes system. The original routes system had several shortcomings that limited its realism and functionality:
The previous system interconnected all burgs (settlements), but each burg was only linked to one or two other burgs, making routes system look like a chain rather than a network.
Route data was not properly stored, which made it impossible to perform operations or calculations based on these routes. This also meant routes had no names and there was no overview page to display route details.
Custom routes did not affect the underlying map data and were not based on it, leading to a visual and data disconnect between the automatically and manually created routes.
To create a more realistic and functional routes network, the new system introduces several important changes and optimizations.
Urquhart graph
To create a more realistic network, each burg must be connected to most of its neighbors. While this may seem straightforward, implementing it efficiently required a sophisticated approach. The solution lies in the use of an Urquhart graph.

This graph is derived by removing the longest edge from each triangle in the Delaunay triangulation, creating a network that resembles real-world road systems. This method is both simple and computationally efficient, enabling the generator to produce complex and plausible routes.

Here is the comparison between the old and the new systems. The old routes system in on the left, while the reworked system on the same map is on the right side. Main roads are in blue, while trails are in orange.

As you can probably see, the new system is much more realistic.
Data storage
The update introduces a new data format that stores all route information. This includes data on cell connections, allowing for more precise control. Storing route data opens up possibilities for new advanced features:
Trade system: the tool can potentially model trade routes and economic exchanges between burgs. This is important for the longtime planned economic simulation.
Travel builder: future updates could introduce tools for planning journeys or campaigns based on existing routes.
Population redistribution: routes can influence the distribution of populations, reflecting how settlements grow along major roads.
Separation of concerns: the idea is too separate map data from its view layer, allowing alternative map renderers, better save system, and creation of map API.
Please note that there is no schedule for implementing these features, these are just some ideas I may work on in the future.
Routes overview
Additionally, the system now includes a Routes overview, which displays all routes along with their names and lengths. This feature improves the usability of the tool by providing easy access to route information.

Cell-based route creation
The new system ties route creation to the underlying map data, meaning custom routes now follow the cells structure. This approach allows for more accurate route placement.

Route editor
The Route editor has also been reworked to offer finer control over route course. Users can now lock specific routes to prevent them from being regenerated.

Compatibility
The update includes an automatic process for updating old .map files. Since the previous version did not store routes data, the system reconstructs route information based on SVG paths from the old maps. While this reconstruction is not perfectly precise, it should be sufficient for most use cases.
In any case, please report any bugs you encounter and share your feedback on the new system. The next update should come soon, stay tuned.
Azgaar
2024-09-02 20:02:01 +0000 UTCMartin Seeger
2024-09-02 20:00:40 +0000 UTC