This week's Friday Facts is brought to you by Robert, also known as that guy from Romania. I'll be talking a bit about the feature I've been working on: the Combinators. The post is very fresh: Albert worked overnight to bring you the awesome combinator graphics and I integrated them in the game just minutes ago.
The combinators are new entities that connect to the Circuit Network. As a quick reminder, the circuit network is a network you create by connecting entities using red and green wires. The information on the network is just a list of items and their count. Before, only the Smart Chests and Smart Inserter were connectible to the circuit network.
The plan is that many more entities will be connectible to the Circuit Network and with the help of the Combinators, you will be able to have more control over your factory. Here are some entities that are planned to be connectible to the Circuit Network:
The circuit network has been modified a bit. You can now connect wires directly between entities. Also every time you connect both red and green wires to an entity, their signals are summed inside the entity and this sum is considered the "input".
So these combinators, what do they do? They manipulate the signals on the Circuit Network. At the moment there are 3 types of combinators:
Arithmetic Combinator:
It has an input and an output. The input and output have 2 independent connections(red and green). It can preform the basic arithmetic operations (+, -, /, *) on the specified signals.
In the first example, it will sum the number of Copper Ores on the signal with the number of Iron Ores and output this sum as Red Science Packs. You can later use this signal to make other decisions. The second parameter can also be a number, as seen in the second example.
Decider Combinator:
It also has an input and an output. It's functionality is similar to what the Smart Inserter did before. It can compare item signals.
In the first example, if the number of Electronic Circuits is less than the number of Advanced Circuits it will send a green Science Pack signal with the count of 1. In the second picture, the steel plates are sent to the output only if there are more than 5000 of them.
Constant Combinator:
This one is simple. It sends the specified signals with the specified counts. It acts as a smart chest, without having to put the items in it.
Most of the basic stuff can be done easily, but let me show you how the combinators can be used to make more advanced things like logic gates, memory cells and timers.
Many people wanted to be able to make logic gates with binary signal. It's actually easy to do it. For example, we can say that red Science Pack is our "true" signal. One red Science Pack means true, zero red Science Packs means false. Our 2 input signals can be the red and green wires. Remember: every time you connect both red and green wires to an entity, their signals are summed inside the entity and this sum is considered the "input". Keeping that in mind, this is how the logic operations are implemented:
AND | OR | XOR | NOT |
One neat thing we can do is connect the output to the input. Using this we can make a memory cell.
A memory cell has a set and a reset signal. In our case the set signal is red Science Pack and the reset signal is green Science Pack. The output signal is red Science Pack
By making a loop from the output to the input, the signals are summed and count up very fast. This way, we can make a timer.
The lamp you see is a small experiment with a type of lamp that is more visible when connected to the Circuit Network. See the video below :)
It may not be obvious at first, but these combinators can really do cool things, especially after many more entities become connectible to the Circuit Network. For example:
Now I am really looking forward to see what crazy things the players will make.
Rate, comment, or suggest better names for the combinators at the forums.