Fine Model Minecraftsman: Beginner Railroading in Minecraft


I've now got a midpoint station design that uses two tracks at a single level (although with some buried wiring) that can be strung together in a line, that uses simple flow control, so that main lines are restricted to one cart at a time heading in one direction, and multiple carts in the system can run simultaneously with an ideal number of carts being the total number of stations (terminals or midpoint) minus one.

Below is the original article, written before the above video was made.


Model Railroading-- at least the construction, electrical, and operational aspects, if not the aesthetic ones-- lives on in spirit through the popular video game Minecraft.

What Is Minecraft?

A game for PCs, Macs and Microsoft's Xbox console, Minecraft's appearance is deliberately primitive. Players in Minecraft inhabit a world comprised of cubes that appear to be about a meter on each side. Each cube's appearance lets the player know what material they are composed of: earth, stone, sand, wood, water, etc. Many of these materials can be "mined" by the player for their constituent resources, and reformed into useful tools, building materials, and structures.

Each Minecraft world consists of randomly-generated terrain composed of these blocks, placed together to form plains, deserts, forests, oceans, rivers, lakes, mountains and underground caves.

In its basic mode, called survival, players are dropped into a world and must start from scratch, harvesting wood to make wooden tools, then moving on to harvesting stone and metal ores to make better and better tools in order to make larger and more complex structures. The motivation to make these structures is what happens when it gets dark: the world spawns monsters of various types in dark areas that will roam the world and attack the player if they see him. Torches produce light that stops monsters from appearing nearby, and discourages their approach; walls of earth, wood and stone will keep them out (don't forget the ceiling, some can climb walls!), door mechanisms will let you come and go while monsters are kept out, and weapons can be used to fight them and even harvest certain resources from them.

The game's name aptly points out its focus: mining in minecraft is how you acquire more resources that allow you to improve your tools, replace them when they wear out, and provide raw materials to build houses, towns, cities, or castles: whatever the player can dream up.

If You Build It

It is also possible to construct the building blocks of a railway system to provide player and resources transportation in and out of underground mines as well as between structures and settlements on the surface, which is where the model railroading comes in.

Minecraft allows for the construction of ordinary tracks that allow for minecart passage, "powered rails" that act like electrified tracks, which take any motion of a minecart along a track in either direction and modify it, accelerating the cart when power is present, and braking it to a stop when it is absent, and "detector rails" that produce an electrical impulse when a cart passes over them. Electrical impulses, either to provide power to rails, or to affect the orientation of track at a junction (functioning like a primitive switch) can be carried by a wire-like substance in the world called "redstone" which is applied to blocks like paint, and constant power is provided by a device called a "redstone torch". Lastly, certain advanced effects can be created by the use of a special block called a "redstone repeater" which can act like a repeater, propelling impulses along lines of redstone beyond the normal limitation, as a signal delayer, useful in switching operations, or as a diode, allowing impulse travel only in a single direction.

These basic components allow for Minecraft players to mimic many of the construction and operational aspects of model railroads. Combined with an optional mode of play within Minecraft, called "Creative"-- which absolves the player of the responsibility of mining for resources, and allows instant access to infinite quantities of all resources and design elements-- truly magnificent and complex rail systems have been constructed, from simple button-driven, one rail, two station affairs, to multi-track, bidirectional systems that allow for route selection, yards storing empty reserve minecarts, and systems that can even handle multiple incoming and outcoing carts with a queue system.

Here are a list of a few short videos, some with and some without voice annotation, showing some railway systems other Minecraft players have constructed, from simple to complex.

Automatic For The Miners

For my own Mincraft world, I chose an adaptation of the simplest design.

I wanted a system that was automatic. Lots of systems, whether simple or complex, are heavy on user interaction. They require a user to step on a switchplate or press a button in order to initiate basic actions: to call a car, to start or stop travel, to switch tracks, to change direction, or perform other actions.

In order to increase convenience, many systems have what are called "cart dispensers". Some of these are horizontal holding area-style yards that hold a series of carts in a queue, where pushing a button delivers the first car in the queue to the station for the user to board, and empty carts are automatically returned to the end of the queue after the player exits, refilling it. Others are vertical "pez dispenser" style cart systems, that load unused carts into a vertical stack, and pressing a button releases the bottom-most cart from the stack for the player to board.

All these systems suffer from the same drawbacks. They need to use special circuits of track and wiring for the system to distinguish between full and empty carts, in order to handle them differently. For one, since Minecraft's simple physics seems to treat "powered rails" similar to a slope, they affect loaded carts more strongly than empty ones (exactly the opposite of how a real life railroad or even model railroad functions, where a heavier load actually requires more energy, not less, to generate the same speed). This means that in order to efficiently use powered rails, most systems are built to work with full carts, but not empty ones. Empty carts, if not handled, will foul the line, and cause collisions with full carts at speed. Full and empty carts will bounce off each other like ping-pong balls until they eventually come to rest, possibly stranding both carts in gaps between powered rails, far from a station. In a way, the cart dispenser system is not so much a solution to the question of "where do I get a minecart to start my journey in" as it is an answer to the question "how do I keep unloaded minecarts from blocking my tracks".

The second problem is what happens when cart dispensers become full. Nearly all systems have some built-in capacity limitation; horizontal ones are constrained by how much space they take up, and vertical ones are restricted not only by how high one builds the track that feeds the back of the refill queue, but how minecart objects the game can stack vertically before causing visual glitches. (Minecarts in Minecraft, like other decorative blocks like grass and functional blocks like tracks, switches, and redstone wiring, are not "solid"-- they do not block the motion of another object passing through them, unlike other blocks like earth, stone, and wood. Although no two blocks of any type can occupy the same space, so-called "transparent blocks" do allow travel through them, such as blocks of air that restrict nothing and blocks of water that allow passage, but slow an object's speed. Rails are transparent blocks that move minecarts at a different speed (only in two directions) than other objects passing over them, such as players, monsters, or wild animals.

Another drawback for some of the more complex designs is that they are resource-intensive, more suited to the unrestricted "creative" mode. While the transit system is going to be a big part of my Minecraft play time, I also like the challenge of gathering and managing resources, but it means I want to use them efficiently.

One Track Mind

This means utilizing a single line of track between stations, and probably starting with bidirectional travel on that track. Once enough stations are in operation at enough points around the world, switching to a unidirectional system with a ring topography might make sense, but starting with only 3 stations, the topography that uses the least track is a single line from A-B-C. This requires that travel must be possible in either direction, A-B-C-B-A and so on. With the savings created by needing to construct only a single line of track between each station, we can afford to lay down enough powered track to accelerate empty minecarts as well as full ones, and that is what makes the design possible: a system that approximates a simple, automated, single-line, bidirectional stop-and-go subway system that requires absolutely no user interaction to operate and little or no maintenance.

Each terminal station is a slight upgrade from the simplest possible "stop" one can build in Minecraft. Placing a single powered rail up a one block incline, with a button controlling the powered rail, forms both a brake and a "launcher". Normally, placing a minecart down on a powered rail and then adding power to that section of rail will produce no motion; power only exaggerates existing motion, rather than creating it. Placing a cart on an inclined power rail that is normally unpowered, but is activated by a nearby button, allows for a stop that collects and stops incoming carts, lets the player board the cart, and then take off at the press of a button. While the rail is unpowered, the braking function holds the cart in place against the pull of gravity. When the rail is powered by pressing the button, the powered rail accelerates the cart down the incline and further along the track, exaggerating the motion beyond what would have been possible just by pushing a minecart down an incline of normal track.

While the button can be retained as a manual override, the addition of more powered rails and two other elements can make these terminals fully automated. First, ahead of the station, 2-3 constantly powered rails are added, to make sure that even empty carts are accelerating at full speed towards the stop. This ensures that even empty carts stop as high up on the inclined launch rail as possible, and prevents system failure due to a stopped cart. It also provides the speed necessary to get over the slight braking function caused by the next new element: the detector rail. A single piece of detector rail converts some of the cart's kinetic energy into an electrical signal. The detector rail is wired to several redstone repeaters in serial fashion, terminating on the launch's power rail.

Take The 'A' Train

The effect of all this is a stop-and-go effect rather like a subway: incoming carts enter into the station, accelerate towards the end, and trigger the detector rail. The repearts slow the detector rail's impulse, ensuring that when the cart reaches the section of inclined power rail, the power is off, braking the cart. When the signal from the detector finally reaches the power rail after being delayed by the repeaters, the cart is launched in the other direction and accelerated along the track after passing over the detector rail in the other direction. (The detector will generate a second signal on exit, but as the station is now empty, this has no effect. These impulses can also be used for other effects, such as powering indicator lights or audible tones that let players know when carts are leaving and arriving. During the delay where the cart sits on the unpowered incline, a player may board the cart. Wiring in more repeaters allows for a longer and longer delay, allow a player may board a cart and launch it immediately from the button without affecting overall system operation at all.

These simple designs, using only a few components and taking up very little game space, form the terminators at either end of the line. All the stations in the middle must be more complex, splitting in the middle into two tracks to allow for traffic to pass through them in either direction, stopping briefly in two slightly different, adjacent positions for passengers to board or disembark-- just like a subway station.

This design works, but it requires significantly more resources and space than the terminating stations. It is also less reliable; it requires switches at either end of the station, triggered by detector rails, so that traffic in one direction is shunted towards one rail with its own stop, then permitted to travel through another junction to return to the main line. Traffic incoming to the station, in either dirction, triggers a detector that moves traffic to the right, while traffic exiting the station joins the main line by turning to the left.


This design has its own problems, however. One is that how reliable the automatic switches are depends heavily on cart speed. A cart that is moving too slowly will pass over the detector with little or no speed, which can result either in the cart stopping on the switch, unexpectedly reversing its direction, or, in some cases, stopping between the switch and the detector, tripping the detector and causing the cart to make an endless, low-speed loop inside the station. This would not be possible for a real-life railway system or for a traditional model railroad, but in a world where atoms are a cubic meter, and any object passing through any portion of any cubic meter is deemed to be fully occuping that cubic meter, with the side effect of creating an odd physical law where each and every cubic meter in the game can contain one and only one non-transparent block, but a transparent block may be deemed to be occupying more than one cubic meter at the same time. Therefore, a cart stuck between a switch block and the detector block can be simultaneously causing the impulse that throws a switch and be occupying the block of track that is being switched. This can be rectified by inserting one or more blocks of ordinary track between the detector and the switch block, and carrying the impulse by wires, rather than through the rails themselves, but these leads to timing problems related to varying cart speeds. A slow cart will need repeaters in the circuit to delay the impulse reaching the switch, or else the cart will hit the switch after the temporary impulse has faded and the switch has returned to its default position. A fast cart will reach the switch block before the impulse has. Both result in the cart taking the wrong turn, heading back into the station for another loop. If the loop is caused by a cart moving too fast, it will either continue to loop foever, if it contains enough powered track segments (and almost certainly if it is a full cart, rather than an empty one) or it will eventually slow down enough for the automatic switch to function as designed, and exit the station. If the loop is triggered by a cart moving too slowly for the switch to operate properly, then it will also either loop infinitely, or eventually slow to a stop. Which scenario occurs to which kind of carts depends on the amount of constantly-powered rail within the station. Attempting to create a system that always operates at full speed, regardless of whether carts or loaded or empty (the top speed for all carts regardless of load is 8m/s) sets the minimum necessary loop size and number of powered rails for a station that uses two tracks and automatic switches for handling bidirectional traffic. While such a station is certainly smaller than many of those seen in the videos, especially those that use cart dispenser systems with automatic refill, overflow handling, and runaway cart detection and empty cart recycling, it is still significantly larger and more complex than the simple termination stations. It requires that players also either cross the rails while the system is in operation, or else enter the station from a separate entrance (either going over or under the station tracks) in order to board trains in opposite directions. In return for this greater complexity, the system appears to offer only one distinct advantage: the possibility of handling multiple carts at the same time. If cart speed can be maintained either at maximum, or at a point where the average speeds of both loaded and empty carts are not too disparate, it should theoretically be possible to have carts approach simultaneously from both directions, arriving almost simultaneously at the two platforms. This would minimize the wait for a player at a station by having multiple carts in operation at once, although it does add new design constraints onto the whole of the system, and may introduce additional points of failure. Stations could most likely not be any arbitrary distance from each other, but rather round multiples of the station's own length. The length of track for each siding inside the station needs to be the same, or else perfectly timed carts will eventually go out of sync and collide. The system either needs to accelerate all carts to maximum speed so that cart actions are always predictabe, or else needs to slow all carts to a uniform speed. Carts must be launched into the system also at precise intervals to prevent collisions at stations when putting carts into service, and the lengths of mainline tracks as well as in-station sidings need to be strictly maintained to keep the system synchronous.

My first execution of such a design revealed all these flaws; tweaking of the number and location of powered rails and detectors to handle loaded as well as empty carts, and the system never handled two simultaneous carts without collisions within a short period of time.

However, if one sacrifices (at least for the moment) the possibility for multiple cart operation, I felt that a simple adaptation of the terminal stop should allow for a single cart to traverse the entire system, stopping at each station between terminals, once in either direction, to allow for passengers to board or disembark. In a new system with few stops, a single constantly-running empty cart should provide enough boarding opportunities without too long a wait, and the system's simplicity would more than compensate for the inconvenience by being more efficient with its use of powered rail and detectors-- enough so to make it possible for a beginner player to construct, even within the need to mine all the required resources personally while avoiding monsters in the game's default Survival mode.

Stuck In The Middle With You

These midpoint stations are constructed by abutting two terminal station designs, back to back, and removing the button and end block. This results in a single piece of unpowered track sitting atop a two-block incline, flanked by two powered rails going up the incline on either side, preceeded by a detector rail on one side of the incline that sends a delayed power signal to the power rail on the opposite side of the incline. The detector that triggers that delayed power signal is directly adjacent to the two pieces of power rail that go up the near side of the incline, so that traffic approaching in that direction is powered up the incline. At the top, the electrical connection is broken by the single piece of unpowered track, which slows the cart just enough so that when it hits the downside of the incline, the unpowered track has enough braking power to stop the cart consistently on the first downhill block. There it sits, waiting for the delayed signal from the detector, which, when it arrives, powers the cart away from the station and along the single main line. Eventually the cart will reach a terminal station, where it reverses direction. Each midpoint station's design is mirrored along the length of the mainline track. This means that the inbound and outbound "stops" within the station are only three blocks apart, and can be approached from a single station entrance form the same direction without crossing the track. It also reduces the number of detectors in the station design from four, in the case of the two-track station (one each for stopping and switching in each direction) to only two. The savings can either be used for making more stations, or for adding signal lights or chimes to the station design to alert players of incoming and outgoing carts. With the entire station design using only a single rail, the number of ordinary and power rails required for construction is also greatly reduced, and the simpler design that requires no switching increases reliablity. Cart speed needs only to be predictable at stops, instead of both at stops and switches, which means fewer stalled carts. Since the entire system uses only a single cart, in constant motion, no collisions are possible. The drawback of this design is that once the entire system line reaches a certain length, the maximum wait at any station may become too large to be practical. This would proably be more of a concern in the PC and Mac versions of Minecraft which can have arbitrarily large worlds. On the Xbox version, which I am playing, all worlds have a single fixed size. Even so, this may be plenty large enough to mean that a large rail system built on this automated, single-cart design may have maximum wait times at a station that approach a single day/night cycle within the simulated world, or about 15 minutes real time. For the small system built by a beginner player, however, connecting the starter villages in the tutorial world, however, this design works very well. Once the system is large and long enough that wait times become unbearable, I hope to have a better two-rail station design in place that will be more compact and reliable than previous ones, and then upgrade the midpoint stations to that design.