Auge's Basic Roads, version 0.1.1

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Auge
Director
Director
Posts: 635
Joined: 23 Oct 2006 02:07
Location: Berlin

Auge's Basic Roads, version 0.1.1

Post by Auge »

Hello

By studying the source code and taking graphics from RattRoads, CountryRoads, Unspooled and AuzRoads I started my own road set. Following roads are planned.

- a foot path for providing ways where a village can build houses but with no vehicles on it
- a precinct/pedestrian zone for towns, also with no vehicle traffic but for cities
- a dirt road (30km/h)
- a paved town road (45km/h)
- an asphalt town road (55km/h, available: 1965)
- a paved country road (60km/h)
- a concrete country road (75km/h, avalable: 1940)
- an asphalt country road (90km/h, available: 1970)
- a concrete highway (90km/h, available: 1930)
- an asphalt highway (120km/h, available: 1975)

That was the early plan.

The first few roads are snow aware (foot path, dirt road, all country roads). The two town roads should also be available with trolley wires (not done) and I plan to include tram tracks without and with overhead wires with the same speed limits and introduction dates as the town roads and additionally interurban tram tracks.
AB-Roads-Status-2021-01-01.png
AB-Roads-Status-2021-01-01.png (9.96 KiB) Viewed 3717 times
In the current state I am far from done (so far no trolleys and trams, not all streets are snow aware and many graphics are placeholders as one can see in the screenshot). I will release the set under the GPL2 (because but not only because the sets I use as base are also GPL2-licensed). The code will be avaliable on Github (currently it is a private repository).
AB-Roads-Schnee-2021-01-01.png
AB-Roads-Schnee-2021-01-01.png (5.59 KiB) Viewed 7236 times

Release of version 0.1.1 (2022-01-12)

ab-roads_0.1.png
ab-roads_0.1.png (10.9 KiB) Viewed 5153 times
current stats:
  1. foot path: houses, no vehicles
  2. pedestrian precint: houses, no vehicles, introduction 1960
  3. dirt road: no houses, 30kph
  4. concrete accomodation road; no houses, 50kph, introduction 1955
  5. set pavd town road: houses, 40kph
  6. asphalt town road: houses, 50kph, introduction 1960
  7. set paved country road: no vehicles, 70kph
  8. asphalt country road: no houses, 90kph, introduction 1970
  9. concrete motorway/highway; no houses, 90kph, introduction 1930
  10. asphalt motorway/highway; no houses, 120kph, introduction 1975
- repository
- releases
- issues

Tschö, Auge
Last edited by Auge on 19 Jan 2022 22:47, edited 3 times in total.
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Auge's Basic Roads

Post by Andrew350 »

Auge wrote: 01 Jan 2021 22:40 First for now: Is it possible to prevent roads getting sidewalks when a town grows? It is nice to get the sidewalks automatically for town roads but they looks ugly when under the dirt road or the slim foot path.
OpenTTD still places the town roads from the base graphics set underneath the NRT roads; that's where the sidewalks are coming from. In order to get rid of them, you basically have two options:
  • You can use the "replace" block to override the base set graphics (sprites 1313-1331) with something of your choosing. This has the benefit of only having to be done once, but whether it's worth it depends on what your specific goals are for what town roads will look like for different roadtypes. For example, I do this in RattRoads to ensure a consistent sidewalk sprite independent of the base set used, so I don't need specific sprites for each roadtype.
  • You can provide full tile sprites via the "underlay" or "overlay" graphics callbacks to hide the base graphics under your NRT roads. This must be done on a per-roadtype basis, but accomplishes the same thing.
Either way, if you wish to show the natural ground underneath instead of sidewalk, the disadvantage is that you have to provide specific support for all climates, and possibly different base sets, depending on how detailed you want to get. It's not ideal, but that's the best we can do right now :)
Kruemelchen
Transport Coordinator
Transport Coordinator
Posts: 287
Joined: 18 Feb 2017 17:47

Re: Auge's Basic Roads

Post by Kruemelchen »

This set looks promising! I like the idea of footpaths! :)
Auge
Director
Director
Posts: 635
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Auge's Basic Roads

Post by Auge »

