Wire: Difference between revisions

471 bytes added ,  1 January 2021
no edit summary
m (section case and spacing)
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 7: Line 7:
|moves = No
|moves = No
}}
}}
'''Wire''' is a mechanic introduced in [[Chip's Challenge 2]]. It's technically not a [[tile]], but instead enables [[floor]] and [[steel wall]]s to carry a signal between various game elements. Pink buttons, black buttons, and logic gates are capable of outputting a signal, and many more tiles can take signal as input. Wires will also be activated if a movable object steps on it while equipped with the [[lightning bolt]]. Wire tunnels can send current across the map.
'''Wire''' is a mechanic introduced in [[Chip's Challenge 2]]. It's technically not a [[tile]], but instead enables [[floor]] and [[steel wall]]s to carry a signal between various game elements. Pink buttons, black buttons, and logic gates are capable of outputting a signal, and many more tiles can take signal as input. Wires will also be activated if a movable object steps on it while equipped with the [[lightning bolt]]. Wire tunnels can send current across the map.


Line 14: Line 13:
The [[lightning bolt]], when equipped by a moving object, will supply signal to a wire while the object is stopped on one. The lightning bolt has no effect on wires that are already activated.
The [[lightning bolt]], when equipped by a moving object, will supply signal to a wire while the object is stopped on one. The lightning bolt has no effect on wires that are already activated.


== Wire tunnels ==
== Wire tunnel ==
{{Infobox Tile
{{Infobox Tile
|name = Wire tunnel
|name = Wire tunnel
Line 24: Line 23:
A '''wire tunnel''' is a wire modifier that allows current going into it to jump across any number of tiles. Wire tunnels work in pairs: for two tunnels to connect to each other, they must face each other and be in the same row or column, depending on whether they are horizontal or vertical, respectively. Multiple wire tunnel pairs on the same row or column work like parentheses: innermost pairs always connect, then the next innermost pairs, and so on. If a wire tunnel cannot find another to pair with on its row or column, it remains unpaired.
A '''wire tunnel''' is a wire modifier that allows current going into it to jump across any number of tiles. Wire tunnels work in pairs: for two tunnels to connect to each other, they must face each other and be in the same row or column, depending on whether they are horizontal or vertical, respectively. Multiple wire tunnel pairs on the same row or column work like parentheses: innermost pairs always connect, then the next innermost pairs, and so on. If a wire tunnel cannot find another to pair with on its row or column, it remains unpaired.


It is possible to remove the wire from the wire tunnel, as shown in the picture on the right. These tunnels behave as one would expect; they connect to other tunnels (wired or not) in the same way, and effectively end the wire on the other side if there is one. Consequently, these are not particularly useful in level design.
It is possible to remove the wire from a wire tunnel, as shown in the picture on the right. These tunnels behave as one would expect; they connect to other tunnels (wired or not) in the same way, and effectively end the wire on the other side if there is one. Consequently, these are not particularly useful in level design.


== Tiles that accept signal input ==
== Tiles that accept signal input ==
 
A value of ''pulse'' in the ''toggle type'' column indicates that the tile only needs one [[frame]] of signal to toggle (i.e. only changes state when signal changes from OFF to ON), while ''steady'' indicates that the tile will be toggled only when the signal is active (i.e. changes state on both off-to-on and on-to-off transitions).
A value of ''pulse'' in the ''toggle type'' column indicates that the tile only needs one frame of signal to toggle (i.e. only changes state when signal changes from OFF to ON), while ''steady'' indicates that the tile will be toggled only when the signal is active (i.e. changes state on both off-to-on and on-to-off transitions).


{| class="wikitable"
{| class="wikitable"
Line 66: Line 64:


== Buttons and switches ==
== Buttons and switches ==
See the article on [[buttons]] for more detailed information.


=== Pink button ===
=== Pink button ===
Line 105: Line 104:
{{clear}}
{{clear}}
== Gates ==
== Gates ==
Gates are tiles that use existing signals to create new signals. They otherwise [[acting floor|behave like floor]], except that [[ice block]]s cannot melt on them, even though they cannot be destroyed by [[time bomb]]s (and therefore cannot be replaced by [[fire]] if a monster is on it). The lightning bolt has no effect on these tiles.
Gates are tiles that use existing signals to create new signals. They otherwise [[acting floor|behave like floor]], except that [[ice block]]s cannot melt on them, even though they cannot be destroyed by [[time bomb]]s (and therefore cannot be replaced by [[fire]] if a monster is on it). The lightning bolt has no effect on these tiles.


Line 176: Line 174:
[[File:NANDgate.png|left]]
[[File:NANDgate.png|left]]
The '''NAND gate''' accepts two inputs. It is generally equivalent to an AND gate immediately followed by an inverter. If both input signals are ON, the output signal will be OFF. Otherwise, the output signal will be ON.
The '''NAND gate''' accepts two inputs. It is generally equivalent to an AND gate immediately followed by an inverter. If both input signals are ON, the output signal will be OFF. Otherwise, the output signal will be ON.
The point of including a NAND gate when an inverter can simply be placed after a regular AND gate, aside from speed and compactness, may be to demonstrate [http://en.wikipedia.org/wiki/NAND_logic NAND logic]: all other logic gates can be constructed with only combinations of NAND gates. Its inclusion over a NOR gate would be arbitrary, as similar [http://en.wikipedia.org/wiki/NOR_logic NOR logic] exists.


{| class="wikitable"
{| class="wikitable"
Line 212: Line 212:


=== Other gates ===
=== Other gates ===
==== Counter ====
==== Counter ====
{{Infobox Tile
{{Infobox Tile
Line 238: Line 237:
|colspan=3|'''INPUT''' || '''OUTPUT'''
|colspan=3|'''INPUT''' || '''OUTPUT'''
|-  style="background:#def; text-align:center;"
|-  style="background:#def; text-align:center;"
| Latch || Data || Output (previous frame) || Output (current frame)
| Latch || Data || Output (previous [[frame]]) || Output (current frame)
|-  style="background:#dfd; text-align:center;"
|-  style="background:#dfd; text-align:center;"
|0 || 0 || 0 || 0
|0 || 0 || 0 || 0
Line 262: Line 261:


=== Timing and loops ===
=== Timing and loops ===
At the start of a level, all inputs and outputs are OFF. On every frame after the first, all gates produce output based on their inputs from the ''previous'' frame. Because of this, each gate is considered to have a 1-frame "delay". For example, an AND gate followed by a NOT gate have a combined 2-frame delay, whereas a NAND gate only has a 1-frame delay, and therefore is not exactly equivalent even though the logic is the same. As another example, a chain of OR gates of length N will have an N-frame delay. This can be used to precisely control the timing and activation of various objects and parts of circuits.
At the start of a level, all inputs and outputs are OFF. On every frame after the first, all gates produce output based on their inputs from the ''previous'' frame. Because of this, each gate is considered to have a 1-frame "delay". For example, an AND gate followed by a NOT gate have a combined 2-frame delay, whereas a NAND gate only has a 1-frame delay, and therefore is not exactly equivalent even though the logic is the same. As another example, a chain of OR gates of length N will have an N-frame delay. This can be used to precisely control the timing and activation of various objects and parts of circuits.


trusted-editors
331

edits