FANDOM


Please note that Circuits are not yet for the faint of heart! This is an early version, so there'll be bugs and incompleteness. We absolutely apologize for any frustration this causes!
 
— Against Gravity, Update Page


How To Rec Room - Circuits

How To Rec Room - Circuits

YouTube tutorial about an earlier version of Circuits by Against Gravity

All Circuits

All circuits available as of March 2018

AboutEdit

Circuits are editable networks of components that can be used in Custom Rooms in Sandbox room mode to execute basic programs, for example, to keep track of the score, stop the game, and/or announce a winner. These networks are made out of configurable "chips," which can be found on the “Chips” tab of the Maker Pen menu, and specific items from the Sandbox Machine. The pins of the chips can be connected with the Connect tool of the Maker Pen. Visibility of circuits can be controlled in the This Room Menu of the Watch Menu.

If you have questions about specific circuits or the system in general, don't hesitate to ask them in the #circuits channel of Against Gravity's discord.

Examples of Circuits Edit

Several examples of useful circuits are documented in Circuit Diagrams. You can see some circuits in Rec Room by going to these Custom Rooms:

To find these rooms, open your Watch Menu, click on the Custom Rooms Menu and then the Search tab. Click on "Enter name here," type in the name, and then click the "Search" button. Some of the rooms are also accessible via the custom room ^FeaturedRooms.

Chips Edit

This section describes all chips that are available in the "Chips" tab of the Maker Pen menu. You might have to turn on visibility of circuits in the This Room Menu of the Watch Menu to get access to this tab.

The pins of the chips can be connected with the Connect tool of the Maker Pen. In general, input pins to a chip are on the left, and output pins from the chip are on the right. Input pins that are not connected to anything receive a 0 signal ("false"). A "true" signal (any number unequal to 0) on "R" pins will reset a chip, i.e., produce a 0 output.

Examples of circuits with most of these chips are on the page Circuit Diagrams.

04- Output node

Output Edit

Output chips display the numeric value input on the red pin on the left.

05- Message node

Message Edit

Message chips display a message to all players in a room when the input pin on the left is set to "true", i.e., any number unequal to 0. The message can be edited with the Edit tool of the Maker Pen. This can be controlled via buttons or other circuit components.

Combinator

Combinator Edit

Combinator chips do mathematical operations on inputs. Currently, addition, subtraction, multiplication, division and modulo (remainder after division) operations are supported. You can set the operation with the Edit tool of the Maker Pen.

A common application of the addition operation is to increment a score. Note that to increment a score, you need to connect the output of the chip to one input in order to add the new score to it.

A common application of the modulo operation is to toggle between 0 and 1: by computing an input value modulo 2, the result will toggle between 0 and 1 if the input is incremented in steps of 1.

Comparitor

Comparer Edit

Comparer chips do mathematical comparisons, including equals, not equals, greater than and less than operations. Output is 0 for "false", and 1 for "true". You can set the comparison with the Edit tool of the Maker Pen.

08- Timer node

Timer Edit

Timer chips can be used in countdown or looping countdown mode.  The red pin on the left is an on/off switch; the timer must be held in an “on” state (signal unequal to 0) to operate; thus, a button press, which only sends a momentary 1, cannot run a timer on its own. The green pin is an input for the amount of time (in seconds) that a timer should operate.  The red pin on the right outputs a momentary signal 1 when the timer expires (similar to goals and buttons). The green pin on the right is the current time left on a countdown.

09- Delay node

Delay Edit

Delay chips take a signal passed on the red pin, wait the amount of time provided by the green pin (in circuit ticks, i.e. 10th of seconds), and then output the signal from the red input pin momentarily on the red output pin before outputting 0 again, even if the input stays on a different value. It will emit a pulse again, if the input value changes to a different non-zero value. The minimum delay time (green input) is 1, even if you don't connect anything to the delay input.

If new signals come in before the last one is put out, the delay chip buffers the latest 20 signals (value + delay) and outputs them in the correct order.

Choice nodes

Choice Edit

Choice chips act as logic gates, supporting "And", "Or", and "Not" operations. The output is a "true" (1) or "false" (0) signal on the right side. For "And", the output is "true" (1) if and only if all applied input signals are "true" (unequal to 0). For "Or" the output is "true" (1) if and only if any of the applied input signals is "true" (unequal to 0). For "Not", the output is "true" (1) if and only if the input signal is "false" (0). You can set the operation with the Edit tool of the Maker Pen.

11- Variable node

Variable Edit

Variable chips hold three integer numbers that are available as output on the pins on the right side. You can set the values with the Edit tool of the Maker Pen.

12- Start Game node

Start Game Edit

A signal greater than 0 on the red pin starts the game when any of the input signals changes. A signal greater than 0 on the green pin stops the game when any of the input signals changes.

13- Game State node

Game State Edit

Sends a momentary output of 1 on the appropriate pin when the game state changes:

  • Red = Game Start
  • Green = Game End
  • Blue = Pre-Game Start