Andrew350 wrote: 02 Jan 2021 06:37
Auge wrote: 01 Jan 2021 22:40 First for now: Is it possible to prevent roads getting sidewalks when a town grows? It is nice to get the sidewalks automatically for town roads but they looks ugly when under the dirt road or the slim foot path.
OpenTTD still places the town roads from the base graphics set underneath the NRT roads; that's where the sidewalks are coming from.
So far, so known.
Andrew350 wrote: 02 Jan 2021 06:37 You can use the "replace" block to override the base set graphics (sprites 1313-1331) with something of your choosing. This has the benefit of only having to be done once, but whether it's worth it depends on what your specific goals are for what town roads will look like for different roadtypes. For example, I do this in RattRoads to ensure a consistent sidewalk sprite independent of the base set used, so I don't need specific sprites for each roadtype.
I found only the replacement for one-way-road-arrows and subarctic-street-trees (and something, I can't remember without seeing the code) but no code for sidewalk-replacements in your nml-source for RattRoads 1.0.2. I must find my own ancient code for the Comic-Roads replacements, where I did nothing else than replacing the base graphics.

Beside that I suspect, I can only disable the default streets in general but not per road type?
Andrew350 wrote: 02 Jan 2021 06:37 You can provide full tile sprites via the "underlay" or "overlay" graphics callbacks to hide the base graphics under your NRT roads. This must be done on a per-roadtype basis, but accomplishes the same thing.
That sounds promising but ...
Andrew350 wrote: 02 Jan 2021 06:37 Either way, if you wish to show the natural ground underneath instead of sidewalk, the disadvantage is that you have to provide specific support for all climates, and possibly different base sets, depending on how detailed you want to get.
... this point is valid for the second approach or for both of them?
Andrew350 wrote: 02 Jan 2021 06:37 It's not ideal, but that's the best we can do right now :)
It would be nice to have a bitmask flag to control this per roadtype (ROADTYPE_FLAG_NO_DEFAULT UNDERLAY or ..._NO_SIDEWALKS or something similar).

Anyway, thank you for your advice.

Tschö, Auge
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Auge's Basic Roads

Post by Andrew350 »

Auge wrote: 04 Jan 2021 14:37 found only the replacement for one-way-road-arrows and subarctic-street-trees (and something, I can't remember without seeing the code) but no code for sidewalk-replacements in your nml-source for RattRoads 1.0.2.
Ah, that bit is here:

Code: Select all

replace replace_road_city_universal (1313, "gfx/misc_sprites.png") { //replaces the base sprites to make sure city roads stay consistent across base sets
	template_roads_main_new(1, 1)
}
Auge wrote: 04 Jan 2021 14:37 Beside that I suspect, I can only disable the default streets in general but not per road type?
That is correct.
Auge wrote: 04 Jan 2021 14:37 ...this point is valid for the second approach or for both of them?
Both of them, unfortunately.
Auge wrote: 04 Jan 2021 14:37 It would be nice to have a bitmask flag to control this per roadtype (ROADTYPE_FLAG_NO_DEFAULT UNDERLAY or ..._NO_SIDEWALKS or something similar)
I agree :)
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: Auge's Basic Roads

Post by Timberwolf »

It'd be nice to be able to toggle the town pavements and the depot underlays separately per roadtype, perhaps something like ROADTYPE_FLAG_NO_TOWN_PAVEMENTS and ROADTYPE_FLAG_NO_DEPOT_UNDERLAY.

