Crossroads (roads and trains)

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

mijack
Engineer
Engineer
Posts: 79
Joined: 20 Jul 2004 06:24
Location: Switzerland
Contact:

Crossroads (roads and trains)

Post by mijack »

Hello,

I remember on the old TTDX it was extremely dangerous to build a train crossing a road, because you could be sure there would be a crash someday. Is this better managed in OpenTTD ? Can I dare building some trains crossing roads ? 8)
User avatar
Ailure
Route Supervisor
Route Supervisor
Posts: 435
Joined: 26 Apr 2005 19:06
Location: Sweden

Re: Crossroads (roads and trains)

Post by Ailure »

I'm afraid same thing holds true for openTTD. Bit of a shame too, even if it's probably possible to predetermine when a train will pass a crossroad to prevent a crash... although most people just over or under the rail instead of using crossroads. :/
mijack
Engineer
Engineer
Posts: 79
Joined: 20 Jul 2004 06:24
Location: Switzerland
Contact:

Re: Crossroads (roads and trains)

Post by mijack »

Ok, thanks :cry:
I guess this is quite annoying and maybe it would be a good improvement for the next releases
Andreander
Engineer
Engineer
Posts: 24
Joined: 27 Jun 2007 16:23
Location: Evil Lair, Norway

Re: Crossroads (roads and trains)

Post by Andreander »

Learn from the AI (even if it failed once, it still managed to make it right oh so many times)
Attachments
Kristiansand Transport, 7. Okt 2020.png
Kristiansand Transport, 7. Okt 2020.png (36.6 KiB) Viewed 10790 times
We're all scared. You hid in that ditch because you think there's still hope. The only hope you have is to accept the fact that you're already dead. And the sooner you accept that, the sooner you'll be able to function as a soldier is supposed to function. Without mercy. Without compassion. Without remorse. All war depends on it

- Captain Ronald Speirs E CO 2nd BATL 506th REG 101st airborne div 8th core 1st ARMY
mijack
Engineer
Engineer
Posts: 79
Joined: 20 Jul 2004 06:24
Location: Switzerland
Contact:

Re: Crossroads (roads and trains)

Post by mijack »

:bow: AI

Would it be difficult to code that there is no crash between road vehicles and trains ? I think it's working this way in Locomotion.
User avatar
White Rabbit
Tycoon
Tycoon
Posts: 1734
Joined: 22 Jun 2005 19:15

Re: Crossroads (roads and trains)

Post by White Rabbit »

mijack wrote:Hello,

I remember on the old TTDX it was extremely dangerous to build a train crossing a road, because you could be sure there would be a crash someday. Is this better managed in OpenTTD ? Can I dare building some trains crossing roads ? 8)
No, because trains still only trigger the closing of a crossing when they're about half a tile away from it. The idea is to trigger it depending on the top speed of the train, so road vehicles will have a chance.
Would it be difficult to code that there is no crash between road vehicles and trains ? I think it's working this way in Locomotion.
That's a TTDP feature. I don't think it will be included in OTTD because it's not a very realistic way of solving the problem.
Image
Melfice
Transport Coordinator
Transport Coordinator
Posts: 305
Joined: 20 Apr 2006 19:11
Location: Oldenzaal, the Netherlands, gateway to Germany

Re: Crossroads (roads and trains)

Post by Melfice »

Indeed.
If one could only increase the distance of the trigger to the crossing, it would be much better.
Or perhaps have the trains carry a trigger some tiles in front of it and the crossroads having some sort of code that recognizes the trigger.

Every train can have the trigger at a different point, relative to their speed, and such.
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Re: Crossroads (roads and trains)

Post by CMircea »

Why not put the distance 2 tiles and disable maglev & monorail crossings. They're way too unrealistic (how can you cross a maglev rail?).
User avatar
White Rabbit
Tycoon
Tycoon
Posts: 1734
Joined: 22 Jun 2005 19:15

Re: Crossroads (roads and trains)

Post by White Rabbit »

Desolator wrote:Why not put the distance 2 tiles and disable maglev & monorail crossings. They're way too unrealistic (how can you cross a maglev rail?).
2 tiles is not enough for high-speed trains. Some train sets have 200mph+ conventional locomotives. Well, actually, I only know of one, but even 125mph is a bit too fast for 2 tiles.
Image
Mchl
Director
Director
Posts: 611
Joined: 05 Jan 2007 15:50
Location: Poland
Contact:

Re: Crossroads (roads and trains)

Post by Mchl »

Desolator wrote:Why not put the distance 2 tiles and disable maglev & monorail crossings. They're way too unrealistic (how can you cross a maglev rail?).
Then, how do you convert conventional rail with crossings to monorail/maglev track without crossings?
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: Crossroads (roads and trains)

Post by AndersI »

Melfice wrote:If one could only increase the distance of the trigger to the crossing, it would be much better.
In TTDPatch (not OTTD) you can do this with the help of PBS signals - a crossing inside an PBS block will activate as soon as the train passes the signal, so you can get any distance you want. One more reason for wanting PBS in OTTD.
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Crossroads (roads and trains)

Post by Bilbo »

AndersI wrote:
Melfice wrote:If one could only increase the distance of the trigger to the crossing, it would be much better.
In TTDPatch (not OTTD) you can do this with the help of PBS signals - a crossing inside an PBS block will activate as soon as the train passes the signal, so you can get any distance you want. One more reason for wanting PBS in OTTD.
But if the tracks over road are build by opponent and he does not care/does not know about PBS (like by AI :) ... it will not help anyway ... your buses will still be crushed
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
bennon
Engineer
Engineer
Posts: 21
Joined: 14 Jul 2007 17:08
Location: Tamworth,staffs,United Kingdom

Re: Crossroads (roads and trains)

Post by bennon »

dont try it because ive got ottd and in 5 years i had 20 acidents :shock: :shock:
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1357
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Re: Crossroads (roads and trains)

Post by MagicBuzz »

Melfice wrote:Indeed.
If one could only increase the distance of the trigger to the crossing, it would be much better.
Or perhaps have the trains carry a trigger some tiles in front of it and the crossroads having some sort of code that recognizes the trigger.

Every train can have the trigger at a different point, relative to their speed, and such.
When PBS will be coded in YAPF, you have a chance someone does it.

The big problem with this feature is that you must know the train will actually cross the road:
- What about a station 1 tile before the road ? All high speed trains will block the cross roads during loading at station
- What about a rail cross right before the cross road ? We can't say if the train will actually cross the road or not

Because of this, we need the PBS option enabled, so we will get an easy way to figure where the train will actually go in advance.

The last problem is about multiple cross roads on the same road : a vehicule mustn't cross the railway if the second roadcross is blocked, or the vehicule will be stuck. With this, the cross road must close earlier, according the time the vehicule will cross the first road, and compare this with the train speed. All that I can say is that this patch needs a lot of work to works.

Don't forget with OTTD you have now "build on slopes" and "build briges over many things" features helps a lot designing briges instead of crossways ;)
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Crossroads (roads and trains)

Post by Bilbo »

MagicBuzz wrote:
Melfice wrote:Indeed.
If one could only increase the distance of the trigger to the crossing, it would be much better.
Or perhaps have the trains carry a trigger some tiles in front of it and the crossroads having some sort of code that recognizes the trigger.

Every train can have the trigger at a different point, relative to their speed, and such.
When PBS will be coded in YAPF, you have a chance someone does it.

The big problem with this feature is that you must know the train will actually cross the road:
- What about a station 1 tile before the road ? All high speed trains will block the cross roads during loading at station
- What about a rail cross right before the cross road ? We can't say if the train will actually cross the road or not

Because of this, we need the PBS option enabled, so we will get an easy way to figure where the train will actually go in advance.

The last problem is about multiple cross roads on the same road : a vehicule mustn't cross the railway if the second roadcross is blocked, or the vehicule will be stuck. With this, the cross road must close earlier, according the time the vehicule will cross the first road, and compare this with the train speed. All that I can say is that this patch needs a lot of work to works.

Don't forget with OTTD you have now "build on slopes" and "build briges over many things" features helps a lot designing briges instead of crossways ;)
Maybe change handling of the buses so they won't go on the crossing if the path after the crossing is blocked

