Roads that go between cities -or intrastate routes- should be visibly different than roads that branch off of cities to head off to things like mines, mansions, or evac shelters, where they terminate.
They ideally should be multi-laned. They should, or would, be multiple overmap tiles wide and would join with city roads via a diagonal exit (ramp).
This would allow players to differentiate between the way onward and the winding, tedious path to another mansion or mineshaft, which offer non-renewable reasons to visit or weak challenges for uncertain rewards respectively.
Its realistic, helpful, and though it does require somebody who knows how to change the mapgen, it is ultimately doable and a step to both making a standard for Zlevel hiways and things like railways (much, much, much _much_ more common than any subway in NE) feasible.
I dont really know how to go about this, probably looking for the roads themselves and seeing if the terminal roads and the intercity roads are different in the coding.
Even if the the roads simply had different surface markings - solid double lines for highways between towns, dotted lines for side streets, and different coloration in the over-world map, it would allow the player to distinguish between minor/major roads without heavily altering world-gen.
Could be a decent starting point for a larger project, at any rate.
@pisskop take a look at #7534. It seemed to cause freezes at times, like #10462.
Can this be considered a duplicate?..
Can this be considered a duplicate?
No, this is a distinctive (and IMO good) suggestion. I will implement it when I have enough time.
PR #20003 has renamed and reworked overmap::make_hiway() into overmap::build_connection(), overmap::place_hiways() into overmap::connect_closest_points(), and laid the groundwork for different types of roads connecting with oter_t::can_connect_to() (not yet JSONised). Incredibly awesome, @codemime!
There is code to turn "double" road_* terrain into hiway_* in overmap::polish() that was last touched in PR #19518. The section can be considered "dormant", since nothing generates "double roads" AFAIK. Specifically, overmap::build_connection() prefers already-existing roads when making road connections.
How should this proceed? @codemime, I believe you have pondered this already.
As code suggests now, could lay down double roads and then "polish" them into highways.
This leaves a future option of inter-city expressways - would require mapgen laying double roads inside the city, possibly depending on city size. That could be done relatively easily, since all cities start with a road_nesw, and at that point there are no buildings in the city.
OTOH, it could be beneficial to do so from the get-go, and make connections by highways between these inter-city expressways.
Another point of consideration (EDIT: for the current "polishing" approach): say, two cities have been connected by one road, and there's need to lay another one side-by-side to create a highway:
|
โโโโโโโ+โโโโโโโ
|x | |x
|| | ||
>|โโโ | >||<
>|<^^ | >||<
>|< | >||<
>|< | >||<
EDIT: Marked "from" and "to" with x.
It seems that the connection algorithm should consider crossing an existing road, including the "cousin" one.
P.S. It might also be beneficial to take the chance and rename hiway/highway data/functions so that they are consistent and don't require regexes while grepping, or two searches with other tools. AFAIK, no one would even have terrains with id hiway_{ns,ew} in recent savegames.
It's also worth noting that currently there's only hiway_{ns,ew}, no curvy ones.
I agree it would be better to abandon the "polishing" approach and
integrate highways into city building.
I'm not sure roads crossing highways need special code, you'd just end up
with two new terrains, "ns_highway_intersection" and
"ew_highway_intersection", the code already does something like this for
intersections, right? I might be missing something.
When implementing, consider that not all towns will have highway access,
especially smaller ones. Also some access will be along a border, and in
some cases highways circle cities.
Thanks, @keyspace.
The section can be considered "dormant", since nothing generates "double roads" AFAIK. Specifically, overmap::build_connection() prefers already-existing roads when making road connections.
The double roads are extremely rare (due to the fact you've mentioned here), but occasionally they do occur.
How should this proceed? @codemime, I believe you have pondered this already.
I thought about introducing connections as separate entities. "road", "bridge", and "highway" are essentially roads. So they will become the instances of the "road" connection. Terrains that implement the same connection can (and will) be connected during mapgen. Each of them would have some kind of quality:
terrain | quality
-------------|--------
dirt road | 0
timber bridge | 0
[paved] road | 1
[regular] bridge | 1
highway | 2
highway bridge | 2
When the mapgen lays a new road, it can only increase quality, but never vice versa. For example, when it starts laying a dirt road (say, from a farm) and then, at some point, meets an asphalt road, it continues with asphalt.
Also, I was thinking about road signs which would describe directions to the cities (and overmap specials) along with the distances.
I agree it would be better to abandon the "polishing" approach and integrate highways into city building.
I've taken a step towards getting rid of it. We already can drop the invocation of overmap::polish() for roads and get almost (but not quite) nice roads (cities are the exception for now).
the code already does something like this for intersections, right?
Yes, you're right.
and in some cases highways circle cities.
That's a great suggestion.
I'd do something like that [CR]:
I'd like to see some dirt roads going out to some of these old farm houses and perhaps the roads are not even labeled on the map or are labled as "field". I imagine them being a one lane thing with to steady dirt grooves that meander now and again. When traveling by forests it can become a tight squeeze as the vegitation will grow right up to the road. (This would cause a player to need to drive slower as is usually the custom on meandering wooded dirt roads). Just some thoughts.
Most helpful comment
Even if the the roads simply had different surface markings - solid double lines for highways between towns, dotted lines for side streets, and different coloration in the over-world map, it would allow the player to distinguish between minor/major roads without heavily altering world-gen.
Could be a decent starting point for a larger project, at any rate.