Mindustry

Mindustry

397 ratings
Deeper Understanding of Mindustry I - Transportation
By Serdar and 1 collaborators
With this guide, we will dive deeply into all of the transportation components one by one in Mindustry. We will learn how to use them and how to use them efficiently to improve your gameplay experience.
15
2
2
   
Award
Favorite
Favorited
Unfavorite
Introduction
Important Note: This guide is incompatible with current game version.
This is an unlisted old guide. Do not take the informations as it is many tings has been changed and there are no plans for us to update this guides.

This is the entry point of the "Deeper Understanding of Mindustry" guide series. My goal is to show people how deep and puzzling this game can be if you look it in a different way.

The information I'll be giving you here will start with very basic knowledge which is required to be known by you to play the game casually. Then I will dive deeply to a point that is not necessarily needed to be able to play the game but needed to be known for creating complex, compact and efficient systems. Even if you think you already know about a subject that I am giving information, I suggest you take some time to finish reading it. I believe you will find information crumbs which will solve some of your problems.

Before you read,
We will be giving you some speed information about transportation chains here. You need to consider that Mindustry is a game that is highly affected by FPS (frames per second) rates. The experiments here are done on 60 FPS. If you try the setups here with different FPS rates, you may calculate different numbers than us. To be safe, if you are planning to reconstruct the experiments here by yourself (which I strongly recommend this) Limit your FPS to a maximum of 65 on your game settings to achieve the same results.

You also need to test your builds with different fps rates if you are planning to use them on multiplayer. Servers are generally running on 60. But the fps rates are fluctuating a lot, especially on large maps with a lot of units/buildings are present. Keep that in mind.


Transportation Direction and Building Input/Output System
In Mindustry transportation systems are created by building transportation components side by side like all other factory style games. Transportation direction in these components is determined by two factors:

First is by the component's own property. There are 3 types of transportation component which has the ability to determine the moving direction of the items and liquid inside them. Conveyors/conduits, bridges, and phase conveyors/conduits. Mass drivers may also be listed here when they only transport items between each other. Their interaction with other components cannot be defined as directional transportation.

The second factor is the direction of the item transported to the component. Many of our components are accepts items from any side. Junction for example. You can input items to a junction from any side. But you cannot do this with a conveyor. A conveyor has strictly determined input and output sides.

In Mindustry there are no designated input and output points of any kind of production or resource extraction building. Any side of a building can be an input or an output point. All you need to do is attach a transportation component to it. Then the building will accept this attachment as an input or output point according to what kind of transportation component and what is the direction of the transportation in that component that you are attaching to the building.



Graphite Press building in the animated image accepts the conveyor belt which is carrying coal to it as an input point because of the transportation orientation of the conveyor belt. The same is happening on the other side as an output point because the conveyor belt orientation is the opposite.

You should also consider all production and mineral extraction buildings as distributors. Buildings that are capable to produce stuff will distribute their contents evenly to all possible output points.



Extractors like Airblast Drill are also considered as production buildings. They will distribute their contents evenly between every output point attached to them.



As you see from the image, at this build we take half of the coal to graphite press which is generating ammo for defense, half of the coal elsewhere.

Keep this knowledge in your pocket. We will return this important subject later. We need to know all of our transportation components one by one to explain why this is important. Also, I will not dive into conveyors here. I guess they are easy to understand.

Junction
A junction is a simple crossing over between conveyor belts. It prevents mingling between the contents of the conveyor belts while they cross over each other. A simple and convenient component in our inventory. Apart from that, they also have some properties which are very useful for our construction projects.



Their first useful property is their individual storage capacity of 12 units of any material. When you insert materials to a junction, first it starts to fill its own content then transfers these materials to the next component. if there are no materials to input, they transfer their own content to the next component. And they have a magical storage capacity of 12 units unique to its all 4 sides.



With this property, we can use junctions as small containers, especially in the early game. For example, imagine a scenario that you don't have too much copper source in your map. Your current income looks slow but in the time between waves, you are able to collect enough copper to stand against the next wave. However, you don't have access to titanium and silicon for a container/unloader setup. We can use the junction's storage space as buffers for our turrets. Like this for example:



You see that we are using overflow gates with routers for feeding Duos, instead of chaining routers together. We will be explaining this chain later. All you need to know for now is, this is way much faster and better for Duo setups.

It is essential to know that Junction's storage property is single oriented. If you insert materials to a junction from one side, you have to take them from the opposite side with the same orientation.



If we go deeper into this, you can store 4 different materials to a single junction by using its 4 sided storage property:



Since there is no graphical display of, from which side and what kind of material have been entered into a junction, we can make many mistakes while making designs with junctions. Especially on multiplayer maps, as the game progresses, we need to edit and sometimes change systems that have been built by other players. If you encounter a non-working system that has been built with junctions, it is highly possible that the problem is happening because someone tried to insert materials to that system from the wrong side. Again, since we cannot see the orientation of items in a junction, generally the best solution to this is deleting a good portion of the junction system and rebuilding it.

The second and the most useful property of junction is the transfer speed. I mean the transfer speed of sending it's content to the next component. According to the game files, it should be faster than a titanium conveyor belt. Let's make an experiment on this property to see if it is really faster than a titanium belt.

Grab your favorite sandbox mode map or start a peaceful map with sandbox mode and try this experiment by yourself as shown in the animated image below:



As you see from this experiment, junctions are trying to fill in their own internal storage first. Because of this behavior, they are falling behind according to the titanium belts. From the result of this mini-experiment, we can say that junction chains are slower transfer systems if we are trying to carry stuff from point a to point b. But why do the game files says us the opposite?

We experience this slow result because junctions in that chain were empty and they were trying to fill their inner storage first. Let's do another experiment with full junctions to see their real transfer speed. Build the same system, but wait until junctions fill in their storages, which means wait until everything stops moving. After that, replace the first titanium belt on the junction chain with another junction and remove the last titanium belt on that chain. Wait a little bit more and build a vault at the end of the 2 lines and observe the contents of the vault:



This time something different has happened here. Take a look at that numbers:



Copper is filling into the vault at 2.6x speed! The difference was, this time we had filled junctions before transfer started. They also were in a closed transfer system. If we didn't have a closed junction chain system, transfer speed would turn into normal. Because items were transferring from junctions to belts are getting their transfer speed equalized with titanium conveyor belt speed. Let's see this effect:



We always have transfer systems that are continuously carrying stuff in the game. If the transfer speed of a chain is 2.6 times faster than a normal chain, this means we can input or output 2.6 times more materials by using that chain. Which leads to larger production systems in smaller areas.
Junctions are two-way conveyors
We demonstrated that junctions have item storage capacity unique to all sides before. To clarify this, we may think junctions as 4 armored conveyors, sitting on top of each other, oriented to all different sides which can hold 12 items on each of them. They do not mix items inside them, they even do not mix item transportation orientation inside them. We can use this property to create two-way conveyors:



(If you are new to the game and don't know much about gates and sorters, skip the part below and continue on from the overflow gate section. You can return here later to get a better understanding of the setups we will be explaining here.)

As you see in the image above, I had to add and remove conveyors to be able to take the items in and out from the junction chain. Because junctions don't mix items inside them, I have to use different components to input and output to the system at the same time. The first approach can be a sorter/gate system:



But this system has a flaw. Because we use overflow gates, any overflow happening in the system will not only block the item transportation from one side, it will also block the other side too:



To overcome this issue we can use inverted sorters instead:

Overflow Gate I
As its name suggests, overflow gates are special components that can detect overflowing content in a transportation line and can route it elsewhere for our usage. When an item enters an overflow gate, the first thing it would try to do is directly pass through the gate from the opposite orientation it comes from. If it's direction is overflown with items, then it will be rotated to the first possible direction it can move that attached to the gate.



If there were two possible directions, entering items will be routed into these directions equally:



We can mimic the overflow detection by removing the main exit of the overflow gate. When we do this, the overflow gate behaves as that exit has already been overflowed with items. With no way to go, entering items will be rotated to the all possible exits equally:



It is important to know that, item transportation from one gate to another is not possible:



I believe that if you ever played with other people, you have already been seen overflow gates everywhere. Most common usage should be looking like this:



You may ask why do we use overflow gates, specifically in a distribution setup like the one above. The answer is speed and further controlling options of the transportation direction. Normally we suppose to use routers instead. That is the logical selection as its name suggests it is routing items and we need to route items to insert materials into production buildings. But in Mindustry, on most of the cases, it is unfortunately wrong.

On this specific distribution system shown above, we used a chain made with junctions and overflow gates. It is because we don't want to mix items going into a building and as we just learned that item transportation from gate to gate is not possible. Let's understand how do items are moving inside this chains first:



I tried to animate the one done with routers. But it was so frustrating for me to show how items are moving back and forth inside the junctions and I gave up. It was a large project. A very large one... I'm going to show you what I mean by experimenting on the speed of these chains let's do the experiment setup we did with junctions but using routers and overflow gates this time:



As you see from the experiment, the chain done with overflow gates is way much faster than the chain done with routers. It is because routers are routing items back and forth inside these junctions. Router/junction chains are even getting slower if you increase the size of the chain. And router/junction chains are the slowest possible transportation chains in Mindustry. They are even slower than standard conveyors. We will dive deeply into this behavior of routers on the "Why router chains are slow?" section later on.

Overflow Gate / Junction chains are ~2.6x faster than titanium conveyors. Which means we can input ~2.6x more materials into these chains. Also being able to gather and use the overflown items in a system allows us to determine how much stuff we need in a system. By using overflow gates, we don't need to calculate much stuff in the game. For example, imagine we have a full titanium line of coal and a full titanium line of sand. I want to know how much silicon can I produce with this income and how many silicon smelters should I use. Let's see:



With the overflow gate distribution system, the last production building gets the items first. If incoming materials are more than it can handle, it will block the income and wait for it's production time. This creates an item overflow on the system and items will be distributed to the production building coming before it. This goes and goes like a chain and gets to its equilibrium point after all the junctions are full. As you see from the image, I can barely run 4 silicon smelters with that input. The other 6 smelters are not required until I find a way to input more sand to the setup.

We didn't use routers here in our calculation because when you chain routers like this, they become slower than a titanium belt. Which means we cannot input 1 full titanium line and a 1 full sand line to the system:


If you keep running that system, the chain's speed gets its equilibrium at a 2.9x slower rate than a normal titanium belt. The number depends on the length of the chain. Router/junction chains are even slower than the chains consist of only routers. It's because of the internal storage of the junctions. Each junction opens up space for 12 items to be dumped back and forth inside the chain:

Overflow Gate II
We can also carry more than 1 titanium conveyor belt worth of items into a system or a container with overflow gates and junction chains. To be able to do that, our first element on this chain should be an overflow gate, which can have 3 input and 1 output locations:



If we compare the overflow gate system with a router chain system, you will see how it is not possible to push more than 1 line of items. Conveyors going into the router chain stops regularly. It is not even possible to put 1 full titanium conveyor belt into a router chain. We already proved that with our experiments.

But how do we design such chains that are going around buildings or other conveyors and rotate as we want? It is very simple. Since item rotation inside a junction is not possible, all we need to do is putting an overflow gate to the corners when we need to turn. Remember we can mimic overflow detection by removing the exit point of the overflow gate:



So why do we need to put more than one conveyor belt worth of items into a system? The answer is efficiency. With a maximum 1 belt input, you can only create a system that can run with 1 belt at the maximum rate. For example silicon production. It has a 2 to 1 input ratio. Since you can only input 1 belt, your production rate will be 1 to 0.5 ratio at max. Even with overflow gate chains.



I tried it with 5 smelters this time. Again only 3 of them are always running, 1 barely runs, and 1 is empty. But what if I use the information above and input 2 belts of sand into the same system as this?



As you can see from the image, we have 6 smelters that are always working and 1 smelter almost always working in our system now. With just inputting one more belt of sand into the system, we doubled our production. It is not possible to do this with router chains without making a mess. A production schematic with routers that can run 6 silicon smelters should be a spaghetti mess. A large one having inputs from everywhere. This is also not efficient for space usage.

You may think why are we using conveyors as input and output components to the buildings with this style of distribution, while we have faster systems then conveyors like junctions for example. Now it is time to remember the input-output system on buildings. Because junctions can accept materials from all of their sides. Buildings are not clever enough to determine that you put those junctions as inputs. Let's have a try:



They are stopping working one by one! But why? In Mindustry, the input and output points of a building are determined by the components that are touching it. In this specific distribution system, we are using conveyor belts because conveyor belts have only one direction, it is strictly determined that if a conveyor enters a building, then it is an input. It is the same for the opposite. if a conveyor belt is leaving a building, then it is determined as an output. remember this:



With junctions touching, silicon smelters cannot be able to determine the input/output system. While junctions are transporting materials to the smelters, smelters may push items to the junctions that we think as inputs. Let's have a look at the previous system and how we messed it up:



As you see from the image, silicon was contaminating the lines from all sides. That was the problem. Because silicon smelters were dumping silicon into the system in the wrong direction. They did that from the junctions that should be inputs, not outputs. You should also know that overflow gates and routers have similar types of effects like junctions on buildings. These components can get input and output from the same directions. This situation will mess up your designs if you don't know how to handle this issue.

A closed system with no conveyors always helps us for space usage efficiency. if a building does not have an item output, a closed system may work with overflow gates used as input components to the buildings. Steam generators for example. They don't have any item output. So they cannot dump items into our system from an unwanted orientation:



You can also do this with any kind of mech or fighter factories. Or you can do this with production buildings that have a different type of input and outputs. Like CryoFluid Mixer. Since this building only outputs liquid, you can transport titanium to this building in a closed system. You can also use this system to transfer ammo to your turrets. They do not output any materials.
Overflow Gate III
The junctions are the problematic components when you encounter such situations. Because of their storage and multiple oriented transportation systems, we are limited to a single-sided input. Imagine we have a closed junction /overflow gate system with 2 input lines. I want to input more but, because of the surrounding buildings, I cannot input from the same overflow gate and I did this:



After I put another input from the bottom, 2 inputs above me stop working. But what has happened here? Let's first check if we are still pushing items to the item void direction:



We are transferring items to the void. If I look at what happened above, we will see that there is some Plastanium inside the junctions that are going up. So let's forget about the overflow gate at the top. let's think according to the perspective of the bottom overflow gate that we have built there. It was transferring items straight above within junctions. Plastanium went upwards until it hit something, in this case, it was the overflow gate above. Since there was no way to go more, the input overflow gate gave a signal that the upwards way is overflowing. Then our input gate rotated the input to the void. When the input overflow gate gave the signal that the upwards direction overflowing, the upward overflow gate stopped receiving input because it thought the way was overflowing. My English may not enough to explain this but this image may:



If you think you can sneak one more input into the same system from the same orientation that items are moving, look at what happens:



As you remember, we can carry around 2.6x titanium conveyor belt worth of items with closed gate/junction chains. In this particular setup, we are trying to dump 3 conveyors into the system. Because we cannot carry exactly 3, there is an overflow inside the junctions that we cannot see and the system stops working again.

It is possible to insert that input line if we had 1 belt worth of input into the system. However, it is not sustainable. For example, If something happens to your power consumption and your production building has stopped or slowed due to the low power or it stopped because of an overflow, your system will be broken until you fix it.



So be careful with overflow gate/junction chains. It is an effective way of transferring materials, however, it can easily be broken with small mistakes. Overflow gates also have item storage of 1 with only 1 type of item. This item will be deleted during the map reload.

It was only 2 transportation components we were talking so far, yet we manage to create more effective systems with them.
Overflow / Underflow gate exit behavior
Overflow gates are so fast, they act like they simply teleporting items to the next component. They are speeding up any chain they are in. When an overflow gate is chained with conveyors a possible unwanted event happens regularly. Let's have a look at this image first:



What is happening here is overflow gates are trying to push items to the conveyor which is already occupied by another item. This creates an overflow and items are routed to the possible exits. this happens generally on fully saturated conveyors.

To fix this issue, you need to have a component on the exit point of the overflow gate which is faster than the conveyor and has internal storage in it. Junctions, bridge conveyors, phase conveyors may fix this problem. Even a router may fix this problem but routers may still cause leaks, also they will route items to the other transportation components that are touching them.



This is also happening with our new component underflow gates:



I have reported that issue as a bug. It has been fixed up to a point. But according to the developer, this is not a common problem. He says:
Originally posted by Anuken:
The only thing that may still occur is precision errors due to fluctuating FPS and different speeds after input/output. This won't be fixed.
See: https://github.com/Anuken/Mindustry/issues/1449

So I renamed this as a "behavior" instead of a "bug" As I understood from him, this will not going to be fixed. If you are one of the ones who are experiencing this like me, you need to include the fix that I have given to you in your designs.
Underflow Gate
This is the opposite of the overflow gate. Unlike overflow gates, it will not allow passage and try to route items to sides until an overflow happens at those sides:



Underflow gates always try to route items to the possible sideways instead of letting items passing through:



They have the same speed with overflow gates. They will affect all the chains they are in same as overflow gates. Expect one thing. They will distribute items to the sides first. This behavior allows us to generate a router like a distribution system with underflow gates, which distributes items to closer buildings first instead of the last ones:



Imagine we have some titanium income for CryoFluid. But I also want to use excess materials to create extra Plastanium. Here is an example which shows both the underflow gate and the exit behavior together:



Look, there are leaks to the conveyor that is going to the Plastanium compressor even there was no overflow on the sideline going up to the cryoFluid mixer.

As I learn from Anuken, this exit behavior is not happening to all players. That might be an issue about fluctuating FPS rates on my device. If you are experiencing this issue like me on the image, you need to have a second component that must be faster than the titanium belt and have some inner storage capacity. You need to put that component where you expect overflow will happen like this:



Underflow gates were requested by players mainly for design purposes. You could do the same job with an overflow gate. But it would look like this:



Also, the inverted properties of underflow gates allow us to create such distribution systems:



I'll dive deeply into this distribution system on the second guide. Underflow gates also have item storage of 1 with only 1 type of item. This item will be deleted during the map reload.
Bridge and Phase Conveyors
Bridges are simple systems that transfer items over something. Accepts 3-way input from the entry point and 3 way equally distributed output from its exit point. It acts as a distributor at its exit point.



A bridge conveyor is a system that consists of at least two components. It should have an entry, an exit point, and a link between them to work.



The transfer orientation of items in a bridge is determined by the connection/link orientation between each other.



It is not possible to input or retrieve items from the sides which are used for attaching each other.



It is possible to build bridge chains. It is possible to input materials from the middle sections of the bridge chains. However, it is not possible to output items from the middle sections.



It is even possible to input materials from attachment points in the middle sections of a bridging chain. But don't forget, it is still not possible to input materials to bridge endings.



Bridge components placed next to each other do not mix the items they carry at the exit points. So it is not possible to input materials from a bridge system directly to another bridge system by the same components.



However, if you use different components, if you place input points next to a bridge exit point it will work.



Bridges have internal storage spaces as junctions do. it's 32 units of any materials.



Just like junctions, bridge components can store items according to transfer orientation. Apart from junctions, they have 2 oriented storages instead of 4. Because transfer has to be done with attachment points, they are not dangerous like junctions. To accidentally dump materials to a bridge from the wrong side, you also need to accidentally change the attachment orientation. And bridge components need to be attached for that storage to work.



Chains made with bridges are around ~1.15x faster than titanium conveyors.



They may be a desirable alternative to titanium conveyors in some cases. But a titanium conveyor belt will do better if it is under the influence of an overdrive. Because bridges are bad guys and they don't behave as expected under the speed increment effect of an Overdrive Projector:



It is important to know that when we do compact designs we generally use bridge layouts a lot. Overdriving these layouts may not have the results you are expecting.

Phase Conveyor
They are very same as bridge conveyors with some small differences. Besides having a longer range for attachment and needing the power to run, they have 20 units of storage space. This storage is shared with the orientation. Also, they have the same speed as junction chains. So I am generally avoiding using them while it is free to use junctions instead of spending at least 32 power units on each phase conveyor system until I need them. But their speed and ability to reach far away might be useful at some point. Their chains are 2.5x faster than titanium conveyors.
Distributor and Router
These components are exactly the same. When you input something to them, they will try to distribute items equally between their output points. The distributor is a larger version of a router. This way it has more input and output points. The distributor can separate 1 line to 7 different pieces or opposite, merge 7 different lines to 1, while the router can do 3. They also have item storage of 1 with only 1 type of item. These items will be deleted during the map reload.



They do their job very fast when they are directly connected to conveyors. But they have a slowing property when they connected to each other:



They are very much like production buildings. Any side of a router/distributor can be input and output spot. So you need to be careful while attaching something to it. They will break your junction systems as production buildings do.



Because of this behavior junctions will never work well with them. They will slow down your transportation. This is happening because each time a router/distributor meets a junction, doesn't matter if that junction carries materials in it, the router/distributor tries to push materials into that junction. This acts like it is splitting materials and slows down transportation on each extra piece. The same thing is happening when you chain them together.



We will use these components when we need a separation. Imagine a scenario that you have many resources coming from different directions. You want to take half of them to the core, half of them to the defense lines for example.



You cannot calculate and separate these mines outputs precisely. You may even add extra materials from different mines after some time. If you use a distributor or a router for this job, you will always separate them evenly. This is it for now. We will return these components later.
Sorters -
We have 2 very useful components. Sorter and inverted sorter. I'll call them simply "sorters". A sorter is a component that only allows passage of one specific material you select and route others to possible outputs.



Inverted sorters does the opposite:



Sorters and inverted sorters can be chained like routers, junctions with an exception of maximum 2 components of same type:



As i see from my experiments when we chain 2 sorters together, it looks like item is magically teleporting from one side to another, instead of passing through. So that might be a huge speed boost for our production if we find a way to make this chain work. Let's try everything we have in our inventory so far to see if we are able to make this work or not.



As we remember from an older experiment, if we break a closed system with a slower component, chain will as fast as the slowest component. Remember this?



We know how fast exactly bridges and junctions are. So i will just eliminate them for a possible faster transportation. However I really don't know about overflow gates. Since we cannot use only overflow gates to create a chain and they don't slow down the junction chains it is a good candidate. Also routers have strangely fast speed when they are directly connected to conveyors. I want to see if sorters are able to do this to routers. So i will test both:



How surprising that routers doesn't do well anytime i try to do something with them... Overflow gates worked suspiciously well. I wonder if that chain is faster than junction chain:



Yes! we found something faster than junction chains. it is like 2.2x faster. It is also 5.9x faster than titanium conveyor belts! However adding this to our systems with regular ways will be a huge problem. Because how they work. There would be mingling all over the place cause we don't have the safe keeping of junctions as you can see from this image:



Stupid isn't it. Because of the behavior of sorters it does not allow same items to pass thought it from different directions. May be we should approach it a little bit different. We have coal and sand and we need a transportation component that allows both to pass. With regular sorters, they allow to pass indicated material from it. But with inverted sorters we can use their behavior in this system. Inverted sorters allows any material other than the indicated one to pass through. Just select an unrelated item for inverted sorters and let's try:



Yes, we are getting this right. We have a super fast distribution system now!

Additional Sorter-gate testing

Testing this further, it is not possible to input from multiple lanes without having feedback from the overflow, causing a jam.

https://gyazo.com/4ab9051a7af8ca1736ec640ab428578c (Ran out of image slots for guides)

In order to input more items into a pre-existing chain, you need to make sure that the flow of items can only go in one direction.

https://gyazo.com/78e9869a460d0e664a8282c3d4a1e296

Note which side and sorter that the items are going in, this exploits the behavior that two touching overflow gates cannot pass items to each other, but if you're putting this in the wrong sorter, it will send items in the other direction instead.

Here's another way to use game mechanics in order to create a one way input

https://gyazo.com/1cf3165a158048f6b53749a3bf909748

By using the mechanic where items cannot pass through three sorters, we can make a smaller/simpler one way input, however the limitation with this method is that you can only input a resource that is not already in the chain.

By combining this information, we can further test sorter-gate transportation, pushing it to it's limits, as well as see what FPS can do to other systems that are dependent on load order or other systems of transport.



It appears as sorter chains do indeed closely match the limit we first measured earlier, with an exception;



These setups are limited by the ticks/frames per second that the client is running on.
+60 FPS means around 6 TBL of throughput
<60 FPS may mean near infinite throughput. (Some examples of 100+ on the Mindustry discord)

It also appears that it has relatively little effect on other systems in practice that rely on sorter-router chains instead. (May need further testing)

It is hard to say what will happen in multiplayer servers, but we can assume that it will roughly be 6 TBL, given that servers will attempt to hover at 60 Ticks/Frames per second.
Merging belts
An item will have trouble getting placed onto a belt, this can affect drills or input belts alongside it


This can cause a lower throughput.

It can also be improved by adding either, a router, or an overflow gate.
Pay close attention to the corner where the silicon merges onto another belt:

https://gyazo.com/bb58ba27016b12822edbe9a984347832
(too big for preview)

Adding a junction right after the gate, will act as a storage buffer, to make sure flow is constant, though in most cases this will not be required.

This entire mechanic can be used to our advantage as well, with some out of the box thinking
You could have it so that your input belt for ammo will prefer one type of ammo over the other, allowing you to mix your ammo lines if you cannot fully provide enough, while still making sure to use the better ammo first.


If you wanted to evenly mix two full belts, you could use a sorter to do so.


This is because of how sorters do not have a storage buffer, allowing an item that is touching the sorter to move through, while the other item from another belt moves into place, to then touch that sorter. I do not know which item goes first however.

It's possible to create a loop that will constantly move, not allowing any items through, but can still incoming items from the corners.
Using this logic, you could create a conditional flow logic system or breaker, where one item must be flowing in order for the other item to continue through.


This is an example that I found on the Mindustry discord from the user flatwater#1511, then adjusted to fit into a smaller profile by Scrappy#1767

https://steamcommunity.com/sharedfiles/filedetails/?id=2071989116

Testing this specific method further, it does attempt to match the resources on the input lane (titanium) to the output lane (thorium) within a margin of error if the input reaches over ~0.5 TBL


From what I observed, items have trouble when making the turn.
I think this is related to how a belt can store 3 items, we will call them 'slots' for now.
A straight input and out will fill all 3 'slots' of a belt, however if you input it from the middle, it might try to fill the 'middle slot', which may already be reserved by another item using up that same space/slot, making belt compression harder.

Testing what I could, I was not able to find a pattern that determines the preference when merging with an overflow gate

https://gyazo.com/36415ffe8438373dadc6849040482773
(too big for preview)

I'm certain that this system would have a greater use than preventing a Thorium reactor explosion, favoring map makers, but there may be other options to interact with the player(s) such as energy voids, overflow gates to check if a belt has been broken, or several other methods.
Overflow Gate / Router Chains
There is another possible chain system we haven't tested yet. What if we put slowest and fastest units together? Let's try:



This interesting mix is generating an interesting speed of 5.9x titanium conveyor belt. Same as sorter chains. Because of the properties of this chains components, it doesn't have many uses. Because routers and overflow gates will route items all over the place, we cannot chain this system in a way that we can carry more than one item type. We use this system as a single item type distribution system. Let's have a look how the items are being routed around:



We may use this chain to build more compact pulverizer system for example:



We are also able to distribute ammo faster to our duo setups on early game with this system. We are also able to create longer steam generator chains.



Look how fast does copper filling into the system and to the duos. A great advancement for early game. This chains are best alternates to distribute items to production buildings which requires only one item type. Like weapons, steam generators, pulverizers, melters, graphite presses, multi presses, plastanium compressors, cryofluid mixers etc..
Mass Driver
Mass drivers are magical transportation systems that saves us from a lot of troubles on late game. They have an internal storage of 120 units which is only active when they are linked to another. They also require power to function. We generally build them with 2 large solar panels to keep them working even when we loose energy on our base for some reason. We also generally keep them separated from main energy grid for the same reason. We use them to carry resources between far distances.



As you can see from the animated image, Mass drivers has input and output system very much like production systems. You don't need unloaders to get items from them, as long as they are connected to another mass driver. When everything okay to go, a mass driver first needs to align itself to the target mass driver. Also receiver mass driver should align itself according to the sending one. After that alignment, sender mass driver starts to lunch it's contents in timed intervals. A mass driver can be both receiver and a sender:



When we make a mass driver both sender and receiver, it will regularly change it's alignment. This will effect our transportation efficiency very much. But if we design our system like that, there will be much less delay. But it will cost you more materials to build. However in late game this shouldn't be a problem:



Well I actually placed that conveyors for you to see the item transportation between them. This is also possible and better:



What would be the fastest way to unload the mass drivers compared to other options that are possible? After testing with unloaders, sorter-gate chains, and direct connection to storage.



This measures how long a mass driver still has an inventory. A lower amount of items in the container, means a better score/unloading speed.

Testing with 8 shots (120 copper per shot) in total for both sides yields :
Top: 115 copper
middle: 72 copper
bottom: 73 copper

This means that multiple sorter-gate chains, and a directly connected inventory will unload a mass driver at the fastest speed possible, where the unloaders are slower.



Testing the same setup with OD touching all but 2(?) unloaders, and same amount of shots yields :
Top : 88 copper
Middle : 72 copper
Bottom : 73 copper

This also means that sorter-gate chains and directly connected inventories will always be faster compared to unloaders, for an almost comparable speed.
This also proves that adding an overdrive just for unloading of a mass driver, does not boost unload speed.


What if you combine both direct connections and unloaders?


Top : 101 copper
Middle : 108copper
Bottom : 156 copper

This means that by combining both methods, you can achieve an even higher unloading speed. It appears as overdrive the unloaders do not grant a strong effect however.
Buildings as Transportation Components
Looks like we have covered all the transportation component in the game. Expect one type, buildings. Yes, they can also be considered as transportation components.

if two buildings are touching each other, touching sides becomes input and output points. If a building produces an item and this item is accepted as an input according to the next building, they will transfer resources between each other and that is the fastest transportation system in the game.

Lets have a look at this system. This is a very basic inefficient coal factory:



No conveyors(expect the one for output) at all. Water extractor delivers water directly to a cultivator. Cultivator pushes produced spores to spore press and spore press transports the oil to the coal centrifuge. Very simple, space efficient design due the no other transportation component usage. This sort of systems are also reliable because buildings will only accept materials that they can use. So there will be no overflow issues, clogged junctions, no mixed conveyors etc. But it is not producing as much coal as a coal centrifuge can. Because one cultivator cannot produce enough spores to make spore press produce enough oil for coal centrifuge to continuously run. But design can be altered to be more efficient like this for example:



We increased number of water extractors by 2 and cultivators by 1. A single cultivator requires slightly more than 10 water units per second. Three extractors can generate just enough water for 2 cultivators. This way we can generate more coal from that centrifuge. Take a look at the arrangement of the buildings. Any side touching each other (expect corners will) do the transportation job.

In the setup below we can observe that, this spore press in the middle regularly stops due the lack of spores. We also have some unused space around. placing this buildings like that gives some ideas to me to increase production more like this:



You can even add small solar panels to the empty space to reduce energy cost a little bit. You can save this as Schematic and name it "Small Energy to Coal generator"



This two systems below are generating same amount of coal. Just with adding an efficiency goal to our system we manage to do same thing with using less energy and less space.



This type of thinking will be the core of our designs. Use less transportation components as possible, build production buildings together as close as possible. Use as much less space as possible.
Storage and Unloaders
This is a good time to introduce other components that can be used as transportation elements. There are two type of storage buildings specifically designed for storage in Mindustry. Vaults and Containers. And a component required to unload materials from them, Unloader.



Containers have 300, vaults have 1k storage capacity. This capacity is reserved for each material type. As you see from older experiments, we can directly input materials to them. But we need unloaders to remove items from them. Also you need to know that, unloaders are not unloading fast enough to fill a titanium conveyor belt. You should consider this while creating efficient designs. They are around 25% slower than titanium belts. which means their speed is ~0.75x titanium belt.

Another advantage of using vaults as a component on your systems is when everything overflowed and halted, you will always have 1k raw resource buffer and 1k produced items stored for a possible later use.

In Mindustry, many buildings have their own internal storage. An you can unload materials from any of them by using unloaders. We can use this property for our advantage. It would be useful when you don't have a good space for a construction project like this:



Just the distribution system is larger than alloy smelters. Imagine that you have narrower space for them. You can arrange them like this:



Please do not forget that this is not efficient for production when you build chains like this. We were thinking only about space in this scenario. We saved a lot of space with this design. Also mind the junctions below the silicon and above the copper unloaders. Because unloaders will unload materials from all possible open sides:



It is also important for you to know that unloaders are even slower when the unload from production buildings. In this setup item sources will continuously fill the graphite press and the vault while i am unloading from it. Let's see the difference:



They are unloading at 50% efficiency when unloading from buildings according to a titanium line reduced by extra 25%
Why router chains are slow?
In this section i want to end the arguments about this subject. Game is around for sometime. People should have learned this already but they still don't. It is enough! We don't want to see such builds around:



Everyone calls a different name to it. Chess board, zig-zag, etc... I'll call it generic distribution system. To understand why pro players of this game do not approve this distribution (the one that done with routers only. We actually like the ones done with overflow/underflow gates), we need to dive far deep into routers and game mechanics.

I said that before, routers are routing incoming materials to all possible output points equally. Imagine there is a direction arrow inside a router. This arrow is determining the rotation of the item inside a router. Each time an item pass through a router, this arrow changes it's direction to the next possible exit point. Let's see how is this happening in action:



Each time an item passes through, it changes the next item's rotation. Even if you insert an item to it 10 minutes later or an hour later, arrow will stay still in the router and the next item will be routed to the next possible rotation, that arrow points to. When the order finishes, then arrow will be again on the first rotation. And this will continue to loop.

Keep that knowledge in your pocket. We will return to this behavior later. Now we need to dive deeper into game mechanics.

We can reduce game programming concept into two distinct functions. All of the games around have this specific two functions in a way. Some of them more complex, some of them are very basic. We generally call them update and draw functions. Game program separately calculates what is happening in the game and then draws a visual information(picture) about this calculation. This is happening so fast, we experience the drawing function like a cartoon. Changing pictures one by one like frames in a movie. This happens very fast and we see this pictures like animations.

This is where frame per second (FPS) comes from. If your device is fast, your game can run this update and draw functions many times. Faster your computer, smoother the game animation is. 24 frames per second is the lowest limit for a relatively smooth animation for human eyes. But this is not so fast for game animation. 60 FPS is considered as the lowest limit for computer games for a long time. Mindustry is highly effected from this frame rates. Below 60 fps, stuff start to behave different and may not be smooth as you predicted in Mindustry.

Draw functions are very good optimized, fast functions. They only change the pixel colors of your monitor apparently. But update function is highly effected from our constructions. How many game objects are there around, how often they needed to be updated, how optimized that objects are and many more.

When we build something in game we create a game object. This object will be added to the update and to the draw function as soon as we crate it. Since we build lots of stuff in the game, each one of them will increase the object count of this functions. If we have too much objects in a game map than our device cannot handle to calculate, our fps rates will drop down.

You may guess all of this objects cannot be updated at the same time. Program should handle them 1 by 1. So there is a list of items to be updated. Each time we build an object it will be added to this list. Apart from player units and cores imagine there is nothing in a map and we are building a router/sorter chain. Each object we build will be added to the update list like that:



After that, game will execute update function for each object we placed in an order we placed and draw a frame after this updates. Sorters in the chain we constructed are just teleporters. They beam items from one side to another if there is way to go. Thats why i selected them for our demonstration. Let's see what is happening inside this chain during all this updates and draws. With the help of ECAN Mindustry community advanced school teachers, we made an animated info-graphic let me explain our scene first:



We assume that we are building this chain from left to right. Gray boxes over conveyors and routers with numbers above is defining the update order of the chain. You have noticed that i removed the sorters from update list. This is for us to make tings look simple. Since they are just teleporters we don't need to see them in action. Green boxes with the update text in it means currently this object is being updated. Diamond shaped green object over the conveyor with smiley face is our item. When an item comes into the system it will be represented with a different color. Arrows below the conveyors and routers are the orientation of the next item that will get into the system.

Conveyors will always have a single orientation. But with the router behavior I just shown you above, we know that each time an item enters to a router it will change its next rotation, if there is a way to go there. You also need to know that routers have an item storage of 1. This means an item can get inside a router and can sit there until if there is a way to go.

Every object will be updated according to our current order one by one, from 1 to 7 and game will draw the last result for us the another frame will start. I will animate only 9 frames for this info-graphic:

Now carefully observe this animation (This is actually a larger image. Click on it to enlarge it):



The first item (green) was able to get out of the system on the first frame. But while doing it, it messed up the rotation order in the routers. This has caused a situation that all other items have to go back and forward until they find a way to get out from the system. It took 8 frames for the second item (purple) to leave. And when it leaves the system the rotation situation becomes the same as the 1st items leave. Which means every other item has to go over the same stages as the second item again and again. Can you imagine how hard and painful it is to live in a router chain if you were an item in Mindustry. If you don't feel pity for those items, you should feel pity for your devices processor.

This was an animation done with sorter / router chain. Now imagine what happens if this was a junction / router chain. Junctions has 12 item capacity and this is for every direction. I have to admit that it would be a huge project if i tried to animate that chain. But i have already demonstrated that router / junction chains are the slowest possible item transportation chain in Mindustry. They are even slower than standard conveyors. And this is freaking why. You can even observe this difference between entering and leaving items just looking at it by your very own eyes:



It is not even possible to insert a full titanium belt worth of items to such chains. You can clearly see that just by your eyes. It is that simple. If you don't believe me, experiment by yourself.

By the way i will going to disprove myself on the next section by abusing game mechanics. However that abuse is not reliable, so it is still safe to say the sentence above. Routers are freaking slow! If you don't know how to use them, they will ruin your game play also ours if you are building on multi player. Please stop using router/junction (or sorter) chains.
Changing the update order
Update order of the objects in game are defined by our build order. Let's change the update order of our chain by building it from right to left. We can do this by literally building the chain from right to left one by one. Or we can use the schematic system in game. This is very useful for doing tests on sandbox mode. I'll use the schematic system. For this specific chain we constructed i will do the steps one by one



I hold down F key and copied the chain above. After that i pressed Z to flip the schematic horizontally then i built it just below the main chain. With this, we have created a flipped version of the same system. If you observed carefully, my unit built the same chain with the same order. Still the first object updated will be the conveyor on the entering point. But when i copy the second chain and re-build it, it will completely change the designs build order like this:



The third system we have built has a different build order (and update order) from the systems above and it behaves totally different. It is way more faster than the "same chain" above. But unfortunately i will show you that this reverse order trick is not reliable just by deleting something from map:



As soon as i remove the first system, our fast chain becomes slow again, how and why? Let me explain why our slow chain becomes faster when we change the build order. Imagine i did the same steps with our info-graphic. After doing that i will have this result:



Starting arrows of the routers will be reversed. However because conveyors have only one orientation their arrows will stay same. Now let's observe the inside of this chain step by step, frame by frame (This is actually a larger image. Click to enlarge it):



Here we go. Because the update order of our is reverse this time, everything works different. Updates coming from right to the left are opening up enough space for a next item come in. Because there are no spaces between items there are no ways to go back and forward. Item transportation will be constant after frame 8 and a single item will be getting out from the system every single frame. Which means at 60 FPS you will be carrying 60 items per second. Which means you can insert 6 titanium belt worth of items to that chain.

Have a look at this design from one of our teachers at ECAN Mindustry community:

https://steamcommunity.com/sharedfiles/filedetails/?id=1929581947

This design perfectly demonstrates how could we use this update order behavior change if it was reliable. Please carefully observe the build order of the schematic. Our player builds it from left to right but schematics input and output positions are reversed. This creates a reverse ordered chain:



As you can see from this clever design, each chain handles more than a titanium worth of items. The chain above handles both coal and silicon coming from smelters. The one below handles 2x titanium worth of items + silicon coming from the smelters.

Unfortunately this system, and none of the systems using this reverse ordered chains are reliable. There are two ways to change this order. First is saving the map and reloading it. When a map reloads, all of the buildings in the save will be re chained from left to right, bottom to top according to their positions on the map. All of our tricks will be erased. The update list normally generated directly while we build stuff. But it will be re generated each time we load a map. Because the list will stored in the ram, instead of your hard drive. When we save such stuff on ram, it is easier and way more faster to read and change that information. Bad ting about it is, it will be deleted when we close our map.

Second way to mess up this build order is deleting stuff, anything from the map, as i already demonstrated above. For optimization reasons, developers have to keep that list as small as possible and easier to access as possible. When we remove objects from the game their positions on the update list will be empty. All remaining items will be repositioned and the empty places will be removed from the list. Imagine how many items we are creating during a map play. If game was not removing this items from the update list, it would fill in device memory quickly and game will run at 1 FPS after sometime.

There is no map that you don't delete and re-build something. So using this reverse update order behavior to our advantage is not reliable. Your system will fail because someone deleted just enough copper walls or conveyor belts around your design for example. Knowing this will help you to understand why some of your router chains are faster than others. Do not evaluate this situation like "router chains are not slow at all" Don't do this mistake. You will fail somehow.
What is next?
We now have covered all of the transportation components. We know how they exactly work, what kind of problems they can cause and how to fix them. What is the fastest way to transport items around.

On the next guide we will play with this components and we will learn how to distribute items to production buildings in an efficient way. We will look at to the common problems, even we generate problems and solve them with compact designs and see the puzzling side of the game. Thanks for reading. I hope this information somehow improves your game play experience.

Come with me to the second guide if you like:

https://steamcommunity.com/sharedfiles/filedetails/?id=1997547694



< >
101 Comments
MyProfile Jul 16, 2021 @ 3:09pm 
Best guide even if out of date. Following for further information and guides. Thanks.
HeRz_LoS Jun 13, 2021 @ 11:55am 
Super nice guide! Thanks for that
Serdar  [author] Jan 20, 2021 @ 11:36pm 
BinarySpike, Ridesdragons thank you very much for your attention. Yes this guide is still for v5. We are actually waiting for the updates to become less aggressive. 6.0 updates and patches come afterwards dramatically changed the properties on many key components that may cause an unstable guide during this period. And there is far more stuff to talk then before. I may say that new version of this guide is around 50% done. Still working on it.
Ridesdragons Jan 20, 2021 @ 10:44pm 
@BinarySpike yes, it does. the author has already stated that much of this is outdated for V6, and that there will be a guide for V6 at some point. this guide's for V5.
BinarySpike Jan 20, 2021 @ 6:00pm 
@Serdar, That means the "Sorters -" Section is outdated or incorrect.
Serdar  [author] Jan 19, 2021 @ 3:40am 
@BinarySpike
It is not broken, it is intentionally made this way in 6.0. Gates accepts items from a sorter. They are also able to send items to a sorter, only if that sorter is not adjacent to another sorter or a gate.
BinarySpike Jan 19, 2021 @ 12:29am 
Is Gate -> Inverted Sorter -> Gate broken ?

My inverted sorter's won't push into a gate if they are receiving from a gate.
Ridesdragons Nov 23, 2020 @ 3:23am 
ohp, seems my info on liquid junctions is old (a year old lol) and has long since been fixed. welp, nevermind I suppose lol

belts being based on FPS makes calculations so frustrating lol. if I get an FPS hiccup, suddenly the machine at the end of the line turns off because it's not getting enough input. makes late-game maps with lots of machinery annoying to deal with thanks to the fluctuations lol. also makes calculating effectiveness of setups difficult. maybe because my cpu isn't up to snuff anymore (i5 7th gen), but even in sandbox with nothing up I get random hiccups that cause minor fluctuations in belt throughput lol. I wonder why many games have calculations tied to FPS.
Ridesdragons Nov 23, 2020 @ 3:12am 
yea, I know this guide's for v5, you said before you were planning on making a v6 guide, and while this stuff is subject to change, I just thought I'd offer what I've found so far to potentially lower the workload on v6 release (they may not change, after all)

yea, regarding conduits that was my first thought, that they're pressure based, and thus would need periodic relays in order to maintain high pressure (kinda like factorio pumps, but here the only way to boost pressure mid-line would be to add a water extractor, which isn't very effective). it's just weird that, if I use tanks, I can have the liquid travel a very long distance with seemingly no loss in pressure, able to feed many machines and split off as I want. but the second I toss bridges or routers into the mix, the pressure nose-dives. didn't know about the liquid junctions being loss-less, though - I only knew they were cursed and so no one uses them lol
:3 Sweetness and Blushes  [author] Nov 22, 2020 @ 4:04pm 
There's also quite a few ways to load into a plast belt. Using a buffer such as bridge or a junction is the way to use them at their fullest.

For example, don't unload a full tit belt directly into a plast belt, instead, have a junction inbetween to act as a buffer.

Phase bridges are not effected by OD (seems to be on purpose)

I think it takes 2-3 loading points of a plast belt, to fully use the throughput, depending if they are in sync or not


This here can work as a junction/bridge for plast belts, being swappable for 3x(?) phase as well for extra length

https://cdn.discordapp.com/attachments/706798378117234731/765317536652460082/unknown.png

Here's a few examples of splitting plast belts, but I am unsure on how to convert plast to titanium with underflow for a reasonable footprint yet

https://cdn.discordapp.com/attachments/706798378117234731/780222238904418314/unknown.png