Skip to content

Instantly share code, notes, and snippets.

@malte0811
Created August 15, 2018 12:06
Show Gist options
  • Save malte0811/c1ad8a86764bd3216b253200cedee7af to your computer and use it in GitHub Desktop.
Save malte0811/c1ad8a86764bd3216b253200cedee7af to your computer and use it in GitHub Desktop.
First draft of the IE computer/logic box

IE Logic box (Name TBD), first draft

  • Rack-mountable circuit boards
  • Racks:
    • ~4 boards per rack block
    • no GUI for the racks, boards are added/removed by right-clicking
    • Circuit boards should be rendered with the appropriate number of tubes by default, but some sort of front cover should be available
    • Racks can be stacked
    • Art concept: "Walls" on three sides, "floor" and "ceiling" on the end of a stack. Left wall has the input wire bus, right wall the output wires and back wall the power wires
    • Each stack of racks must contain exactly one IO block: 2 RS wires (one for input, one for output) and one power input
      • Maybe: Two types of IO, buffered and instantaneous
        • Buffered: signal changes are processed once per tick (ITickable#update)
        • Instantaneous: signal changes are processed immediately (up to 10? times per tick). This could allow for some sort of "loop" behavior, but makes the behavior of some of the circuits difficult. On the other hand buffered will cause delays depending on TE update order.
      • Both continuous (heater) and "pulsed" (only when signal changes are processed) energy consumption
  • Each board can hold a fixed number of vacuum tubes (16 or 25?)
  • If anyone can turn this into a mechanic that works gameplay-wise: Tubes have a chance to fail when power is reapplied after power loss (like incandescent light bulbs)
  • Boards:
    • Created using some sort of GUI (something like a schematic editor using high(ish)-level components, TBD)
      • Circuits require vacuum tubes (possibly a new, cheaper "logic" version), copper wire, graphite (for resistors) and possibly something for capacitors, amounts depend roughly on what the IRL circuit would require
      • Passive components (resistors, caps, wires) take no or very little space (don't impact the 16/25 tube limit)
    • All internal connections are 0-255 signal strength. Input signals become 17*<RS strength>, output is floor(<internal strength>/17)
      • Circuits are available to convert a 2-RS-channel 0-255 signal into a "proper" signal
    • Each board has "free" inputs with full (255) and zero strength
    • The circuit on a board has to form an directed acyclic graph (no loops), this means there's a topological order and evaluating is easy. This will likely make UI design more difficult
    • Available circuits/components:
      • Basic gates: AND, OR, NOT (How should these react to analog inputs? For IRL integrated circuits the behavior is usually "undefined")
      • RS latch, D flipflop
      • "Voltage divider" (two (or more?) resistors in series), multiplies a signal by a factor in (0, 1)
      • Amplifier, multiplies a signal by a factor in (1, +inf), clamps output to 255 if too big
      • Integrator (wrapping, with a "overflow" output so it can be used as a timer), adds the input values of each time step
      • Differentiator (probably with one "absolute value" and one "sign" output), outputs the difference between the current and the last signal
      • Comparator, compares two signals and outputs 255 or 0 depending on which one is stronger
      • Adder (Maybe with a sign input for the second input)
      • Combiner/separator, convert between 2-RS-signal 0-255 signals and the internal 0-255 signals. The former could be made using an adder and two dividers, but the latter can't be easily made AFAIK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment