JereTheJuggler
Spazmatism
Introduction
Ok, this is a guide to help with figuring out how to achieve many possible desired outcomes that can be achieved through counting in some way. This is something I figured out while messing around making a wire-intensive-contraption filled adventure map (which is still in the works). This circuit is easy to modify to achieve different results from using it, and it can have many applications, such as...
This circuit is constructed by following a pattern of faulty logic lamps that create a chain of any length and connecting all of their inputs to a single input source for the entire circuit. At any given time in this circuit, there is one faulty gate that is on and the rest of them are off, and with each activation of the circuit the on gate moves down the line one step.
Building the most basic circuit
Completed basic circuit
As you can see in the gif, every 5 times the switch is flipped, the torch is turned on/off.
But what about all the different uses I listed for it? Well, a lot of the uses require some modifications to this circuit. Before I start telling you how to modify it exactly, I'd like to establish some basic terminology to describe these circuits.
Terminology
Modifying the Circuit
A multiple-output circuit
A terminating circuit
A terminating circuit with an instant reset input
A terminating circuit with a step reset input
A looping single-output circuit with an instant reset input
Applications With Multiple Circuits
An N-second timer that uses multiple looping single-output circuits with an instant reset switch
Converting from base 10 to any other base
Some of you might have noticed something interesting going on with my timer in the previous application, and that's that I basically made a converter to base 3, although it would've made more sense if everything was flipped though so lower place values are to the right.
In the starting state, the three circuits can be imagined as displaying 000, and then after the first second they would read 001, and then 002, and then the second circuit is finally triggered and the first is reset, making it display 010. You can continue this trend until all three circuits are 1 activation away from being reset, and at that point they would read 222, which is the highest number you can represent with 3 ternary digits.
You can do this with any base, because the period of all the timers (they have to be the same) is the base you're converting to.
Conclusion
If anyone is still reading at this point, I'd like to say thanks, and I hope you're leaving with some useful information! These circuits have been extremely helpful for achieving desired effects in the adventure map I'm working on!
Ok, this is a guide to help with figuring out how to achieve many possible desired outcomes that can be achieved through counting in some way. This is something I figured out while messing around making a wire-intensive-contraption filled adventure map (which is still in the works). This circuit is easy to modify to achieve different results from using it, and it can have many applications, such as...
- Creating a counter that can be both incremented and decremented
- Reducing any number of activations into the circuit to a single pulse coming out of the circuit
- Converting base 10 to any other base
- Making an N-second timer that can be interrupted and reset with a single pulse
This circuit is constructed by following a pattern of faulty logic lamps that create a chain of any length and connecting all of their inputs to a single input source for the entire circuit. At any given time in this circuit, there is one faulty gate that is on and the rest of them are off, and with each activation of the circuit the on gate moves down the line one step.
Building the most basic circuit
Step 1:
First thing you have to do is decide how many inputs you want required for a single output, and then you must decide whether you want activation to go from left to right or vice versa.
Throughout this tutorial we will be making a circuit going from left to right that makes it so you flip a switch 7 times in order to turn a torch on/off as an example.
Step 2:
However many activations you want your circuit to require, you make that number of faulty logic gates at the same height with a gap between them. If you want activation to go from left to right, then the leftmost gate is the only one on, otherwise the rightmost gate is the only one on.
Step 3:
Make a wire connecting the inputs for all of the gates that goes to the input source for your circuit (switch, timer, pressure plate, etc.)
Step 4:
For each gate except the one on the opposite side of your starting gate, connect them using two colors that aren't the same as in step 3 in an alternating pattern so that you go from the gate's output, through its lamp, and into the next gate's lamp.
Step 5:
Using the last color of wire you haven't used yet, make a wire that goes from the last gate's output, through its lamp, and over the top of the circuit to loop around and connect to the first gate's lamp.
Step 6:
Make a wire branching off the one you made in the last step going to your output (trap, torch, teleporter, conveyor belt, etc.)
And then you're done!
First thing you have to do is decide how many inputs you want required for a single output, and then you must decide whether you want activation to go from left to right or vice versa.
Throughout this tutorial we will be making a circuit going from left to right that makes it so you flip a switch 7 times in order to turn a torch on/off as an example.
Step 2:
However many activations you want your circuit to require, you make that number of faulty logic gates at the same height with a gap between them. If you want activation to go from left to right, then the leftmost gate is the only one on, otherwise the rightmost gate is the only one on.
Step 3:
Make a wire connecting the inputs for all of the gates that goes to the input source for your circuit (switch, timer, pressure plate, etc.)
Step 4:
For each gate except the one on the opposite side of your starting gate, connect them using two colors that aren't the same as in step 3 in an alternating pattern so that you go from the gate's output, through its lamp, and into the next gate's lamp.
Step 5:
Using the last color of wire you haven't used yet, make a wire that goes from the last gate's output, through its lamp, and over the top of the circuit to loop around and connect to the first gate's lamp.
Step 6:
Make a wire branching off the one you made in the last step going to your output (trap, torch, teleporter, conveyor belt, etc.)
And then you're done!
But what about all the different uses I listed for it? Well, a lot of the uses require some modifications to this circuit. Before I start telling you how to modify it exactly, I'd like to establish some basic terminology to describe these circuits.
Terminology
Period
The number of gates that the circuit cycles through.
Multiple Output vs. Single Output
If a circuit just has one output that happens once every cycle, then it is single output. If a circuit has a different output for each input, then it is multiple output.
Looping vs. Terminating
If the circuit doesn't reset itself after it's final output allowing for it to be gone through again, then it is terminating. If the circuit works like the one in the gif above where you can repeat the process any number of times, then it is looping.
Step Reset vs. Instant Reset
In the more advanced modifications to the circuit, there will be a second input that can be used to reverse progress in the circuit. If that input causes all progress to be lost at once resulting in the circuit going back to it's starting state, it is instant reset. If the second input causes just one activation to be undone, then it is step reset.
Multiple Output vs. Single Output
If a circuit just has one output that happens once every cycle, then it is single output. If a circuit has a different output for each input, then it is multiple output.
Looping vs. Terminating
If the circuit doesn't reset itself after it's final output allowing for it to be gone through again, then it is terminating. If the circuit works like the one in the gif above where you can repeat the process any number of times, then it is looping.
Step Reset vs. Instant Reset
In the more advanced modifications to the circuit, there will be a second input that can be used to reverse progress in the circuit. If that input causes all progress to be lost at once resulting in the circuit going back to it's starting state, it is instant reset. If the second input causes just one activation to be undone, then it is step reset.
Modifying the Circuit
A multiple-output circuit
The most simplistic variation is to make the circuit so that instead of having one output every certain amount of inputs you have a different output that occurs with each input. This can be helpful if you want to make a gauge using torches that "fills up" with every input to the circuit.
This can be achieved by making wires come off of the ones that are the outputs for the faulty gates. If you don't want to have any output on say the 4th input then just don't make a wire coming out of the 4th gate!
And just for fun, I decided to make a version with a rapid input from a hoiking target dummy
This can be achieved by making wires come off of the ones that are the outputs for the faulty gates. If you don't want to have any output on say the 4th input then just don't make a wire coming out of the 4th gate!
Another extremely simple variation is to make it so once the circuit completes one cycle it doesn't get reset back to it's starting state. This can be achieved by just removing the wire that comes out of your final gate connecting to the first gate's lamp.
As you can see in the gif, after one cycle through the circuit is completed no more input will have an effect on it.
Ok, now for the fun stuff, circuits with two inputs. The most basic circuit with two inputs can be made by altering a terminating simple circuit. This can be useful if (yet again) you are trying to make a gauge with torches lighting up to show progress. With this setup, once the gauge is filled, it can't continue filling (which would actually be wrapping around and turning off all the torches again), but it can also be reset at any time.
You start by adding a second line of faulty logic gates. All of them off and there is one for each member of the first set of gates. Like the first set, you connect the inputs for all the gates to whatever you want to trigger a reset (red switch in this case). Next step is to make a wire coming from each of the first set of gates' outputs that goes through their corresponding reset gate's lamp and into the output.
In the gif, you can see that as I flip the green input switch, the circuit advances until it has completed a full cycle and then never again until the reset switch is flipped. I didn't show it, but the reset switch could be flipped at any time to revert the circuit back to it's starting state.
You start by adding a second line of faulty logic gates. All of them off and there is one for each member of the first set of gates. Like the first set, you connect the inputs for all the gates to whatever you want to trigger a reset (red switch in this case). Next step is to make a wire coming from each of the first set of gates' outputs that goes through their corresponding reset gate's lamp and into the output.
This version is almost the same as the last one with one tiny adjustment so that instead of completely resetting the circuit with the reset switch, it only undoes the actions of the previous input. This would be useful if you want to make a counter that you can increment and decrement.
To make this modification, you just need to add one wire to all the reset gates so that they trigger the lamp of the gate in the opposite direction of the circuit's flow.
This gif shows that the input still progresses the circuit one step each time until the cycle is completed, but when the reset switch is flipped, it only undoes one activation instead of completely returning the circuit to its starting state.
To make this modification, you just need to add one wire to all the reset gates so that they trigger the lamp of the gate in the opposite direction of the circuit's flow.
This circuit can be useful if you want to make an N-Second timer (where N is the period of the circuit multiplied by the timer's original duration) that can be interrupted and reset.
The trick with this is that whatever period you want the circuit to be, you start off with a terminating single-output circuit with an instant reset input with a period of one less than that. You then make another faulty gate for the top row, but do not make it a partner for the second row. Extend the circuit's input wire to include the new gate. Remove the wiring for the gate that was last in the base circuit and replace it with the appropriate color to continue the pattern, but don't have it lead to your circuit's output. Instead, it should lead to the lamp in the new gate. Now with that last color back to being unused again, make a wire coming from the new gate's output that goes into all the inputs for the reset gates. Make a wire branching off of the wire you just made to your circuit's output.
The gif shows that the circuit loops as you would expect, but the reset switch doesn't ever undo the completion of a loop, which would result in changing the final output. Instead, it cancels the current cycle the circuit is going through, resetting it back to its original state.
A word of warning if you try to make this a multiple output circuit. The way it works is that the output of the base circuit is basically another reset switch for it. If you just branch off the gate outputs then it will always be as if you complete one cycle and then immediately hit the reset on the base circuit.
A word of warning if you try to make this a multiple output circuit. The way it works is that the output of the base circuit is basically another reset switch for it. If you just branch off the gate outputs then it will always be as if you complete one cycle and then immediately hit the reset on the base circuit.
An N-second timer that uses multiple looping single-output circuits with an instant reset switch
Ok, so with a single one of ^those^ circuits, the period would be multiplied by the timer's original duration to get how long it would take for the whole circuit to fire. But what if that circuit fired into another one of those circuits? Long story short, you can achieve longer duration timers while saving space and resources if you have more than one circuit. For example, let's say you have a 1 second timer. you feed that through one of those circuits with a period of 4 to make the equivalent of a 4 second timer. You take your "4 second timer" and have that input to a copy of the same circuit and you now have a 16 second timer. To accomplish this feat with one circuit, you'd have to use 31 gates (16 for the period with a reset gate for all but the last one), while the two 4 period circuits only use 7 gates each.
So enough with all these words, let's see how to set it up and see it in action. As you can see below, setting it up is exactly as simple as it sounds. You just make more of the same type of circuit (same period isn't necessary) and use the output from the previous circuits as the input for the next circuits. All you have to do after that is connect all the circuits' reset wires together so that they're all reset from the same input.
I went a little further than in my example above and made 3 circuits each with a period of 3 with a 1 second timer as the input. the first circuit's duration is 1x3, so 3 seconds. That feeds into the second circuit so it's duration is 3x3, so 9 seconds. That again feeds into the final circuit, so the total duration is 9x3, so 27 seconds.
These 3 circuits use only 5 gates each, bringing the total to 15 gates for a 27 second timer, whereas the same feat with one circuit would use 53 gates.
In this gif you can see that it takes 27 seconds for it to get back to it's starting state the first time because I did not interfere with it, and chat was off-screen, but the announcement box said "27 seconds passed without a reset!". The second time it starts going, I hit the reset switch midway through, resetting the timer back to 0.
So enough with all these words, let's see how to set it up and see it in action. As you can see below, setting it up is exactly as simple as it sounds. You just make more of the same type of circuit (same period isn't necessary) and use the output from the previous circuits as the input for the next circuits. All you have to do after that is connect all the circuits' reset wires together so that they're all reset from the same input.
I went a little further than in my example above and made 3 circuits each with a period of 3 with a 1 second timer as the input. the first circuit's duration is 1x3, so 3 seconds. That feeds into the second circuit so it's duration is 3x3, so 9 seconds. That again feeds into the final circuit, so the total duration is 9x3, so 27 seconds.
These 3 circuits use only 5 gates each, bringing the total to 15 gates for a 27 second timer, whereas the same feat with one circuit would use 53 gates.
Some of you might have noticed something interesting going on with my timer in the previous application, and that's that I basically made a converter to base 3, although it would've made more sense if everything was flipped though so lower place values are to the right.
In the starting state, the three circuits can be imagined as displaying 000, and then after the first second they would read 001, and then 002, and then the second circuit is finally triggered and the first is reset, making it display 010. You can continue this trend until all three circuits are 1 activation away from being reset, and at that point they would read 222, which is the highest number you can represent with 3 ternary digits.
You can do this with any base, because the period of all the timers (they have to be the same) is the base you're converting to.
Conclusion
If anyone is still reading at this point, I'd like to say thanks, and I hope you're leaving with some useful information! These circuits have been extremely helpful for achieving desired effects in the adventure map I'm working on!
Last edited: