Factorio

Factorio

View Stats:
I think train priority needs some work.
In preparation for 0.15, I'm experimenting with ideas for 4-lane train intersections. I built 4 stops, named N, E, S, and W. Built a bunch of trains, some of them are going N-E-N-E, some go E-W-E-W, some go N-E-W-N-E-W, and so on. Just so I'd have a lot of traffic going all directions, enough to create a real bottleneck at the crossing. Then I tried various intersection designs in the middle to see what works best.

Now, every intersection, regardless of type, must stop some trains while others pass. That's obvious. But as I sit there watching the trains go through intersections, I noticed something weird: Some trains seem to have a higher priority than others. I watch one train sit there waiting its turn for almost 10 minutes, while all the other trains go through first. I made the locos different colors to keep track of them, and watched some go around the loop several times while others don't move.

I'm not sure exactly how trains are programmed in the game, but it seems like it should be a relatively easy task to give priority to whichever train has been sitting the longest. Something like "these 3 trains all want to path through this section, give it to whichever one's not-moving time is the longest".

EDIT: And before you ask, yes I know how to use chain/regular signals and all that. I'm not a noob, I have over 1500 hours and about the last 6 of those hours are experiments on this. This isn't a "what am I doing wrong" type of thread, it's more a "Something in the way the game works isn't optimal, and there does not appear to be a way to solve it."
Last edited by The Chaotic Coder; Feb 20, 2017 @ 1:16am
< >
Showing 1-13 of 13 comments
Shurenai Feb 20, 2017 @ 1:23am 
Might be the cause of the system accounting for movement/travel speed, and giving it a bigger priority... Basically preferring to keep the moving trains moving, than to stop a moving train to let a stopped one go. If your setup had a number of trains passing by one by one at regular intervals, the stopped train never sees the empty space in traffic to go out into. Kinda like trying to pull out into traffic from a side road, you don't want to pull out when its dangerous, which means you need enough space to get up to speed after getting out into traffic, and before the car behind you catches up.
!?! (Banned) Feb 20, 2017 @ 3:26am 
You need 4 lanes?
That's pretty impressive. I haven't reached the breaking point of 2 lanes yet during normal gameplay with over 70 trains and "eventually the train gets to its station" works well enough if it only drives once every 5 minutes but I guess that will change once you get some real traffic going.
How many trains do you have?
Cruiser Feb 20, 2017 @ 3:47am 
I have almost 30 trains running, about half of which share some junctions and stations, they seem to prioritise in order of arrival at the junctions, I had to experiment with the position of signals for the train leaving the station they are all heading for to get it to work. Most of my stations are in / out rather than on a loop.

If the devs do more work on the train system my one wish would be for signal gantries of various widths so that tracks could be laid closer together.
The Chaotic Coder Feb 20, 2017 @ 10:06am 
Originally posted by chris:
You need 4 lanes?
That's pretty impressive. I haven't reached the breaking point of 2 lanes yet during normal gameplay with over 70 trains and "eventually the train gets to its station" works well enough if it only drives once every 5 minutes but I guess that will change once you get some real traffic going.
How many trains do you have?

By 4 lanes I mean 2 going north and 2 going south.

It's not a real factory -- it'm just testing out ideas. I'm anticipating that level of traffic when I attempt to do 1 rocket a minute with modular factory outposts (this outpost smelts steel, this one makes circuits, etc.).

I currently have 24 trains, just going back and forth through the intersection so I can try out different arrangements.
!?! (Banned) Feb 20, 2017 @ 11:00am 
Originally posted by jchardin64:
Originally posted by chris:
You need 4 lanes?
That's pretty impressive. I haven't reached the breaking point of 2 lanes yet during normal gameplay with over 70 trains and "eventually the train gets to its station" works well enough if it only drives once every 5 minutes but I guess that will change once you get some real traffic going.
How many trains do you have?

By 4 lanes I mean 2 going north and 2 going south.

It's not a real factory -- it'm just testing out ideas. I'm anticipating that level of traffic when I attempt to do 1 rocket a minute with modular factory outposts (this outpost smelts steel, this one makes circuits, etc.).