Bugs: The red and green pins output a 1 for one tick, the blue output outputs a 1 for two ticks.

14- Set Score node

Set Score Edit

A Set Score chip's input on the Red pin will display on the scoreboard as red team’s score, and the input on the Green pin will display the blue team’s score.

15- Score node

Score Edit

Scores from the scoreboard are output on the Red and Green pins for the Red and Blue teams respectively. This can be used to make announcements about the score.

SFX Node

SFX Edit

When the input receives a True signal, the sound effect set is played. You can change the sound effect played by using edit mode of the maker pen. The sounds effects available are:

Blue Scores Revive Whistle down Snare drum
Blue Wins Ding Whistle up Horn
Goal Red Scores Ding ding! Beep
Hit Red Wins Sparkle Explosion
Buzzer Score Subsonic boom Boot up
Game Over Bell Whistle Golf clap Thud


Random Node

Random Edit

When the red node gets a True signal, the random chip generates a steady output with a random number in the range from the green input (inclusive) to the blue input (exclusive). In other words, the value from the green input can appear, the value from the blue input cannot appear. To roll numbers from 1 to 6, input 1 ro green and 7 to blue.

The chip keeps outputting the last rolled number until a new number is rolled. A new number is rolled when any circuit element (including buttons) causes any circuit update and the red input has a true value at the same time. See Global Chip Update Tick for more detailed information about this behavior.

Respawn Node

Respawn Edit

The red input (respawn player on team node) respawns the player with the ID of the input signal on a valid respawn point. The green input respawns the entire team, where a signal of 1 is the blue team and 2 the red team and -1 for both teams.

Player Hit Node

Player Hit Edit

The player hit node can be used to detect who hits someone, and who is hit, and by how much damage. Red outputs the player ID of the attacker, green the player ID of the defender, blue the team ID of the attacker, cyan the team ID of the defender, and red the damage of the attack.

Other than in other game modes, the damage of weapons is currently constant in sandbox rooms. It does not take into account factors like distance for grenade launchers or how far a bow has been pulled. Shotguns pallets are not considered each on their own, but only one per hit player, which leads to comparably very low damage for shotguns.

Chips are only evaluated about every 10th of a second, but the player hit chip appears to be buffered and therefore does not miss any hits, for example when hitting two players at the same time (with grenades or shotguns). The hit chip outputs both hits in sequence.

Weapon damages:

In this table -- denotes that the attack will not cause the player hit chip to output anything, while 0 is a regular hit with no damage. The reduced damage column applies when a weapon or shield (paintball, quest or soccer shield) is hit.

Weapon Base

Damage

Reduced Damage

(shield or weapon hit)

Critical Damage

(headshot)

Paint pistol 18 18 30
Paint shotgun 10 10 10
Paint scope rifle 40 40 80
Paint burst gun 12 12 20
Launcher 100 100 100
Paintball shield -- -- --
Laser pistol 20 20 30
Laser railgun 40 40 80
Laser shotgun 5 5 8
Laser burst gun 5 5 6
Laser launcher 100 100 100
Quest crossbow 50 -- 100
Quest bow 40 -- 60
Quest sword 100 100 100
Quest shield 0 0 0
Magic wand 4 4 8
Hunter's crossbow 25 -- 35
Confetti gun -- -- --
Snowball pile 1 0 1


Weapon by damage:

b stands for Base damage, r for Reduced damage, and c for Critical damage.

100 Paint Launcher (b/r/c) Laser Launcher (b/r/c)
Quest Crossbow (c) Quest Sword (b/r/c)
80 Paint Scope Rifle (c) Laser Railgun (c)


60


Quest Bow (c)
50


Quest Crossbow (b)
40 Paint Scope Rifle (b/r) Laser Railgun (b/r)
Quest Bow (b)
35


Hunter‘s Crossbow (c)
30 Paint Pistol (c) Laser Pistol (c)


25


Hunter‘s Crossbow (b)
20 Paint Burst Gun (c) Laser Pistol (b/r)


18 Paint Pistol (b/r)



12 Paint Burst Gun (b/r)



10 Paint Shotgun (b/r/c)



8
Laser Shotgun (c)
Magic Wand (c)
6
Laser Burst Gun (c)


5
Laser Shotgun (b/r) Laser Burst Gun (b/r)

4


Magic Wand (b/r)
1



Snowball (b/c)
0


Quest Shield (b/r/c) Snowball (r)

Other Objects with Inputs Edit

There are many objects from the Sandbox Machine which take circuit signals using arrows attached to the objects while circuit visibility is true.

These objects take a value from an output node and process it accordingly.

20- Sign

Sign Edit

The sign can be written on, but instead of {R}, displays the value of the connection to the red input arrow.

20180215141909 1

Room Door Edit

When the red input arrow is receiving a True value, the door is locked.

Holotar Projector

Holotar Projector Edit

When the green input arrow receives a True value, the holotar starts playback. When the red input arrow receives True, the holotar stops playback.

Respawn Point

Respawn Point Edit

When a player ID is passed to the red input arrow, the player with that ID is respawned at the point. The green input arrow sets which team the respawn point belongs to, so that you can actively change it in a game. 1 is blue, 2 is red, and any other value is both/no teams. A default can also be set through the settings menu of the maker pen.

Radio

Radio Edit

There are two radios: the radio and the ambience radio. When the red input arrow receives a true value, the radio starts or stops.

Bugs: Currently it is a bad idea to control the radio by circuits for rooms that allow more than 1 player. The state of the radio (playing/stopped) is purely client based and will always start in the playing state for a player when he enters a room. If the actual/supposed state is stopped, the radio status will always appear reversed to the player. Another problem appears when a client misses the chip tick that is supposed to change the radio's state, then that client's radio will be out of sync, too. Additionally a stopped radio will start playing again if the player that has been in the room the longest leaves.

The songs available to you on each radio are:

Radio Ambience radio
Sport Funk AmbianceSummerOutdoor
In the Basement Paintball_Ambiance_ClearCut01
Secret Room Quest_Goblin2_Ambiance_Mines01
Goat Attitude Kiosk_PowerUpAmbianceLoop
Organism Quest_Pirate1_CrowdAmbiance
River Predator Quest_Pirate1_Ambiance_BrookLocal01
Flight Beam Quest_Pirate1_Caves_GhastlyAmbiance01
Electar Paintball_Dam_Crickets_AmbianceFill01
JumboTron - Explore
Arena Intense
Clear Shot
Food Court
Clear Shot
Range Finder
Spillway
Golden Trophy - Explore
Golden Trophy - Combat 2
JumboTron - Combat 1


Other Objects with Outputs Edit

These objects output various values when physically interacted with.

Button

Button Edit

The red output arrow outputs a momentary 1 when the button is pressed, and at the same time the green output arrow outputs the player ID of the player who pressed the button momentarily.

Object Goals

Object Goal Edit

When an object passes through the goals, the red output arrow outputs a momentary 1.

Player Goals

Player Goal Edit

When a player passes through the goal, the red output arrow outputs a momentary 1.

Dice Output

Dice Edit

When a dice rolls, the connection outputs the value of the roll momentarily. You could use a pulse to steady conversion circuit or a copy value circuit to store the dice roll result.


PitfallsEdit

The current version of the game has some known pitfalls that can be hard to understand or find if not known.

Connecting Frozen ObjectsEdit

Connecting frozen objects is currently not possible. You have to unfreeze both objects with the Settings tool of the Maker Pen before connecting them.

Value Range Edit

Circuits currently support only 32-bit singed integers. They range from −2,147,483,648 to 2,147,483,647 and cannot produce fractions or real numbers.

Ring Evaluation OrderEdit

Rings that consist of more than one chip do not have a defined evaluation entry point. That means the chip inside the ring store that gets evaluated first cannot be defined designing the circuit. Therefore they sometimes get evaluated in an unexpected order. For example the Number Pad often produces a 0 too much at the end (i.e. the result is 10 times what it should be).

If the execution order of the chips inside a ring appears wrong, it helps to exchange the chips in the ring. To do so, swap the chip that appears to be executed first with the chip that should be executed first. Then swap their functions and connections. The result is the exact same circuit, only that the chips that execute the steps are different ones. The ring should then be evaluated in the desired order.

Global Chip Update TickEdit

GlobalUpdateIssue

Isle of Lost Skulls Update: Currently this issue only affects random number generator chips.

Locomotion Update: No change.

Pizza & Potions Update: No change.

The first example on the right demonstrates the issue. Note that the button is not connected to anything at all. Every time the button gets pressed, the output increases by 2.

All chips in one room are evaluated every time any chip gets evaluated; otherwise they are usually not evaluated. The result may be confusing and counterintuitive - in particular if you rely on this "lazy" evaluation. For example a ring store that has an external input signal usually does not change until a signal is triggered. However, it does change when an unrelated signal in an unrelated circuit in the same room gets triggered. If you encounter values that appear to be changing randomly while building a circuit or when triggering signals at the other end of the room, this is probably the reason. The simplest way to reproduce this issue is to build an alternating circuit, for example by connecting the output of a Not chip to its input and observing the output.

Currently there is no known workaround for this issue, other than designing the circuits in a way that they are not affected by it. (For an example, see the two variants of the Copy Value circuit: the first one is not affected by the issue but takes one more tick to perform its function.) According to Against Gravity, this issue is not a bug but a expected behavior. However they understand that it is confusing and are considering to change the expectation.

GlobalUpdateInducer

To help you building circuits in a way that they are not affected by the global update, you can add the circuit on the right to your room during construction. It will constantly induce chip updates (about 10 per second), so you will notice problems in your design early.