How To Circuits V2

Welcome to Circuits V2

Hello, and welcome! This page serves as a way of getting started with Circuits V2. No prior Circuits knowledge is expected.

Getting Started

Circuits V2 is beta content. As such you must build in a beta room to access Circuits V2 features of the Maker Pen. To convert a room into a beta room go to:

Watch Menu -> This Room -> Settings -> General Setup

You will see the “Allow Creative Tools Beta Content” checkbox near the bottom of the “Room Settings” tab. Click the check box, then click the “Apply Settings” button below it. Read the prompt and confirm its contents. After the room saves and reloads you will now have access to the “Circuits V2” tab in the palette as well as any additional features in the Creative Tools Beta. Be sure to watch our Happyfox Knowledge Base page for more detailed information on how to use Circuits V2!

Concepts

Events

  • Events are entry-points into Circuits V2 graphs. Execution starts at a Circuits V2 Event.

  • You can receive an Event by using the “Event Receiver” chip.

  • By configuring the “Event Receiver” chip you can change the Event it receives.

  • The “Send Test Event” button in the Circuits V2 tab of the palette allows you to send a test Event if your receiver is configured to receive it.

  • You can create and send your own Events using the “New Event” button in your palette and the “Event Sender” chip.

Variables

  • Variables are chips which can store and return values.

  • Variables can be accessed by connecting the output directly to another chip.

  • Variables can be set by connecting the output to a “Set Value” chip.

  • Instance variables only store values on the machine a variable is set on.

  • If a graph sets a variable on your machine but not on other player’s machines, you may each have different values in the variable. To synchronize variables between players look at the Synchronization section below.

  • Unlike in normal programming, variables do not reset their value when execution exits a node. They maintain their value until set again or the room is reloaded.

Types

  • Types are the kinds of values used by a Circuits V2 graph.

  • Integer numbers (0, 1, 2, 3, etc.) are called ints and are represented by the color green.

  • Decimal numbers (0.0, 1.1, 1.5, .50) are called floats and are represented by the color blue.

  • “True” or “false” values are called bools and are represented by the color red.

  • Text values are called strings and are represented by the color purple.

  • Most other Types, like players, are represented by the color yellow. We will provide ways to differentiate these in the future.

  • Only inputs and outputs of compatible Types can be connected to each other.

  • Some empty ports can have their default values configured by clicking the port with the Wire tool.

  • Execution is a special Type which guides execution through a Circuits V2 graph.

  • Execution pins are orange arrows.

  • Execution flows from left to right.

  • Some chips have multiple Execution outputs which allows them to modify execution flow.

  • Lists are a special Type which represents a sequence of values.

  • Lists are represented with a “[]” icon on their port.

  • Individual items in a List can be accessed with the “Get Element” chip.

  • The number of elements in a List can be accessed through the “List Get” chip.

  • White ports are a special kind of Type called a “union”, which means they accept many different Types of values. An “Add” chip, for example, may add floats or ints depending on what you connect to it.

  • When you connect to a union port the chip will resolve the actual Type of the ports and recolor them automatically.

Heat

  • Heat is the equivalent of Room Ink in the Circuits V2 world.

  • You can see the amount of Heat being used per-frame in the Circuits V2 tab of your Palette.

  • In Circuits V1 we overestimate the cost of chips by assuming they are all running constantly. In Circuits V2 we only calculate the cost of chips while they are actually running.

  • This means that you only see Heat costs while a graph is executing.

  • Branches in execution will also impact how much Heat is consumed per frame.

  • Executing a long branch takes more Heat than executing its smaller counterpart.

  • Heat is calculated per-frame. When you run out of Heat your graph stops executing for the rest of the frame.

  • On subsequent frames execution continues at the beginning of new events, not where it was halted.

Circuit Boards

  • Circuit Boards are collections of chips and variables contained in one unit.

  • You can create a Circuit Board chip from the palette.

  • You can configure a Circuit Board to add inputs and outputs.

  • You can add chips to a Circuit Board by using the Edit tool on it. Any chips that you spawn while editing a Circuit Board will be put “inside” it.

Control Panels

  • Control Panels are Circuit Boards tied to a specific object.

  • Objects with Control Panels cannot have their Control Panel removed.

  • Only the Spawner Gadget V2 and AI props have Control Panels for the time being.

  • Soon(TM) most objects in UGC will have Control Panels.

  • Events specific to an object may only be available within its Control Panel.

  • The “Self” chip, as well as some object-specific Events, can be spawned only in Control Panels. It provides access to the Circuits V2 representation of that object.

Synchronization

  • Synced variables and events are synchronized across other player’s machines.

  • Synchronized variables will replicate value changes to all players when changed by any player.

  • Changes are not guaranteed to happen instantly for everyone. It could be delayed for some players depending on their latency and network connection.

  • You can connect a "Value Changed" chip to a variable chip to detect changes to its value. This is especially useful for synchronized variables.

  • Synchronized events will be received by all players when sent by a "Synched Event Sender".

  • The "Has Authority" chip can be used to make sure parts of a graph only run for a single "authority" player chosen automatically by the Rec Room server to be the main source of “truth” about the state of a Room.

  • Inside a Control Panel, “authority” refers to the player who has control over the specific object the Control Panel belongs to rather than the authority over the Room.