Difference between revisions of "Circuits"

From AAGRINDER wiki
Jump to navigationJump to search
(Rewrite for existing implementation)
(Update with new implementation of circuits, and mention future functionalities)
Line 1: Line 1:
 +
Many components can be used to build circuits in AAGRINDER.
  
There is currently an implementation of circuit logic in AAGRINDER. This implementation is planned to be removed and replaced by something completely different in the future.
+
=== cable <span style="color:#e0115f">─</span> ===
  
The components that take part in circuits, as they are currently implemented, are:
+
When placed, the cable physically connects to adjacent cables and other components. The cable can transmit power and data up to 32 blocks far. Every cable carrying power also carries data. This data is a single ASCII character, which originates from the power source.
* cable (<span style="color:#e0115f">─</span>)
 
* wire crossing (<span style="color:#e0115f">%</span>)
 
* ruby (<span style="color:#e0115f">R</span>)
 
* switch (<span style="color:#7f7f7f">S</span>)
 
* button (<span style="color:#7f7f7f">O</span>)
 
* trapdoor (<span style="color:#91702a">_</span>)
 
* grabber (<span style="color:#bd7c3d">0</span>)
 
* magnetite (<span style="color:#684043">m</span>)
 
  
in the future, motors and grinders will also be part of circuit logic, as well as multiple new blocks. But magnetite will no longer be used directly.
+
=== wire crossing <span style="color:#e0115f">%</span> ===
 +
 
 +
A wire crossing is used to cross two independent wires.
 +
 
 +
=== ruby <span style="color:#e0115f">R</span> ===
 +
 
 +
Ruby can be used as a constant power source with data R.
 +
 
 +
=== switch <span style="color:#7f7f7f">S</span> ===
 +
 
 +
The switch is a toggleable power source with data S, and can be toggled by right-clicking.
 +
 
 +
=== button <span style="color:#7f7f7f">O</span> ===
 +
 
 +
The button is a source of momentary power with data O, and can be triggered by right-clicking.
 +
 
 +
=== gate <span style="color:#c680ad">÷</span> ===
 +
 
 +
The gate has two inputs (left and right) and two outputs (top and bottom). It can be used as a logical NOT gate, a logical NOR gate, as well as for data comparison.
 +
 
 +
- By default, the outputs are on, emitting power with data :.
 +
 
 +
- If at least one of the inputs is on, the outputs turn off.
 +
 
 +
- If both inputs are on, and carrying identical data, the outputs turn on and emit matching data.
 +
 
 +
=== trapdoor <span style="color:#91702a">_</span> ===
 +
 
 +
The trapdoor opens when receiving any input, or when clicked
 +
 
 +
=== aascanner <span style="color:#7f7f7f">s</span> ===
 +
 
 +
The aascanner has two inputs (left and right) and one output (top). When receiving an input signal, the aascanner will scan the block underneath it and output corresponding data.
 +
 
 +
=== aaprinter <span style="color:#7f7f7f">p</span> ===
 +
 
 +
The aaprinter accepts input from any direction, and modifies a ? block in the opposite direction, to match the input data.
 +
 
 +
=== grinder <span style="color:#7f7f7f">G</span> ===
 +
 
 +
When powered, the grinder will attempt to dig all blocks touching it, except in the direction it was powered from. Some blocks are undiggable, and some decrease durability.
 +
 
 +
Successfuly collected items are placed into an adjacent chest (diagonals included). If it is not possible to place items in a chest, they are lost.
 +
 
 +
=== motor <span style="color:#9e2929">M</span> ===
 +
 
 +
The motor accepts input data w, a, s or d, and moves in the corresponding direction, pushing other blocks in front of it. If any other input data is given, the motor moves in the opposite direction where it was powered from.
 +
 
 +
The motor has a push limit of 32 blocks, but it is impossible to push certain materials, such as boulder and warp.
 +
 
 +
=== magnetite <span style="color:#684043">m</span> ===
 +
 
 +
When pushed by a motor, magnetite sticks to surrounding blocks, including other magnetite, allowing more complicated shapes to be moved by a single motor.
 +
 
 +
== Future additions ==
 +
 
 +
The following blocks are planned to be added in the future:
 +
 
 +
=== aaterminal ===
 +
 
 +
The aaterminal will have inputs and outputs.
 +
 
 +
Input data will be displayed on the player's screen, and buttons pressed by the player will be outputted as an output signal.
 +
 
 +
=== aafile ===
 +
 
 +
The aafile will contain a sequence of characters, which can be replayed on demand and outputted as a sequence of wire signals.

Revision as of 13:25, 21 January 2024

Many components can be used to build circuits in AAGRINDER.

cable

When placed, the cable physically connects to adjacent cables and other components. The cable can transmit power and data up to 32 blocks far. Every cable carrying power also carries data. This data is a single ASCII character, which originates from the power source.

wire crossing %

A wire crossing is used to cross two independent wires.

ruby R

Ruby can be used as a constant power source with data R.

switch S

The switch is a toggleable power source with data S, and can be toggled by right-clicking.

button O

The button is a source of momentary power with data O, and can be triggered by right-clicking.

gate ÷

The gate has two inputs (left and right) and two outputs (top and bottom). It can be used as a logical NOT gate, a logical NOR gate, as well as for data comparison.

- By default, the outputs are on, emitting power with data :.

- If at least one of the inputs is on, the outputs turn off.

- If both inputs are on, and carrying identical data, the outputs turn on and emit matching data.

trapdoor _

The trapdoor opens when receiving any input, or when clicked

aascanner s

The aascanner has two inputs (left and right) and one output (top). When receiving an input signal, the aascanner will scan the block underneath it and output corresponding data.

aaprinter p

The aaprinter accepts input from any direction, and modifies a ? block in the opposite direction, to match the input data.

grinder G

When powered, the grinder will attempt to dig all blocks touching it, except in the direction it was powered from. Some blocks are undiggable, and some decrease durability.

Successfuly collected items are placed into an adjacent chest (diagonals included). If it is not possible to place items in a chest, they are lost.

motor M

The motor accepts input data w, a, s or d, and moves in the corresponding direction, pushing other blocks in front of it. If any other input data is given, the motor moves in the opposite direction where it was powered from.

The motor has a push limit of 32 blocks, but it is impossible to push certain materials, such as boulder and warp.

magnetite m

When pushed by a motor, magnetite sticks to surrounding blocks, including other magnetite, allowing more complicated shapes to be moved by a single motor.

Future additions

The following blocks are planned to be added in the future:

aaterminal

The aaterminal will have inputs and outputs.

Input data will be displayed on the player's screen, and buttons pressed by the player will be outputted as an output signal.

aafile

The aafile will contain a sequence of characters, which can be replayed on demand and outputted as a sequence of wire signals.