Making road speed limits based on town zone (or lack thereof)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
TransportFanMar
Engineer
Engineer
Posts: 2
Joined: 16 Dec 2021 12:02

Making road speed limits based on town zone (or lack thereof)

Post by TransportFanMar »

Currently, some NewGRFs such as U&RaTT have different road types with varying speed limits, including "urban" road types which have no benefit except realism (as they are slower than equivalent non-urban which also can have houses nearby), supported by NRT. It confuses me what the point of the urban roads is as even highways (which don't spawn houses) can have a "sidewalk".

Then I thought, what if town zone (or lack thereof for roads outside a town) rather than road type (or even both, with the lower taking precedence) was used to determine speed limits, say between 50km/h and 70km/h within cities and 100km/h or higher (or unlimited) outside cities? Would this be feasible to be part of the base game or with NewGRFs? I wonder if this is even possible.
Auge
Route Supervisor
Route Supervisor
Posts: 493
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Making road speed limits based on town zone (or lack thereof)

Post by Auge »

Hello
TransportFanMar wrote: 10 Jan 2022 06:08 Currently, some NewGRFs such as U&RaTT have different road types with varying speed limits, including "urban" road types which have no benefit except realism (as they are slower than equivalent non-urban which also can have houses nearby), supported by NRT. It confuses me what the point of the urban roads is as even highways (which don't spawn houses) can have a "sidewalk".
The sidewalk is (in the most sets) the default sidewalk from the main game. It's drawn (when drawn) under the road graphic and its drawing depends on the town zone (no sidewalk or sidewalk, with or without trees or lamps …). This leads to the situation, that the default sidewalks are drawn under every road type, even this makes no sense. Unfortunately NRT does not provide a way to regulate the sidewalks road type dependent.
TransportFanMar wrote: 10 Jan 2022 06:08 Then I thought, what if town zone (or lack thereof for roads outside a town) rather than road type (or even both, with the lower taking precedence) was used to determine speed limits, say between 50km/h and 70km/h within cities and 100km/h or higher (or unlimited) outside cities? Would this be feasible to be part of the base game or with NewGRFs? I wonder if this is even possible.
No, with the current game code this isn't possible (as far as I know). All towns are generated with the fastest available roads (depending on time of game start) that are allowed as town roads. Beside of that I wouldn't like this mechanism but that's my own, private opinion.

Tschö, Auge
RoyalExamination9410
Engineer
Engineer
Posts: 18
Joined: 14 Nov 2021 06:56
Location: Canada

Re: Making road speed limits based on town zone (or lack thereof)

Post by RoyalExamination9410 »

TransportFanMar wrote: 10 Jan 2022 06:08 Currently, some NewGRFs such as U&RaTT have different road types with varying speed limits, including "urban" road types which have no benefit except realism (as they are slower than equivalent non-urban which also can have houses nearby), supported by NRT. It confuses me what the point of the urban roads is as even highways (which don't spawn houses) can have a "sidewalk".

Then I thought, what if town zone (or lack thereof for roads outside a town) rather than road type (or even both, with the lower taking precedence) was used to determine speed limits, say between 50km/h and 70km/h within cities and 100km/h or higher (or unlimited) outside cities? Would this be feasible to be part of the base game or with NewGRFs? I wonder if this is even possible.
How do we tell what town zone is, you can't seem to see how far they go. Otherwise its a good idea, I manually put in 30 km/h roads in some towns as residential streets but as the towns grow they extend the roads with modern full speed road pieces, this doesn't look too realistic to me
User avatar
wallyweb
Tycoon
Tycoon
Posts: 5947
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Making road speed limits based on town zone (or lack thereof)

Post by wallyweb »

Here is a simple little tool that I am working on.
93_TownZone.grf
(2.77 KiB) Downloaded 10 times
It is very much a work in progress so there is no documentation yet.
It is gpl v2 so do with it what you will.

It is object based and can be overbuilt without dynamite.
When placed within a town's limits it displays the zone of that tile.
Beyond a town's limits it displays a solid red tile.
The numbers will change as a town grows so you might have to press "Apply Changes" to see the results.
Another option to see the changes is to simply drag a mini window across the tiles.

At the moment only flat tiles are supported. Sloped tiles are in the development roadmap.
_dp_
Traffic Manager
Traffic Manager
Posts: 224
Joined: 18 Dec 2013 12:32

Re: Making road speed limits based on town zone (or lack thereof)

Post by _dp_ »

You can grab citymania client (https://citymania.org/downloads) if you want to see town zones, it has a zoning mode that shows them all nicely.
Screenshot from 2021-04-03 00-09-29.png
(493.58 KiB) Not downloaded yet
User avatar
wallyweb
Tycoon
Tycoon
Posts: 5947
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Making road speed limits based on town zone (or lack thereof)

Post by wallyweb »

_dp_ wrote: 11 Jan 2022 12:26 You can grab citymania client (https://citymania.org/downloads) if you want to see town zones, it has a zoning mode that shows them all nicely.
Nice. :bow:
Do you rebase it with new OpenTTD releases?
_dp_
Traffic Manager
Traffic Manager
Posts: 224
Joined: 18 Dec 2013 12:32

Re: Making road speed limits based on town zone (or lack thereof)

Post by _dp_ »

wallyweb wrote: 11 Jan 2022 12:37 Do you rebase it with new OpenTTD releases?
Yes, all releases and even some pre-releases. You can see the full list of older versions at the bottom of that download page.
ufiby
Engineer
Engineer
Posts: 126
Joined: 18 Nov 2017 13:58

Re: Making road speed limits based on town zone (or lack thereof)

Post by ufiby »

It is impossible to determine the speed limits in an town zone. Thus, there is no such thing as variable speed in the current game code. The city road is drawn on top of the sidewalk, which is used by default in the base game. For a city road, it doesn't depend on the town zone, it's just for decoration and to taste. U&RaTT has "sequence" parameters that limit the speed of movement only in the city, which are not available to the player. Unfortunately, this is not enough. For me, the speed limit on every type of road is not impressive. Thus, any vehicles, including passenger cars, move the same way with a limited speed of the road type. Therefore, passenger cars cannot catch up with the truck. This game is a bit boring.
There is another idea. Vehicles have variable speeds and so on. It's a bit like reality. But this will require a lot of work with the compatibility of road types. For example, a bus travels on non-high-speed asphalt roads, gaining a maximum speed of 120 km/h, despite the fact that the types of roads have speed limits that are much lower than the speed of the bus. If the bus is traveling on a highway where there are no speed limits, the speed will increase faster than the maximum speed. This is closer to reality.

Image
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 2 guests