Page 2 of 2

Re: How-to: Two-way rails

Posted: Mon Mar 26, 2018 10:48 am
by dood
impetus maximus wrote:especially early on when resources are scarce
The only times I've had iron scarcity on that kind of level happen was when I was a beginner and never built rails because I didn't understand them and what are trains good for anyway when I have belts etc.
The solution is to plan ahead and make a move to secure more resources early.

Re: How-to: Two-way rails

Posted: Tue Jun 19, 2018 6:47 pm
by adam_bise
I use a two way system with branches and one gargantuan loop, but that is just how I like to play. I spend a lot of time just trying stuff out or exploring for huge patches, my productivity certainly isn't anywhere near some of the bases I've seen on this forum.

I prefer to have smaller bases, more of them, much farther apart, and loooong trains moving a ton of items at once. Also, my bases are not connected via electricity and so the longer trains aren't derailed by behemoth biters =)

Re: How-to: Two-way rails

Posted: Wed Sep 01, 2021 8:14 pm
by thorr18
I love this old post. Everywhere else I looked, people seem to presume 1-way rail is the only way or scoff at the mention of 2-way rails. With the help of this guide, I got my broken factory off the ground and won the game using all 2-way rails (with 7-car passing lanes sprinkled throughout based on your "four-car split" ). For me, two-way is the only way!

Re: How-to: Two-way rails

Posted: Thu Mar 10, 2022 7:27 am
by peternlewis
Great post, still highly relevant.

I tend to use two lane, one way rails around my base and for nearby initial outposts, and nearby initial resource patches. In the last game I played, I expanded the main bus of the rail system to four lanes (two each way) to enhance throughput in that area.

Then I will often use one or more large one way loops to access further resources, with ore patches being short one way loops off the main loop, which also allows room for buffering trains.

Re: How-to: Two-way rails

Posted: Thu Mar 10, 2022 1:14 pm
by BlueTemplar
Two-way rails are probably going to need "double signals" in order to fix issues due to lack of automatic re-pathing :
[0.17.66] Trains waiting at regular signals do not try to Repath every X seconds ?
viewtopic.php?f=23&t=75140
Image
(Green train won't re-path.)
Image
(Supposed) solution :
Image

Re: How-to: Two-way rails

Posted: Fri Mar 11, 2022 3:59 am
by Tallywort
I kind of have to disagree on that, even when using two way tracks that scenario seems rather rare and unlikely. And even if it does occur, it isn't too bad to have a train take a longer route or path to further station once in a while.

Re: How-to: Two-way rails

Posted: Fri Mar 11, 2022 12:08 pm
by BlueTemplar
I reported it because it happened to me. In a vanilla game (Death World + Marathon) where (IIRC) I wasn't even at yellow science yet.

Also, you don't seem to understand the issue ? Which is that the train(s) do NOT take the longer route, but get stuck instead, potentially forever.

Re: How-to: Two-way rails

Posted: Fri Mar 11, 2022 1:24 pm
by robot256
Repathing is not allowed to change direction after the train leaves a station. The devs have said before this will not be changed, for performance reasons.

Re: How-to: Two-way rails

Posted: Sat Jun 25, 2022 12:50 pm
by aaargha
BlueTemplar wrote:
Fri Mar 11, 2022 12:08 pm
I reported it because it happened to me. In a vanilla game (Death World + Marathon) where (IIRC) I wasn't even at yellow science yet.

Also, you don't seem to understand the issue ? Which is that the train(s) do NOT take the longer route, but get stuck instead, potentially forever.
That is a pretty interesting bug report, BlueTemplar. I did some additional testing and the trains only get stuck if they are waiting at a rail signal, for chain signals the train will happily switch direction after waiting about 5 seconds. While this kind of feels like a bug I can understand the rationale of having the train run the pathfinder again for chain signals but not for rail signals (the former usually have multiple paths while the latter usually don't, except for bidirectional trains & rails)

Attached is a save file where I recreated the setup from you bug report (the save is too old to load in current 1.1.61), just remove the train limit on the train stop to the right and the train will switch direction and go there, if I used rail signals the train remains stuck. The setup on the left is a simple example of switching directions, just send the train going and you'll see how it works.

That said, the situation you're showcasing is something you'll only run into when not following the rules outlined in the guide, specifically the first part:
The only signals you are allowed to place on two-way tracks are chain signals.
Following the rule will prevent the issue in two ways: 1) trains should never stop in the kind of place where this would be an issue; 2) chain signals allow the train to switch direction.

Please do get back to me though if you have any examples where my analysis does not hold.

Re: How-to: Two-way rails

Posted: Sat Jun 25, 2022 12:53 pm
by aaargha
robot256 wrote:
Fri Mar 11, 2022 1:24 pm
Repathing is not allowed to change direction after the train leaves a station. The devs have said before this will not be changed, for performance reasons.
While they may have said so (or some version of it) it is not true, see counterexample in the post above.

Re: How-to: Two-way rails

Posted: Mon Aug 29, 2022 9:35 am
by mrvn
While it might be true that trains can change direction on a chain signal but not on a full signal isn't that all besides the point?

The train setup in the example above is totally flawed. A two-way rail must only contain chain signals except for where it exits into a one-way rail. All the signals in that big loop should be chain signals and then the green train would not get stuck and would have driven the other way from the start.

So I consider this a none issue since it only affects train setups that are flawed.