There are three types of signal in OpenTTD: block signals, pre-signals, and path signals. There are also two visual styles, semaphore and colour-light, but they are functionally equivalent. In the diagram below, block signals are in the yellow rectangle, pre-signals are in the blue rectangle, and path signals are in the pink rectangle.
First of all, ignore pre-signals. Pre-signals are not relevant to your life. They are mostly a historical relic from a time before path signals were added to the game. No doubt there are still some people out there putting pre-signals to good use, but I never fully understood them and it always seemed to me that even experienced players would still design systems which caused occasional crashes. Path signals are much simpler to understand and use. In fact, you can play an entire game of OpenTTD using nothing but path signals, but it’s also good to understand the basic, original type of signal (block signals) too.
Block signals are based on the real-life system of absolute block signalling. The idea is that track is divided up into sections (blocks) and only one train is allowed in each block at a time. In OpenTTD a block signal can work both ways or just one way. If the signal is one way, trains are not allowed to pass from behind, making the entire track section like a one-way street. This can be used to make double track sections.
To build a block signal, select one of the two types of block signal and click on the square where you want to place the signal. By default, it will be a bidirectional signal; to make it one-way, click on the same signal again, and again to make it face in the other direction. Once you’ve built one signal, you can click and drag from that square to make clones of that signal every few squares (you can adjust the distance in the bottom right corner of the Signal Selection window). You can use this to easily make ‘dual carriageway’-style double-track sections, which are very efficient and realistic.
You can also use bidirectional block signals to make a single-track line with passing places, for low-traffic lines.
But what do you do when you get to a station on a double-track line? The problem is: how do you make sure trains in both directions can use both platforms at a through station, and allow trains to turn around safely at terminal stations? More specifically: in this setup, what do you put in the space between the signals and the platform to allow this?
First of all, you need a crossing point so trains can access both platforms. Then you need some path signals!
There are two kinds of path signals: normal and one-way signals. Like one-way block signals, one-way block signals do not allow trains to pass from behind; but unlike block signals, path signals only have effect in one direction, and normal path signals have a ‘behind’ side which they can be passed from. Both allow you to setup blocks of track with complex junctions in them. Trains will pick a route through the junction, ‘reserve’ that section of track so no other train can pick it until it’s gone through, then proceed. The game will automatically route the trains to stop them from crashing in the junction, in other words. If that isn’t possible, the train will wait at the signal until there’s a clear route.
In order to set up a junction, the routes into the junction must be marked with path signals. The routes out can use normal block signals.
In this case, the junction is a rail crossing and there are three routes into it: two from the platforms, which should be controlled by signals allowing trains to enter the platform but not leave unless the junction is clear; and one from the mainline which should only allow trains to enter from the running direction. So we need normal path signals controlling exit from the platforms and a one-way path signal controlling entry to the junction from the mainline. And the exit from the junction into the mainline can just be controlled by a normal block signal.
The same ‘path signals for entrance, block signals for exit’ principle applies here for junctions, as shown in this simple fork. Note that at this junction trains can go from left to top and vice versa, but not from right to top. Making a true ‘basic three-way junction’ where trains can take any two of three routes is left as an exercise to the reader.
You can also add more path signals in the middle of a junction to allow space for trains to enter and exit particular sections, effectively creating an organized queue system, as I did in this quite complex combination of junction and station entrance in a real game (the tunnels lead into the station; there are path signal right at the exit of the platform, and more pre-signals after the exit of the tunnels — this means trains can wait somewhere where they’re not blocking platforms which could be used by trains coming from the other direction).
When a train decides it’s time for a service, it will just go to the nearest depot regardless of whether it’s actually on its route or not. This means that if you put a depot near a station in a one-way section, you can end up with a problem.
Here, trains arriving from the left which are due to terminate and reverse at this station will sometimes need to go for a service. They’ll go to the one at the top right, have their service, then leave the depot and find they can’t go back the way they came because of the one-way signal. They’ll then be forced to go all the way down the line to the next reversing point, which is typically the next station. On a long express line, this could be a long way away!
The solution to this is to place the depots inside the junction section, where they can go both ways upon leaving. As a benefit, you now only need one depot for both directions.
In short, make sure your depots are either a long way from the nearest station, or are in parts of your railway routes where it’s possible to go both ways upon exiting the depot.
Sometimes with path signals, you end up with a deadlock where train A is trying to get on the track occupied by train B and train B is trying to get on the track occupied by train A. On a busy network this will cause a traffic jam which will back up your mainlines for miles and miles if you don’t fix it quickly.
With path signals it is very often not a good idea to use the ‘pass signal at danger’ button, except in one very specific circumstance, which we’ll get to later. If you’re using block signals (or, God forbid, pre-signals) and there are no path signals around, you might be able to do that, but with path signals you should avoid it. It’s not my fault if your trains crash.
Often you’ll have to be creative and come up with a solution to each traffic jam on your own — each junction, and each jam, is different. But here are three basic tips.
Firstly, if you followed my advice about placing depots in junction areas, you might be able to send one of the trains causing the jam to the depot. If the network is backed up, it’s quite possible it will be followed by another train wanting to take the exact same route, but just keep sending them all into the depot until the trains in the other direction can get through. Then release them from the depot once the backlog in the other direction is cleared, then fix the layout.
The second method is to use the ‘reverse train’ button to get one of the trains to unblock the track which the other train wants to use. If the train is halfway inside a station, this often works very well; if it’s on a double-tracked mainline, you can also do it (use the ‘pass signal at danger’ button to get the train to ignore the one-way signals) but unless you caught the jam literally as soon as it started, there’ll probably be the backlog in the way.
The third method is simply to fix the design problem which caused the jam, or add an escape route so that one of the trains can find a free path that doesn’t involve going on the track that the other is currently using.
Even if you don’t use the third technique, jams are avoidable. It is possible to design junctions which will never jam. And the junctions which do cause jams will jam up often. So once you’ve seen a jam, try and redesign the junction to fix the problem so you’re not spending the entire game unblocking networks.