How do signals and logic gates work in Sandustry?
Sandustry has a complete wired logic system and almost no published tutorial for it. This page lists every part the official wiki documents, with the two behaviours that will catch you out.
Quick answer
Every signal in Sandustry travels along a wire you draw with the Signal Linker: click and drag from the sending device to the receiving device. The wire itself reports the state — green while the sender is transmitting on, red otherwise. Inputs are the Signal Switch (constant on or off, toggled by clicking), the Signal Button (one brief pulse), and three 4x4 area sensors: Signal Sensor fires constantly while its area is full, Pulse Sensor fires once when the area fills and resets when it empties, Presence Sensor fires while at least one element is inside. Between them sit the Buffer (forwards input unchanged, used to reach further), the Toggle (T-FlipFlop) memory bit that flips on each rising edge, and seven gates: AND, OR, NOT, NAND, NOR, XOR, XNOR. Output is shown by the Signal Lamp.
Steps
- Place the sending device and the receiving device. Every documented part except the Signal Linker itself is a placed building.
- Take the Signal Linker and drag from sender to receiver. The wiki describes the action as pressing senders and receivers and dragging to wire them.
- Read the wire colour instead of guessing. Green means the sending device is transmitting on. Red means it is not. This is the only state readout the wiki documents besides the Signal Lamp.
- Pick the input that matches the shape of the signal you want. A Signal Switch holds its state until you click it again. A Signal Button emits one brief on and stops.
- Pick the sensor that matches the condition you are testing. Full 4x4 area, constant output: Signal Sensor. Full 4x4 area, one shot: Pulse Sensor. Any element at all present: Presence Sensor.
- Put a Toggle (T-FlipFlop) after a pulse source when you want a button to latch. It is the only memory element the wiki documents, and it can also be flipped by clicking it directly.
- Add a Signal Lamp anywhere you want to see a state without tracing wire colours.
Requirements / limits
- The NOT gate is the exception to the multi-input rule. Its own page states it requires exactly one input, and that it can physically accept more but will then only ever output off. Every other gate is documented as accepting input from multiple Signal Linkers.
- XOR and XNOR are documented by parity, not by pairs: XOR outputs on when an odd number of inputs are on, XNOR when an even number are. With more than two inputs that is not the same as "exactly one" or "both the same".
- Signal Sensor and Pulse Sensor share the same trigger condition — a full 4x4 area — and differ only in whether the output is held or fired once. The Presence Sensor is the one with a different condition.
- The Buffer changes nothing about the signal. Its documented purpose is reach.
- The wiki does not document a repeater, a delay element, a counter, or any numeric signal. A Repeater page is linked from the navigation but has not been written.
- No official source publishes a signal range limit, a tick rate, or a wire count limit.
Common mistakes
- Wiring several inputs into a NOT gate as if it inverted their combination. It does not — it goes off and stays off. Use NOR for that.
- Reaching for the Signal Sensor when you meant the Presence Sensor. The Signal Sensor waits for a completely full 4x4 area, which a trickling line may never reach.
- Expecting a Signal Button to hold. It pulses. If you need it to stay on, run it into a Toggle.
- Treating XOR as an exclusive-one gate on a three-input wire. The wiki's stated rule is odd parity.
- Chaining Buffers to try to delay a signal. Nothing published says the Buffer costs time.
Still unverified
- Is there a propagation delay, and is it measurable in ticks?Not verifiedNo published source describes signal timing. The Toggle is documented as firing on a rising edge, which implies edges exist, but nothing states how long one lasts.
- Which buildings can be driven by a signal?Not verifiedThe wiki documents the signal parts themselves. It does not publish a list of receivers, so this page describes the system rather than claiming what it can switch.
- At which research tier does the logic set unlock?Not verifiedNo published source ties these parts to a tier.