Oneway road only using one side of road.

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
gregorywest
Engineer
Engineer
Posts: 9
Joined: 26 Apr 2010 12:23

Oneway road only using one side of road.

Post by gregorywest »

I have a large number of trucks hauling raw material to a train station. I have to oneway roads, one going to the station, one from. Problem is the trucks only use one side of the oneway road and create a bottleneck. What am I doing wrong?
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Oneway road only using one side of road.

Post by FooBar »

You're probably doing nothing wrong.

With one-way roads, road vehicles still drive on the driving side and only use the opposite side for overtaking, like on normal roads. The difference is that overtaking is easier because there is no opposing traffic on a one-way road.

You also must know that articulated vehicles (the ones that can only use drive-through stops) cannot overtake and therefore will always use only one side of the road, one-way or not.
gregorywest
Engineer
Engineer
Posts: 9
Joined: 26 Apr 2010 12:23

Re: Oneway road only using one side of road.

Post by gregorywest »

That is what I thought. But when one truck stalls (breaks down) all the rest of the trucks just pile up behind it. Is there a fix to this?
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: Oneway road only using one side of road.

Post by Eddi »

no, this limitation is very deep in the code and cannot be fixed.
Lockwood
Engineer
Engineer
Posts: 57
Joined: 14 Aug 2005 17:24

Re: Oneway road only using one side of road.

Post by Lockwood »

At the risk of getting shot down again, why can't the vehicle code detect that the vehicle in front which is broken down is going slowe rthan it and overtake based off of that?
If the 70mph van can see the 56mph lorry ahead and decide "That's 56mph. I'm 70mph. I'm faster. Overtake.", why not go "That's 0mph. I'm 70mph. I'm faster. Overtake."
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Oneway road only using one side of road.

Post by FooBar »

Deepsmeg wrote:why can't the vehicle code detect that the vehicle in front which is broken down
Basically because the vehicle code is never taught to understand that.
Probably not the answer you were looking for, but there you go :P
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Oneway road only using one side of road.

Post by Terkhen »

The road vehicle movement code could be changed to do that. It just need someone that is willing to rework the whole thing (right now it is very confusing) taking into account all possible corner cases and other missing stuff. For example, right now under some conditions road vehicles can drive through each other. Needless to say, this would not be a small task :)
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: Oneway road only using one side of road.

Post by Eddi »

Deepsmeg wrote:At the risk of getting shot down again, why can't the vehicle code detect that the vehicle in front which is broken down is going slowe rthan it and overtake based off of that?
If the 70mph van can see the 56mph lorry ahead and decide "That's 56mph. I'm 70mph. I'm faster. Overtake.", why not go "That's 0mph. I'm 70mph. I'm faster. Overtake."
that's what vehicles already do, but there are more conditions:
  • there must be less than 3 vehicles [only me and the slower vehicle] around. this means articulated vehicles (that consist of 2 or more vehicles already) can never overtake or be overtaken.
  • there may be no crossings, curves or stations nearby
  • cannot be on a bridge
additionally, articulated vehicles cannot overtake, because there is no code to handle the following vehicle parts, only the front vehicle would overtake, and disconnect from the rest of the vehicle (which would crash the game).
Lockwood
Engineer
Engineer
Posts: 57
Joined: 14 Aug 2005 17:24

Re: Oneway road only using one side of road.

Post by Lockwood »

The gold standard would be having it recognise dual carriageways that have been made and having overtake based rules that'd allow a 70mph vehicle to pass a convoy of 56mph lorries
Why is overtaking not allowed on a bridge? Is that due to virtual road/portal stuff like tunnels?

For a potential quick win:
Can the 3 vehicle rule change?

Am I articulated (Am I more than 1 vehicle?)?
Yes, do not overtake.
No.
Am I on a 2way road?
Yes, usual behaviour.
No.
Look ahead. Would I have room to complete this overtake before hitting a junction,corner,L/C,station,etc?
Yes, overtake.
No, stay behind.
User avatar
Simons Mith
Transport Coordinator
Transport Coordinator
Posts: 326
Joined: 14 Jan 2010 23:45

Re: Oneway road only using one side of road.

Post by Simons Mith »

How would the system behave if an RV breakdown set the vehicle's maximum speed and power to 1mph and 1hp for a short time rather than zero? (A bit like some of the advanced train breakdown mods I've seen.) Such a vehicle would presumably crawl along at an imperceptible pace for a few days, then recover, but because it hasn't 'broken down', merely suddenly become very very slow, maybe the game engine could cope with overtaking?
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Oneway road only using one side of road.

Post by Zuu »

Terkhen wrote:The road vehicle movement code could be changed to do that. It just need someone that is willing to rework the whole thing (right now it is very confusing) taking into account all possible corner cases and other missing stuff. For example, right now under some conditions road vehicles can drive through each other. Needless to say, this would not be a small task :)
I once took a look on this. Started with bridges code only to realize that vehicles can't overtake at all on bridges at all. ^^ And somewhere then I found something else to occupy my time with.

Edit: "took a look" = started to code on what might could have turned out as a solution, but for obvious reasons mentioned above, I couldn't get it to work :-p
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Saibot
Chairman
Chairman
Posts: 829
Joined: 19 Feb 2006 15:42
Location: Sweden

Re: Oneway road only using one side of road.

Post by Saibot »

Eddi wrote:
  • there may be no crossings, curves or stations nearby
  • cannot be on a bridge
Now I'm using a nightly build, so I don't know where this would've been implemented or if it's a bug of some sort but I swear I've seen my RVs use the left lane to overtake both on bridges and in corners, and I also remember that it stayed in the left lane all the way until the bridge ended for some reason (the bridge was much longer then needed to overtake).
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: Oneway road only using one side of road.

Post by Eddi »

indeed they do that, if they started the overtaking before the bridge, they continue on it
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 17 guests