This page will help you get started in the sandbox. For more tutorials and help resources, check out the rest of the Principia Wiki.
The game contains three different types of cables. Starting out the first two are the most important: white cables are used for sending electric power while red cables are used for sending signals. The third type are blue interface cables and are used for more advanced contraptions featuring CT objects.
The white cables are used to send electric power to devices requiring it. Examples of objects that need power include the Simple Motor, Fan, Trampoline (optional), and all the CT (controller) objects.
Currently you can choose from two power sources: Battery (3V) and Power Supply (custom voltage). Both produce an infinite supply of power, and all outputs in the Power Supply will output the given voltage it is configured to.
The signal system is conceptually very simple, but one of the most advanced areas of Principia. This is the kind of cable you will spend most time with. A value sent through the cable can be anything between 0.0 and 1.0. A signal can either be described as a binary signal or an analog signal. Binary signals are either 0.0 or 1.0, with standard rounding logic applying for values in between. Analog signals can be any value between 0.0 and 1.
Here are some examples of what some objects output:
You can use a Debugger or Grapher to see the signal output of any object.
There are a lot of useful objects in the Signal-i1o1 and Signal-i2o1 categories for working with signals. The Sparsifier is probably the most important object to know that you will get a lot of use out of. In short, it converts a long signal to a "click".
For example, a button will normally output 1's infinitely after it has been pressed. Connect it through a sparsifier and the result will be a single "click" when the button is pressed, followed by infinite 0's. Maybe it doesn't sound very useful, but you'll learn soon that the sparsifier will be useful in almost all of your builds.
The interface system can be found between motors of various kinds and Controllers ("CT"). A controller will pack a bunch of signal information and electric power and pass it to a motor through a single cable. The purpose of this is to have all your electronics in one place while still being able to do advanced communication with motors (such as getting feedback from and controlling the motor).
Use the Game Manager object. It has several slots for controlling the current score. Remember to add Sparsifiers in front of the slots, unless you want the player to rack up a lot of score!
A level is completed when any of the following conditions are met:
To set up your own rules, all you need to do is connect your electronics to the WIN-input on a Game Manager and define when the game is won.
To detect mouse clicks, use the Event Listener object and choose the Mouse Click or Mouse Release event.
You can not get the absolute mouse position, but you can get the relative position (an angle and a distance) using the Cursor Finder object. Please note that the angle is relative to the Cursor Finder itself.
There are many ways to detect objects. Here are some options:
To build a simple car that drives forward automatically, you will need Wheels, a few planks, a Simple Motor, a Battery (3V), and a power cable. Then connect the motor to an RC object (such as RC Basic) to control it. See Example: Simple Motor for a minimal example of a simple controllable car.
For building more advanced vehicles it would be useful to use the CT (controller) objects. See the Building a Vehicle tutorial series for more information.
In the Robotics category in the sandbox menu you will find a bunch of objects with RC (remote control) in their name: RC Micro, RC Basic, RC IO-3 and RC MONSTRO. An RC is an object that allows you to add buttons on the screen, and connect these buttons to your signaling electronics.
To demonstrate, let us create a simple button that activates a debugger.
OUT0.OUT0 of the RC Basic, and the other end to IN0 of your debugger.This can be accomplished using the RC Activator object, found under the Game category in the sandbox menu. Place an RC Activator in your level. While selected, choose the Crosshair button and select which RC the activator will activate.
By default the RC will be activated immediately, but you can activate it on demand by connecting a signal cable to the RC activator and sending a value of 1.0 when it should be activated.
The Cam Targeter object can be used to set what object the camera will follow. First, find the Cam Targeter under the "Game" category in the sandbox menu. Place it in your level, click on the Crosshair-icon and the game will ask you to select an object. Click on an object you would like for the camera to follow.
The Cam Targeter will be automatically enabled when the game is started. You can activate it on demand by connecting a signal cable to it and sending a value of 1.0.