How to prevent road collisions?

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

dgrin91
Engineer
Engineer
Posts: 14
Joined: 23 May 2013 01:19

How to prevent road collisions?

Post by dgrin91 »

I have two tracks going over a road on a flat surface with a lot of traffic on the rails and on the road. Every once in a while I get a collision, but Im not sure how to fix this. I have one way path signals on both tracks right before the corssing, but that doesnt seem to do any good. Is there anything more I can do?
User avatar
Jacko
Tycoon
Tycoon
Posts: 2386
Joined: 13 May 2011 17:11
Location: In an alternate Universe

Re: How to prevent road collisions?

Post by Jacko »

road bridge.
sorted.
"O2 is for noobs, real people breath O3" ~ said sometime by Me

All comments from me may or may not be true and do not take them word-for-word

Feel Free to join me and some other people in The Nations Game - its actually quite fun.

1000th Post at Wed Feb 08, 2012 8:43 am
2000th post at Sun Apr 14, 2013 10:22 am
dgrin91
Engineer
Engineer
Posts: 14
Joined: 23 May 2013 01:19

Re: How to prevent road collisions?

Post by dgrin91 »

So there is no way to safely cross a railroad track without a bridge/tunnel? That would suck and not be very realistic...
User avatar
FLHerne
Tycoon
Tycoon
Posts: 1543
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: How to prevent road collisions?

Post by FLHerne »

You can make it safer by adding a path signal to the railway several tiles before the crossing (and then no other signals before the crossing). The train will reserve a path across the crossing when passing the signal, and no further vehicles will enter the crossing.

There are still several issues with that:
- If the train is fast, or the road vehicles are slow, the signal must be a long distance from the crossing to allow vehicles time to leave it.
- If there is a queue of road vehicles or a broken down vehicle across the crossing, the vehicles will be unable to leave and be splattered.
- If there are parallel tracks, vehicles waiting for the 'far' crossing will be trapped on the nearer railway line.

In general, bridges are easier, and work better... :wink:
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: How to prevent road collisions?

Post by Alberth »

dgrin91 wrote:So there is no way to safely cross a railroad track without a bridge/tunnel? That would suck and not be very realistic...
Sure there is, don't drive trains at tracks with crossings! :D

As for realism, there is already a perfect implementation of reality, we don't need another one.
User avatar
Pyoro
Tycoon
Tycoon
Posts: 2566
Joined: 17 Oct 2008 12:17
Location: Virgo Supercluster

Re: How to prevent road collisions?

Post by Pyoro »

Actually, occasional crashes are realistic, I'd rather say that they don't offer anything for gameplay except annoyance on huge road-rail-networks ^^

Anyways, there's also an old "close adjacent crossings" patch which improves some specific situations a little, I'd say. Hard to say whether it's a statistically relevant effect or not, but looks a bit better in any case ;)
dgrin91
Engineer
Engineer
Posts: 14
Joined: 23 May 2013 01:19

Re: How to prevent road collisions?

Post by dgrin91 »

You cant really call the road accidents realistic, but the perfect signals that never malfunction over 100 years also realistic. If you want to add noise to the system, that is fine (ie plane crashes), but this isnt noise, its something that was overlooked. Its not a huge issue because of bridges (unless the town starts to get pissy), but it doesnt flow with the rest of the game.
User avatar
FLHerne
Tycoon
Tycoon
Posts: 1543
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: How to prevent road collisions?

Post by FLHerne »

dgrin91 wrote:this isnt noise, its something that was overlooked
Well no - if it was overlooked they'd just pass straight through each other (see road vehicles turning across another lane, or trains passing through themselves on weird track formations). That they collide means that someone wrote code to check for and handle collisions, and that therefore someone thought it would be a good idea (it is).
dgrin91 wrote:that is fine (ie plane crashes)
Plane crashes on suitable airports are very rare, much as crashes with uncongested roads on single-track rail lines, with path signals protecting the crossing, are very rare. Put large aircraft on a small airport, and you suddenly get an unacceptable rate of crashes. Put a frequently-used road crossing on a busy railway, and you suddenly get an unacceptable rate of crashes.

It's all about recognising when you've made your network unsafe, and upgrading it so it isn't (building a larger airport or a bridge respectively).
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: How to prevent road collisions?

Post by Eddi »

Not every justification or the existence workaround make a good feature...

there also is now an option to disable random crashes at airports...
dgrin91
Engineer
Engineer
Posts: 14
Joined: 23 May 2013 01:19

Re: How to prevent road collisions?

Post by dgrin91 »

That they collide means that someone wrote code to check for and handle collisions, and that therefore someone thought it would be a good idea (it is).
Collision checking code does not mean it wasnt overlooked. Now I havent looked through the code, but from basic coding principles I would guess that if a bus randomly spawns in the middle of the train track, and then a train drives into that area, a collision would be detected. Thats still an overlook though, because how the heck did that bus get there? Bottom line, the collision checking system was (correctly) not designed specifically with road crossings in mind, so the fact that there is something overlooked in some derivative of the system is very reasonable.

Now my problem with the road collisions is that, unlike virtually everything else in the game, you cant do anything about it. Trains collide? fix/add more signals. Significant train/road congestion? add more tracks/roads. Not moving cargo fast enough? add more vehicles. Planes crashing a lot? upgrade your airport. The only partial exception is the planes, and that is only because of random noise.

