Difference between revisions of "Circuits"

From AAGRINDER wiki
Jump to navigationJump to search
(Update with new implementation of circuits, and mention future functionalities)
(→‎wire ─: mention one-way gate)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
Many components can be used to build circuits in AAGRINDER.
 
Many components can be used to build circuits in AAGRINDER.
  
=== cable <span style="color:#e0115f">─</span> ===
+
=== wire <span style="color:#e0115f">─</span> ===
  
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.
+
When placed, the wire physically connects to adjacent cables and other components. The wire can transmit power and data up to 16 blocks far. Every wire carrying power also carries data. This data is a single ASCII character, which originates from the power source.
 +
 
 +
As of [https://gitlab.com/MRAAGH/aagrinder/-/commit/65a6f64cf4c1f851c7a65721d9c05f3a4330c270 4th August 2024], it is possible to make a one-way gate with a certain configuration of wires. When adjacent wires are placed, they both immediately connect together. Afterwards, it is possible to rotate them, by right-clicking with another wire. This way, one can achieve a wire pointing towards another wire which is not pointing back. This pattern functions as a one-way gate for signals.
  
 
=== wire crossing <span style="color:#e0115f">%</span> ===
 
=== wire crossing <span style="color:#e0115f">%</span> ===
Line 27: Line 29:
 
- By default, the outputs are on, emitting power with data :.
 
- By default, the outputs are on, emitting power with data :.
  
- If at least one of the inputs is on, the outputs turn off.
+
- If at least one of the inputs is on, the outputs turn off. This NOR-gate functionality allows building arbitrary logic, making AAGRINDER turing-complete.
  
- If both inputs are on, and carrying identical data, the outputs turn on and emit matching data.
+
- If both inputs are on, and carrying identical data, the outputs turn on and emit matching data. This allows comparing and filtering data.
  
 
=== trapdoor <span style="color:#91702a">_</span> ===
 
=== trapdoor <span style="color:#91702a">_</span> ===
Line 41: Line 43:
 
=== aaprinter <span style="color:#7f7f7f">p</span> ===
 
=== 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.
+
The aaprinter accepts input from any direction, and modifies all adjacent ? blocks to match the input data.
  
 
=== grinder <span style="color:#7f7f7f">G</span> ===
 
=== grinder <span style="color:#7f7f7f">G</span> ===
Line 51: Line 53:
 
=== motor <span style="color:#9e2929">M</span> ===
 
=== 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.
+
see [[Motor]]
 +
 
 +
The motor accepts input data w, a, s or d, and moves in the corresponding direction, pushing other blocks in front of it.
 +
 
 +
Alternatively, if any other input data is given (other than w/a/s/d), 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.
+
The motor has a push limit of 48 blocks, but it is impossible to push certain materials, such as boulder and warp.
  
 
=== magnetite <span style="color:#684043">m</span> ===
 
=== 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.
 
When pushed by a motor, magnetite sticks to surrounding blocks, including other magnetite, allowing more complicated shapes to be moved by a single motor.
 +
 +
Magnetite functionality was inspired by slime block from Minecraft.
  
 
== Future additions ==
 
== Future additions ==
Line 67: Line 75:
 
The aaterminal will have inputs and outputs.
 
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.
+
When interacted with, it will work as a basic terminal device. Keys pressed by the player will be outputted on the output wire, meanwhile input data will be displayed on the player's screen.
  
 
=== aafile ===
 
=== aafile ===
  
 
The aafile will contain a sequence of characters, which can be replayed on demand and outputted as a sequence of wire signals.
 
The aafile will contain a sequence of characters, which can be replayed on demand and outputted as a sequence of wire signals.

Latest revision as of 10:43, 5 August 2024

Many components can be used to build circuits in AAGRINDER.

wire [edit]

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

As of 4th August 2024, it is possible to make a one-way gate with a certain configuration of wires. When adjacent wires are placed, they both immediately connect together. Afterwards, it is possible to rotate them, by right-clicking with another wire. This way, one can achieve a wire pointing towards another wire which is not pointing back. This pattern functions as a one-way gate for signals.

wire crossing %[edit]

A wire crossing is used to cross two independent wires.

ruby R[edit]

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

switch S[edit]

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

button O[edit]

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

gate ÷[edit]

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. This NOR-gate functionality allows building arbitrary logic, making AAGRINDER turing-complete.

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

trapdoor _[edit]

The trapdoor opens when receiving any input, or when clicked

aascanner s[edit]

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[edit]

The aaprinter accepts input from any direction, and modifies all adjacent ? blocks to match the input data.

grinder G[edit]

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[edit]

see Motor

The motor accepts input data w, a, s or d, and moves in the corresponding direction, pushing other blocks in front of it.

Alternatively, if any other input data is given (other than w/a/s/d), the motor moves in the opposite direction where it was powered from.

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

magnetite m[edit]

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

Magnetite functionality was inspired by slime block from Minecraft.

Future additions[edit]

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

aaterminal[edit]

The aaterminal will have inputs and outputs.

When interacted with, it will work as a basic terminal device. Keys pressed by the player will be outputted on the output wire, meanwhile input data will be displayed on the player's screen.

aafile[edit]

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