In the attached example, second bus driver should stop before the crossing, even when red lights are not flashing, as he is unable to safely continue (actually, I found that second bus can, starting to overtake the first bus, but in the second picture, third bus stops on the crossing ... and disaster is then unevitable....

This won't ultimately fix it, but with current situation I think it will help considerably when there are more crossings near others or near station with common queues and if the crossings will be fixed to flash early enough, I think this will be the last difference between few crashes and almost none :)
Attachments
Before getting stuck
Before getting stuck
bus-before.png (7 KiB) Viewed 10175 times
After getting stuck. Last bus shouldnt get on the crossing, as there is not enough space to continue.
After getting stuck. Last bus shouldnt get on the crossing, as there is not enough space to continue.
bus-after.png (6.77 KiB) Viewed 10169 times
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Re: Crossroads (roads and trains)

Post by CMircea »

Mchl wrote:
Desolator wrote:Why not put the distance 2 tiles and disable maglev & monorail crossings. They're way too unrealistic (how can you cross a maglev rail?).
Then, how do you convert conventional rail with crossings to monorail/maglev track without crossings?
You don't.
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Crossroads (roads and trains)

Post by Bilbo »

Desolator wrote:
Mchl wrote:
Desolator wrote:Why not put the distance 2 tiles and disable maglev & monorail crossings. They're way too unrealistic (how can you cross a maglev rail?).
Then, how do you convert conventional rail with crossings to monorail/maglev track without crossings?
You don't.
This would be "dangerous", as some competitor may block converting (even unintentinally) parts of your rail to maglev/monorail. Adn usual recipes like "send all trains to depot, convert entire network, create new trains" will not work, you'll have to handle many of these crossings manually.

Nope. Not a good idea to forbid these crossings, even if they are unrealistic.
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
PPT
Engineer
Engineer
Posts: 109
Joined: 31 May 2007 07:25

Re: Crossroads (roads and trains)

Post by PPT »

There are accidents at crossings in the real world. Why should the game be immune?

As in real life, if you want the crossing to be 100% safe, use a bridge or tunnel and accept the cost.
User avatar
White Rabbit
Tycoon
Tycoon
Posts: 1734
Joined: 22 Jun 2005 19:15

Re: Crossroads (roads and trains)

Post by White Rabbit »

Monorail and maglev tracks/stations should just be elevated to a height of two foundations, one foundation being the height a track built on a slope. Plus, it would look so cool to have those tracks run through the cities. :o
PPT wrote:There are accidents at crossings in the real world. Why should the game be immune?

As in real life, if you want the crossing to be 100% safe, use a bridge or tunnel and accept the cost.
Because no accident ever happened because the crossing was only closed when the 100mph train was 30m from the road, and the driver was stupid enough to cross it when the train was clearly visible.

IRL, nothing will happen provided everything works as they should, and the driver heeds the warning, but in TTD, a RV is almost guaranteed to be smashed to smithereens. The game is already immune, after all, to train accidents. Signals always work, trains never fail to stop at appropriate times, etc. The only way to cause a crash is telling trains to ignore signals, or remove a red signal.
Image
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1357
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Re: Crossroads (roads and trains)

Post by MagicBuzz »

PPT wrote:There are accidents at crossings in the real world. Why should the game be immune?

As in real life, if you want the crossing to be 100% safe, use a bridge or tunnel and accept the cost.
The game should not be immune about crossing problems, but it should be improved.

Right now, in the early ages, espacially when playing with some sets (UKRS by exemple), you have trains that run at 152 km/h but buses that run only at 32 km/h : they don't have any chance to cross safety.

I'm ok the crossing system must keep raising some vehicules crash, but currently it's just like if the crossroads were not protected at all.
In realy life, most of the crossroad problems comes with vehicules that enter a crossroad while it was blinking.

To reproduce this, we can handle the crossroad fires with current train speed instead of max speed : by this way, it the train is currently accelerating, there's a chance the truck entered the crossroad but did not have enought time to cross.

But in any case, crossroads must be lighted sooner with high speed trains/low speed trucks, and any crossroad that is beside a blocked crossroad should be blocked as real, just like real life.

But as I said, to do this, we need some PF framework that allow us to check the current heading of the vehicules when checking for crossroads. Currently it's quite impossible to improve it without actually knowing the real path of the train.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 5 guests