(There are also bridge heads, but I'm not sure if those are useful to turn off as they vary according to bridge type)
User avatar
Gadg8eer
Traffic Manager
Traffic Manager
Posts: 190
Joined: 14 Dec 2019 14:22

Re: Auge's Basic Roads

Post by Gadg8eer »

Auge wrote: 01 Jan 2021 22:40 Hello

By studying the source code and taking graphics from RattRoads, CountryRoads, Unspooled and AuzRoads I started my own road set. Following roads are planned.

- a foot path for providing ways where a village can build houses but with no vehicles on it
- a precinct/pedestrian zone for towns, also with no vehicle traffic but for cities
- a dirt road (30km/h)
- a paved town road (45km/h)
- an asphalt town road (55km/h, available: 1965)
- a paved country road (60km/h)
- a concrete country road (75km/h, avalable: 1940)
- an asphalt country road (90km/h, available: 1970)
- a concrete highway (90km/h, available: 1930)
- an asphalt highway (120km/h, available: 1975)

The first few roads are snow aware (foot path, dirt road, all country roads). The two town roads should also be available with trolley wires (not done) and I plan to include tram tracks without and with overhead wires with the same speed limits and introduction dates as the town roads and additionally interurban tram tracks.

AB-Roads-Status-2021-01-01.png

In the current state I am far from done (so far no trolleys and trams, not all streets are snow aware and many graphics are placeholders as one can see in the screenshot). I will release the set under the GPL2 (because but not only because the sets I use as base are also GPL2-licensed). The code will be avaliable on Github (currently it is a private repository).

AB-Roads-Schnee-2021-01-01.png

I have and will have questions.

First for now: Is it possible to prevent roads getting sidewalks when a town grows? It is nice to get the sidewalks automatically for town roads but they looks ugly when under the dirt road or the slim foot path.

So far from me.

Tschö, Auge
You might find this to be useful. It's the source code to a "Roadtype Fixes" GRF I've already released on BaNaNaS. It replaces the default road graphics with grass and concrete.
Attachments
nrtfix_12a.7z
(181.73 KiB) Downloaded 104 times
I have Asperger's, please be easy on me about stuff. My apologies if I've been a problem for you in the past.
Auge
Director
Director
Posts: 635
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Auge's Basic Roads

Post by Auge »

Hello
Gadg8eer wrote: 05 Jan 2021 01:09
Auge wrote: 01 Jan 2021 22:40 Is it possible to prevent roads getting sidewalks when a town grows? It is nice to get the sidewalks automatically for town roads but they looks ugly when under the dirt road or the slim foot path.
You might find this to be useful. … It replaces the default road graphics with grass and concrete.
Yes, after the first sight into the code it is helpful. Thank you.

Tschö, Auge
Auge
Director
Director
Posts: 635
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Auge's Basic Roads

Post by Auge »

Hello

I am working on adding new and overhaul existing graphics for a few road types and fell into a trap while experimenting. I wanted to add graphic styles for european roads and north american roads with their white or yellow road markings. Nothing easier than that. Add the parameter to the NewGRF and use it to select the according sprite set.

Then I had the idea to define the road markings as the overlays to a single underlay spriteset (no need for more as this one then) and tried that on one road type. The road-marking-overlays would be compemented with optional snow sprites as a second, combined variant. And so it began. Everything worked as expected until it came to bridge surfaces. With the correct underlay the surface in itself was correct displayed but OpenTTD used the overlays for straight, rising and descending street tiles for the road markings on bridges. That way also the outside road markings of these tiles is visible.
Unbenannt, 1. Jan 1980.png
Unbenannt, 1. Jan 1980.png (35.78 KiB) Viewed 3717 times
As one can see, the program combines on bridges the road surface sprites with their hardcoded road markings (with the doubled solid lines for the north american style) with the open worked line of the flat road sprites and the one-side open worked line of the road marking for rising street sprites and with the outer road markings of these sprites. Is it normal that OpenTTD uses the wrong overlays for bridges when they are provided as overlay (road markings in general and the complete bridge surface sprites)? Other road type graphics (taken from other sets) have their road markings hardcoded in the underlay and have no overlays for bridge sprites.
hway_concrete_northamerica_over.png
hway_concrete_northamerica_over.png (8.84 KiB) Viewed 6658 times
Is it a blind alley to follow the idea to provide different road markings as overlays (it seems so)? It seems to be easier to generate the different underlays for the road styles with their matching, hardcoded road markings in one spriteset.

Oh and another question. Is it possible to detect the game setting for left- or right-hand-driving in the GRF respectively with NML?

Thank you in advance and tschö, Auge
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: Auge's Basic Roads

Post by Timberwolf »

Auge wrote: 18 Jan 2021 12:55 Oh and another question. Is it possible to detect the game setting for left- or right-hand-driving in the GRF respectively with NML?
Yes - here is the relevant switch from Timberwolf's Roads:

Code: Select all

switch (FEAT_ROADTYPES, SELF, switch_driveside_town_underlay, traffic_side) {
    TRAFFIC_SIDE_RIGHT: rhs_town_underlay;
    town_underlay;
}
Hopefully that makes sense enough by itself, the relevant variable is traffic_side.
Auge
Director
Director
Posts: 635
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Auge's Basic Roads

Post by Auge »

Hello
Timberwolf wrote: 18 Jan 2021 14:02 here is the relevant switch from Timberwolf's Roads:

Code: Select all

switch (FEAT_ROADTYPES, SELF, switch_driveside_town_underlay, traffic_side) {
    TRAFFIC_SIDE_RIGHT: rhs_town_underlay;
    town_underlay;
}
Hopefully that makes sense enough by itself, the relevant variable is traffic_side.
Thank you. That's really simple and reacts instantaneously on the change of the game setting (as tested just now with your road set). :-)

Beside that, I get the feeling that my experiment with road markings as overlay was a fail. I will rework graphics and code. Additionally I get new ideas studying the code of your set (maybe i.e. time dependent sprites and speed limits).

Tschö, Auge
Auge
Director
Director
Posts: 635
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Auge's Basic Roads

Post by Auge »

Hello

With the help of Timberwolf's code example I was able to implement the left hand driving sprites into the first road type. It's not perfect but it's a starting point. Thank you, Timberwolf.

ab-roadset-lhd.png
ab-roadset-lhd.png (13.88 KiB) Viewed 6514 times

Tschö, Auge
Auge
Director
Director
Posts: 635
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Auge's Basic Roads

Post by Auge »

Hello

I want to share two screenshots as a life sign.
abr-road-types.png
(51.34 KiB) Not downloaded yet
From left to right

- foot path: no vehicles, no rail crossing, houses
- pedestrian precinct: no vehicles, no rail crossing, houses, introduction 1960
- dirt accomodation road: vehicles, rail crossing, no houses, 30 kph
- concrete accomodation road: vehicles, rail crossing, no houses, 50 kph, introduction 1955
- stone paved town road: vehicles, rail crossing, houses, 40 kph
- asphalt town road: vehicles, rail crossing, houses, 50 kph, introduction 1960
- stone paved country road: vehicles, rail crossing, no houses, 70 kph
- asphalt country road: vehicles, rail crossing, no houses, 90 kph, introduction 1960
- concrete motorway: vehicles, no rail crossing, no houses, 90 kph, introduction 1930
- asphalt motorway: vehicles, no rail crossing, no houses, 120 kph, introduction 1975

During many hours of play testing, I moved a few types and changed their characteristics from my first design to make the set more consistent. Every road type class now contains two types (the conrete accomodation road was planned as an intermediate step between the both remaining country roads at the beginning). I tweaked the introduction dates and the max speeds in a few cases and a few times. In every class one type is available from the beginning and one faster type will be introduced at a later time. In contast to my first plan the set will not contain industrial roads. I combined my set with a few other sets during the tests and it works great i.e. with the ISRRoadtype Set-addon (Andrew350, Wallyweb, GarryG). So there's no need to reinvent the wheel.
country-road-example.png
country-road-example.png (24.99 KiB) Viewed 6196 times
As an example you see a stone paved country road connecting two towns with stone paved town roads. The poles are implemented as catenary and overlays with the ones from neighbouring tiles so one sees only one pole in every combination of road pieces. The outermost pole in the curve is a bit problematic when one rebuilds the tile to a junction. In that case the pole stays visible until one builds a road tile connected to the new direction of the junction.

Currently the set does not contain wired roads and trams. there are also a few issues in the pure road graphics I want to solve before releasing version 0.1. With that version I want the balancing of the roads to be tested. I think that it will be ready in one or two weeks.

Tschö, Auge
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 502
Joined: 11 Aug 2019 18:15
Contact:

Re: Auge's Basic Roads

Post by 2TallTyler »

Looks good! I’m excited to see how the pedestrian roads get used in towns.
Kruemelchen
Transport Coordinator
Transport Coordinator
Posts: 287
Joined: 18 Feb 2017 17:47

Re: Auge's Basic Roads

Post by Kruemelchen »

Looks great!

Would you mind telling us what labels you are using? So I can support this set in my RV sets :)

Another question, are the poles year dependant? I think it would look out of place in early start games.
Also, if I recall correctly, you can put the poles in the centre of the tile as catenary for both sides. The hard coded bounding box is in the centre of the tile, so the catenary in the background won't overlap RVs. (You can look at the poles in my country roads grf)

And about the footpath, I really love the idea! I think it would behave great with horse traffic, i.e. horse carts, courier horses etc., or motor bikes. I am working on a set for this, and I think polroad has some vehicles fitting this scenario, too. I am a bit concerned though, the path could be too narrow. But again, I'll see when the first version is released :)

I'm looking forward trying this set out, is what I'm trying to say :D
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: Auge's Basic Roads

Post by Wahazar »

Nice idea with these restricted roads. It allow to easily keep buses separate from tram stops (making one-ways is tedious and don't work if stop is at the corner of busy road).
Auge
Director
Director
Posts: 635
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Auge's Basic Roads

Post by Auge »

Hello
Kruemelchen wrote: 30 May 2021 10:18 Looks great!
Thank you (and the others).
Kruemelchen wrote: 30 May 2021 10:18 Would you mind telling us what labels you are using? So I can support this set in my RV sets :)
When I am ready for the release of 0.1 I'll also make the Github repository available.

In general I used my own labels. The non driving roads are FOOT (foot path) and PEDZ (pedestrian precinct) and are not compatible with any other road type and especially not compatible with ROAD.
Kruemelchen wrote: 30 May 2021 10:18 Another question, are the poles year dependant? I think it would look out of place in early start games.
No, they aren't. It would be nice if the poles activates automatically when year X starts but as far as I know this doesn't work.
Kruemelchen wrote: 30 May 2021 10:18 And about the footpath, I really love the idea! I think it would behave great with horse traffic, i.e. horse carts, courier horses etc., or motor bikes. I am working on a set for this, and I think polroad has some vehicles fitting this scenario, too. I am a bit concerned though, the path could be too narrow. But again, I'll see when the first version is released :)
Yes, the foot path is narrower than than a "normal" road. My idea was to have a road type that allows to build houses without any road vehicle traffic. But yes, with vehicles that are compatible with FOOT oder PEDZ the roads are usable by these vehicles. But the vehicles would drive beside the visible path. This is no problem with the pedestrian precinct/zone because this road type takes the whole width of a tile.
McZapkie wrote: 30 May 2021 17:35 Nice idea with these restricted roads. It allow to easily keep buses separate from tram stops (making one-ways is tedious and don't work if stop is at the corner of busy road).
Yes, one intention was to make a city grow without (especially) busses driving the "wrong" roads.

Tschö, Auge
Last edited by Auge on 31 May 2021 08:59, edited 1 time in total.
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: Auge's Basic Roads

Post by Wahazar »

Auge wrote: 31 May 2021 08:09 Yes, one intention was to make a city grow without (especially) busses driving the "wrong" roads.
But I second Kruemelchen question about road's IDs.
Auge
Director
Director
Posts: 635
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Auge's Basic Roads

Post by Auge »

Hello
McZapkie wrote: 31 May 2021 08:16
Auge wrote: 31 May 2021 08:09 Yes, one intention was to make a city grow without (especially) busses driving the "wrong" roads.
But I second Kruemelchen question about road's IDs.
Sorry, I made a mistake with my first answer. I edited the named posting. ;-)

Tschö, Auge
Kruemelchen
Transport Coordinator
Transport Coordinator
Posts: 287
Joined: 18 Feb 2017 17:47

Re: Auge's Basic Roads

Post by Kruemelchen »

Okay, let's be patient then :)
Auge wrote: 31 May 2021 08:09 No, they aren't. It would be nice if the poles activates automatically when year X starts but as far as I know this doesn't work.
Can't you insert a switch that checks the date (current_year) and replaces the pole sprites with empty ones? It works for me (showing/hiding snow marker poles) like this:

Code: Select all

switch(FEAT_ROADTYPES, SELF, switch_snow_markers_rear_year, current_year) {
	0..1919: empty_sprite;		// use empty sprite
	default: snow_marks_rear;	// use snow markers sprite
}
cheers
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 23 guests