The road collisions are not noise though. It is feasible (though highly impractical... and stupid) to set up a system where it will occur 100% of the time. Now thats ok. What is not ok is that there is no direct action you can take against this (only indirect, such as building a bridge/tunnel). I think there should be some sort of signal system like with trains that should be available (and ideally automatically generated, maybe even hidden).
User avatar
kamnet
Moderator
Moderator
Posts: 8705
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: How to prevent road collisions?

Post by kamnet »

There is a signal system already. As was pointed out earlier, place a path-based signal some distance ahead of your level crossing. The faster the train, the further ahead you'll need to place it, but once the train passes the signal, it will reserve the path across the road and stop vehicles from crossing until after it has passed.
User avatar
Pyoro
Tycoon
Tycoon
Posts: 2566
Joined: 17 Oct 2008 12:17
Location: Virgo Supercluster

Re: How to prevent road collisions?

Post by Pyoro »

That'll imo only definitely work for single-line tracks. With dual (or more) tracks you'll always get road vehicles randomly killed. There's also issues with traffic jams; road vehicles apparently don't check whether there's any space to drive off the track, which isn't a very clever thing to do ;)
dgrin91
Engineer
Engineer
Posts: 14
Joined: 23 May 2013 01:19

Re: How to prevent road collisions?

Post by dgrin91 »

Pyoro wrote:That'll imo only definitely work for single-line tracks. With dual (or more) tracks you'll always get road vehicles randomly killed. There's also issues with traffic jams; road vehicles apparently don't check whether there's any space to drive off the track, which isn't a very clever thing to do ;)
Exactly my problem.
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: How to prevent road collisions?

Post by SirkoZ »

For multiple tracks situations, the best solution is a bridge or a tunnel otherwise even with programmable signals things would get too complicated as there would always be one vehicle stuck somewhere between crossings waiting to be squashed another day... :lol:
get3
Engineer
Engineer
Posts: 1
Joined: 28 May 2013 17:02

Re: How to prevent road collisions?

Post by get3 »

What is realistic about EVERY vehicle stopping on the crossing... in real life you stop before/after the crossing but not on it. There should be a LOW chance that you have a stupid driver looking to get killed by stopping on the track, otherwise unless the vehicle is broken down there should never be a vehicle stopped on the track. My love for trains has caused me to pay attention and in most double+ track crossing there is one signal for both sets of track. For in the double track case (which i use) each direction only activates it's signal but not the other direction although they are side-by-side. So either crossings side-by-side need to have one road warning set or prevent vehicles from stopping on the tracks.
User avatar
YNM
Tycoon
Tycoon
Posts: 3574
Joined: 22 Mar 2012 11:10
Location: West Java

Re: How to prevent road collisions?

Post by YNM »

There's a patch that makes adjacent crossings also stops. Anybody interested ?
get3 wrote:In real life you stop before/after the crossing but not on it.
Depends - if its going to happen, it'll happen.
YNM = yoursNotMine - Don't get it ?
「ヨーッスノットマイン」もと申します。
User avatar
siu238X
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 13 Sep 2004 18:54
Location: Hong Kong, China

Re: How to prevent road collisions?

Post by siu238X »

To me, the only thing "unrealistic" in this setup is that, on multiple tracks (usually 2), whenever any ONE track is going to be occupied, the whole crossing should be closed to Road Vehicles. But in (O)TT(D) this is not the case.

Surely, getting this bit realistic wouldn't eliminate all crashes, and it IS realistic that local authorities everywhere seek to avoid level crossing whenever possible. So I am afraid that dgrin doesn't have much choice but to find somewhere to build a bridge or tunnel...
Image
Image
User avatar
YNM
Tycoon
Tycoon
Posts: 3574
Joined: 22 Mar 2012 11:10
Location: West Java

Re: How to prevent road collisions?

Post by YNM »

siu238X wrote:To me, the only thing "unrealistic" in this setup is that, on multiple tracks (usually 2), whenever any ONE track is going to be occupied, the whole crossing should be closed to Road Vehicles. But in (O)TT(D) this is not the case.
I already said there's a patch for this...
YNM = yoursNotMine - Don't get it ?
「ヨーッスノットマイン」もと申します。
User avatar
Pyoro
Tycoon
Tycoon
Posts: 2566
Joined: 17 Oct 2008 12:17
Location: Virgo Supercluster

Re: How to prevent road collisions?

Post by Pyoro »

How difficult would it be to just "turn off" road collisions? Could I just comment out the check for whether train and road vehicle have collided or something, perhaps? ^^;
michael blunck
Tycoon
Tycoon
Posts: 5954
Joined: 27 Apr 2005 07:09
Contact:

Re: How to prevent road collisions?

Post by michael blunck »

get3 wrote: ... in real life you stop before/after the crossing but not on it.
Hoho.

Nevertheless, there might be a certain aesthetics in car crashes.
Alberth wrote: As for realism, there is already a perfect implementation of reality, we don't need another one.
In "realistic reality" (tm) level crossings are progressively exchanged by tunnels or bridges.

regards
Michael
Image
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest