Question Question - is this possible? (extended shifter)

Laluzi

Skeletron
For some reason, Terraria mechanics have always been pretty impenetrable to me. I can figure out how things work by trial and error, but actually designing solutions baffles me - which is kind of embarrassing considering I'm usually good at this sort of thing. I guess it's like a coding language I perpetually can't figure out.

Anyway. I know how to create a simple barrel shifter connected to a timer, and I can use that for chains of lights or gemspark blocks I want to move in strings. If I've got a setup like 111000111000, I can move it to 110001110001 -> 100011100011 and so on.

But that requires consistent chains and a general lack of states. In one of my worlds, I'm trying to create a rolling stock ticker - dark background with bright text scrolling sideways. Activated and inactive gemspark blocks. So instead of something like

111000111000
111000111000
111000111000

It would be more like

010000100110
011111100110
010000100110

and I'd want it to go like

100001001100
111111001100
100001001100

000010011001
111110011001
000010011001

000100110010
111100110011
000100110010

Now magnify this 12-long chain and make it something like 30, with different configurations it needs to preserve. Can this be done in Terraria?
 
So, do you mean something like this?

Capture 2019-07-30 19_09_36.png


This is basically just a bunch of shifters on top of each other, with displays between the bits. The only tricky part after this would be getting the signal from one side back to the other. You can do that with standard wire wrangling techniques if you don't have too many rows. Otherwise, you could use this stuff: PC - Serializing data - save wire, space and nerves
 
Thank you! I kind of figured the answer would involve a giant mechanism, but at least it's a simple one.

Wouldn't you just connect the last one to the first and treat it like a next-block-in-sequence? Or does that result in infinite loops where everything gets pinged multiple times per tick?

Also, would this be a good time to ask if the faulty gate is really just a 'switch state when it receives a signal' gate? I never pinned that down, and it seems counterintuitive, but given how it's always used...
 
Wouldn't you just connect the last one to the first and treat it like a next-block-in-sequence? Or does that result in infinite loops where everything gets pinged multiple times per tick?
Yeah, you can just connect them. But what I was trying to say, is that if you have, like, a couple dozen rows, the wiring for these loopbacks is gonna take up a lot of space. That's why you might want to use the serial trick. Serial is more compact, but it is also more processing intensive, so if you have a lot if it, things can get laggy.

Infinite loops physically can't happen in terraria, because of the smoke mechanic.

Also, would this be a good time to ask if the faulty gate is really just a 'switch state when it receives a signal' gate? I never pinned that down, and it seems counterintuitive, but given how it's always used...
The one lamp faulty gate is basically a transistor. A sort of "signal gate".

Faulty gates, when their faulty lamp is triggered, will generate a signal with a probability determined by the ration of ON gates to OFF gates. If the lamp here is ON, we get an output with a 1/1 chance, when it’s OFF we get it with a 0/1 chance. This effectively acts as a transistor. The state of the lamp (the base) determines whether the signal can pass from the faulty lamp (the collector) to the gate’s output (the emitter).
 
Back
Top Bottom