I currently have 24 trains, just going back and forth through the intersection so I can try out different arrangements.
Oh I see.

That level of traffic will probably never happen in a real game then, if there's so many trains coming through that a train waits at a crossing for 2 minutes, the fact that they will all reach their destinations eventually should be good enough since they only drive once every ~5 minutes anyway unless they're oil trains or you decide to go ham on a biscuit with 200 1 sized trains.

The AI right now works pretty well with you never having to worry about things like decelleration no matter how complex you build your rails so I'm not sure adjusting crossing priority would be an easy thing to do at all.
It is the result of a ton of interlocking logic and the devs most likely never did something like sitting down deciding which train gets priority at a crossing since "crossing" is a pretty high level construct which everyone solves differently.

You need to reduce it to the low level of how trains path and handle their acceleration and how they interact with signals and chain signals, I wouldn't know what to change there because I don't really want a train that slowly accelerates, leaving a station to be more likely to stop a train driving down the main rails at full speed.
Last edited by !?!; Feb 20, 2017 @ 11:12am
impetus_maximus Feb 20, 2017 @ 3:50pm 
need a screen shot of your intersection please.
The Chaotic Coder Feb 20, 2017 @ 5:17pm 
Originally posted by impetus maximus:
need a screen shot of your intersection please.

This is what I'm currently working with:

http://steamcommunity.com/sharedfiles/filedetails/?id=868744555

Although I've noticed the phenomenon (with varying degrees of severity) with any design.
Last edited by The Chaotic Coder; Feb 20, 2017 @ 5:17pm
whiter2501 Feb 20, 2017 @ 5:40pm 
That is one nice looking crossing. Have you thought of having it so that no matter which rail a train is on it can get onto any other rail instead of just a few??
The Chaotic Coder Feb 20, 2017 @ 6:06pm 
Originally posted by whiter2501:
That is one nice looking crossing. Have you thought of having it so that no matter which rail a train is on it can get onto any other rail instead of just a few??

That's already the case. A train coming in from any direction can go around the roundabout to any of the other 7 directions (or even go back the same way) Keep in mind that 2 of the tracks going in any direction are "incoming" while 2 are "outgoing" (my trains drive on the left, like a highway in the UK)
impetus_maximus Feb 21, 2017 @ 3:52am 
thanks for the screenshot. just wanted to make sure you had signals between trains going oposite directions. i had to fix a bunch of crossing yesterday (not mine) that had none. trains were stoping for opposing trains. lol

i agree the logic needs some work. i beleve it's being revamped in 0.15. i don't use stackers because of this. i just use a long line. first in, first served.

i too use left side drive (i live in the US). it makes the signals neater. esp for circuit networks.
<off topic> you brits drive on the correct side of the road. now if you could just get the wheel on the correct side. lol
Last edited by impetus_maximus; Feb 21, 2017 @ 4:11am
The Chaotic Coder Feb 21, 2017 @ 8:14am 
Originally posted by impetus maximus:
i too use left side drive (i live in the US). it makes the signals neater. esp for circuit networks.
<off topic> you brits drive on the correct side of the road. now if you could just get the wheel on the correct side. lol

I live in the US too, but I put my trains on the left because I want the signals to be on the "inside" rather than sticking out. Just an aesthetic thing.
!?! (Banned) Feb 21, 2017 @ 8:49am 
Going not only 4 lanes but with diagonals too is pretty hardcore.
I want to see the end result of that.
The Chaotic Coder Feb 21, 2017 @ 8:54am 
Originally posted by chris:
Going not only 4 lanes but with diagonals too is pretty hardcore.
I want to see the end result of that.

Well, the end result of that is 6-8 trains waiting while only 1 or 2 go at a time.

I'm pretty sure I'm not every going to have a real intersection with that many tracks in/out. Probably the most I'll do is 4-lane, 4-way. I was just trying to see how many it would take to break the game.
< >
Showing 1-13 of 13 comments
Per page: 1530 50

Date Posted: Feb 20, 2017 @ 1:10am
Posts: 13