Page 1 of 1

Railway Safety Crossing

Posted: Thu Nov 23, 2017 2:03 am
by SuicideJunkie
I wasn't sure if this should be under combinators or railways, but I feel the railway connection is stronger.

For those who have already gotten the achievement and are tired of being pasted by your trains:
A safety gate with flashing red lights.
Ding! Ding! Ding! Ding!
Ding! Ding! Ding! Ding!
SafetyCrossingA.gif (272.46 KiB) Viewed 16039 times
The outer gates register your intent to cross the tracks, and will close a signal further up the track to prevent a train from mashing you into paste if you dawdle.
In the event of a train being already past the point of no return, the inner gates will close and prevent you from stepping out in front of it.

If you step out at exactly the wrong time, the inner gates will prevent you from entering for a second or two, but once it knows the oncoming train is able to stop in time, they will open for you.
This is perfectly safe?!
This is perfectly safe?!
SafetyCrossingB.gif (206.38 KiB) Viewed 16039 times
Blueprint String

Re: Railway Safety Crossing

Posted: Thu Nov 23, 2017 3:40 am
by eradicator
I've had similar constructs in an older base. The most difficult thing to get right was always to not trap the player on the rails when the train comes :P. My crossings default to open gates btw, and only close when the train comes, as i was annoyed by constantly ramming into the gate when walking too fast.

Two versions of the one-lane crossing:
Compact
And a larger one for four lanes, which has lamp indicator about which track the train is coming from (note that the sceenshot is only for demonstration, you couldn't actually get to the middle of the track with red lights on):
Multi

Re: Railway Safety Crossing

Posted: Thu Nov 23, 2017 12:07 pm
by mrvn
Now make it save for cars.

Main problem is that with a car you will run into the closed gate and cause damage. There isn't enough time to slow down when you see the gate closed or it might close at the last second.

I envision something with the outer gates further out and red (blue) belts going away from the inner gate and only active when the gate is closed. So when the gate is closed the belts will slow you way down and prevent you from hitting the gate.

PS: are the inner gates fast enough so a person with exosceletons can't run past the gates while the inner gates are closing and get hit by a train?

Re: Railway Safety Crossing

Posted: Thu Nov 23, 2017 7:47 pm
by eradicator
For unmodded exoskeletons gates should be fast enough. I tested that alot. For modded ones or cars i see no way of making it completely save once you are "too fast". Blue belts barely slow down cars (just tested) so that's not going to work either. Cars are also not detected until they're about ~8ish tiles away from a gate regardless of speed, so the only way to have "early warning" signals for the car driver would be on a straight track where you can detect the train very early. So the car driver would have to stop when they see the yellow light despite the gates still being open. Just like IRL.

Why are you driving through a train crossing at full speed anyway, did you not see the STOP signs ;P?

Re: Railway Safety Crossing

Posted: Thu Nov 23, 2017 11:39 pm
by SuicideJunkie
eradicator wrote:I've had similar constructs in an older base. The most difficult thing to get right was always to not trap the player on the rails when the train comes :P. My crossings default to open gates btw, and only close when the train comes, as i was annoyed by constantly ramming into the gate when walking too fast.
This crossing has open inner gates by default. They only close when a train is approaching, but close on yellow/amber. The outer gates are read-only, so they are never an obstacle.

When the outer gates are active, trains are instructed to halt. If they can't halt in time, the inner gates will already be closed so you can't get on the tracks.
This is overly sensitive to the trains, so sometimes a train that has locked the gate will actually be able to stop, and the inner gates will open for you after it does.

I'm sure you could break the system by placing other signals too close to the gate, but you shouldn't do that.

Re: Railway Safety Crossing

Posted: Sun Nov 26, 2017 11:52 pm
by mrvn
That's why the outer gate needs to be further away so it detects the car when it is still "breaking-distance" away from the inner gate. Once the car is too near the tracks to stop the inner gate must not close.

Re: Railway Safety Crossing

Posted: Mon Feb 19, 2018 1:10 am
by DunningsWarehouse
Your name seems oddly inappropriate in this instance...

Re: Railway Safety Crossing

Posted: Tue Mar 13, 2018 4:01 pm
by eldzee
First attempt at making crossing, which also blocks you from entering the train track itself.
The track is bi-directional capable
factorio-rail-crossing.gif
factorio-rail-crossing.gif (2.27 MiB) Viewed 14563 times

Code: Select all

0eNrlWtFu2jAU/Rc/hyq2QwJI28se+t4+ThMK4FJLwYkcpx2q8gH7i33bvmR2aCEYO7EhHRJ7qRoSrn3O8fW9PuENLLKKFJwyAWZvgC5zVoLZ9zdQ0jVLM/WZ2BYEzAAVZAMCwNKNuuIpzUAdAMpW5CeYwTro/cqKLOmK8NEy3ywoS0XOWwFQ/SMAhAkqKNlNoLnYzlm1WRAuR9jHKTdplo2ydFPI2EVeyq/kTI0qw4yiu3EAtvIfdDeW0SUcwfNsviDP6QuVI8rHlpQvKyrm8t5q/90nyksxP0HwQrmo5Ce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