An explanation of logic gates

Was this helpful?

  • Yes

    Votes: 10 100.0%
  • No

    Votes: 0 0.0%

  • Total voters
    10
I meant using the new logic gates. There's no information that a teleporter signal can be used through the "block logic gate". The old ones using hoiks or tracks sure, but that requires a lot more space to work.

The gates, new or old, it doesn't matter, take a signal and modify it. The game doesn't care if it was the player himself or a source external to him who provided the impulse to activate a pair of teleporters.
 
Actually, I wonder if the new logic system is a constant or specific signal system versus the current simple arbitrary pulse system.

The current system just sends a signal arbitrary signal that mechanism just see as a sign to just "do something". Lights, actuators, etc. just invert states (On/Off, actuated, non-actuated, and vice versa.) Other mechanisms (like the pump and traps) activate/fire-off once per pulse (plus any cool-down time, of course). ON/OFF signals are wholly arbitrary and dependent on the initial states of mechanisms that can switch states.

Will the new logic gates use a continuous signal? (I doubt it... Though having a continuous signal would do wonders for simple auto-traps, pump systems, and statue farms - which is why I doubt this will be the case.) What about definitive ON/OFF commands/pulses? Will a properly activated logic gate always send an ON signal/command/pulse regardless of the state of the mechanism? As an example: I connect an OFF gate to an ON torch. Will triggering the gate to ON force the torch OFF or will it stay on until the gate signal disappears?

Well, find out soon enough. Looking forward to this Sunday... (Or Monday since I have the GoG.com version of Terraria.)
 
Considering the current workings of the wiring, i suppose it will be strictly sending signals when the logic gate is activated and deactivated. This means that a torch at the receiving end gets a pulse each time the state of the gate changes.

This is in some part shown in the gif presenting the AND gate and changing its input states. This way it's way simpler to implement than continuous signal. If the latter were implemented then the whole Terraria would be changed...
 
This is in some part shown in the gif presenting the AND gate and changing its input states. This way it's way simpler to implement than continuous signal. [...]
I take it you either didn't understand or quite read the latter part of that paragraph entirely. Other than a continuous signal (which I already stated I doubt would happen anyway), I also mentioned discreet HI/LO (ON/OFF) signals rather than the current generic and ambiguous "activate/invert state" signal with have now. As in:
  • Flipping a gate ON causes any OFF mechanism to TURN ON and any ON mechanism to STAY ON.
  • Flipping a gate OFF causes any OFF mechanism to STAY OFF and any ON mechanism to TURN OFF.
The current system just inverts a states any time a signal is received. All you have is ON/OFF and OFF/ON. No ON/ON and OFF/OFF state "changes" based on the signal.

Trigger-state (pulse) signals are quite useful (e.g. clock-pulse), but having "steady-state" signals would take Terraria engineering to another level. In this case, not a true steady-state signal, but actual discreet and defined TURN ON or TURN OFF signals instead of the currently ambiguous "Switch State"-only signals we can work with.

NOTE: Please excuse my use of capitals in this post. It's not so much for emphasis as it is for clarity so you can see terms I'm using in a technical-ish way.
 
The current system just inverts a states any time a signal is received. All you have is ON/OFF and OFF/ON. No ON/ON and OFF/OFF state "changes" based on the signal.

The current system also allows us to use either an internal or global reset to ensure the gates work properly and not just as mere flip-flops. In an AND gate for instance if you flip both switches to the ON state you will always generate an ON output as opposed to alternating between ON and OFF so long as you attach a state detector which tuns any output ON signal to OFF, and keeps an OFF signal OFF prior to the inputs generating an output.

From the gifs that showcased the 1.3.1 AND gate, it seems that the function is achieved through mere pulses. The square box to which the output is connected likely sends a pulse when it it activated, and another pulse when it is deactivated. For the AND gate both input switches have to be activated to turn on the box and have it send an output impulse. When either switch is flipped again (to the "OFF" state), it sends a pulse to the gate switching the square box off, which in turn sends a pulse to the output, switching it off as well. This circumvents the need for a local/global reset because the output automatically resets when the input switches are reset.
 
I think it will be more helpful to have this discussion once we've seen exactly how they work. Not that there's anything wrong with a little speculation, but if you are a total newbie to logic circuits and/or Terraria wiring mechanics, I think reading through this thread may well be more confusing than clarifying. No doubt once the Terraria-playing public has this update in their hands a full explanation of what each gate does will be on the wiki in fairly short order. As of right now, I have a pretty good idea how they work, but there are still a few gaps and I personally don't feel like I could really explain it to someone without potentially spreading misinformation.
 
Well, the original purpose of the thread was to explain/discuss logic gates in general. I'm the idiot who wound up derailing it a bit with my speculation on the low-level functionality of the in-game implementation. It wasn't intended, but it happened.

Logic gates themselves are the same in functionality simple to explain, relatively speaking. What's different is how you would emulate them under the hood in something like Terraria. Something like an AND gate by definition will always trigger when all its inputs are active. The question I had and was wondering on was how the game handled the resulting output signals. Just ignore my musings and the thread will make far more sense. (Basically just pay attention to the first page and ignore this one ^_~)
 
Fair enough. For what it's worth, as best I can tell (subject to the warning above) the way Terraria logic gates work is that the "input terminals" (don't know if we've heard an official name for them, those gray line things) store a true/false value to kind of simulate having continuous input. And any time those change, the gate checks if the final true/false value should change. If so, it sends a signal to its output. So an OR gate would not send a signal when its inputs change from 0,1 to 1,1, but an AND gate or XOR gate would. Even though the AND gate becomes true, and the XOR gate becomes false, the practical result would be the same.
 
My thoughts on logic gates got more complex after my second pair of ideas for teleporting (new thread). Will the output go out at the same tick as the input signal hits? Basically it would be two seperate signals going (on different wires), so should they go at the same tick, as they originate from one previous signal? What about logic gates between teleporters?

To stop my rambling... The more you think about a subject, the more ideas pop out and even more you want to think about good results :)
 
Back
Top Bottom