----- Game Modes Puzzles Robot Mode Minigames (asteroid shooter, pinball) Downloadable: Atanasoff's Nightmare (30 digital circuitry puzzles) Fifth Gear World's Most Annoying Level Pack 30 puzzle levels annoying enough to turn you into a vegetable, for only $10, have you ever stumbled upon a better deal? These levels are designed to be extremely difficult, but not in a manner of complexity but rather in terms of precision and patience. Helicopter (Clone of the classic helicopter game, precision-control a helicopter through 30 levels) Apparatus (Classic puzzle levels in the style of Apparatus, get the marble to the goal!) More minigames (2 pinball games, 4 Happy Robots levels, Bird shooting) ----- Sandbox Help Welcome to the sandbox! To the left you have the Advanced Options button, click on it show a few extra options. The button with a ruler enables "Architect Mode". This mode renders the scene with orthographic projection and allows you to precisely measure objects in different layers. Effectively what happens is that the depth is removed. Next we have the layer transparency button. This button will toggle the transparency of layers so that you can build and edit occluded objects. And lastly we have the info button that will print out where the centre of mass is for each rigid construction. Note that this does not include objects that are attached using soft nails and rotary nails, but only compounds of stiffly attached objects. --- Copy/paste Grid Advanced options: Quickbuild (disable joint type select, always automatically pick the hardest available nail) Architect Mode (orthographic) Show grid Hide/show layers Show centre of mass ---- Battery (3V) 2 AA 1.5V batteries series connected, totaling 3 V. ---- Power Supply Voltage and current regulating power supply. Constant output between 1.5 V and 20 V. ---- ---- Motor Simple DC motor. NOTE: Since this motor is not capable of keeping its idle position or slowing down, it will oscillate if interfacing with a BH-CTRL SERVO. For precise angle control, the stepper motor should be used. Characteristics: * High maximum speed * Speed control through Pulse-Width Modulation, constant torque * No engine braking ---- Microstep Motor A motor that is good for precise angle control or abrupt speed control. Characteristics: * Low maximum speed * High torque * A desired speed below the current speed slows down (brakes) the motor * Applies torque to hold idle position or desired angle ---- Controllers and panels Control panel: OUT0-7 raw signal OUT8-15 Focus (binary) IN0-7 feedback/report current value IN8-15 Set value IN16-23 Set enabled/disabled One external device is controlled using 2 output slots and 3 input slots. OUT0 is connected to IN0, IN8 and IN16. OUTx is connected to INx, IN(x+8) and IN(x+16) OUT8-15 reports widget focus. For example, if a slider is dragged to 0, the raw signal is 0, but the focus signal is 1. When the slider is released the raw signal remains at 0 and the focus signal turns 0 as well. This can be used to create a recoil effect, when the focus value is 0, send a 1 (inverted focus signal) to the IN16-23 (Set enabled/disabled), when the slider is released it will recoil back to 0 (or another value as set through IN8-15). For a button, the focus signal is always equal to the raw signal. IN8-15 Alternative output value The value received here is the alternative output value used if IN16-23 is 1. IN16 to IN23 toggles passthrough mode and selects which output signal to use for the corresponding OUTn. A binary value of 0 means the control panel output value is used (from widgets on the screen), and a binary value of 1 means the widget is ignored and Example 1) Toggle button We want a button that each time pressed changes its state. We want the state to be reflected on the visible button. Add a button widget to OUT0, and connect OUT0 to a Sparsifier. Then connect the Sparsifier to a Toggler. The output of the Toggler is the value we want. Send the toggler output to IN0 (report value) and also your own electronics. Example 2) Slider with recoil Add a slider widget to OUT0. Connect OUT8 (focus) to an Inverter and then to IN16 (Value select). The slider will now recoil to 0 when not focused (inverted focus value = 1), if you want it to recoil to another value than 0, for example 0.5, then connect something to IN8 (Set value). 0 is the default value if nothing is connected. Example 3) Slider with springy Recoil We want to create a slider with a recoil effect that acts like a spring and does not instantly go back to 0. Add a slider widget to OUT0. Connect OUT8 (focus) to an Inverter and then to IN16 (Value select). Connect OUT0 (raw signal) to your own electronics and separately to a Square component. Connect the Square component to IN8 (Set value). ----- Series Circuit (1 in, multiple out) WHAT WE KNOW: constant current to all out WHAT WE CALCULATE: total resistance NEED: voltage per component IN voltage unknown IN current unknown SOLVE total current = 1.f / total_resistance; <- resistance APPLY /* push components back to the bottom series circuit */ if (in[0].is_series_circuit()) { circuit *c = in[0]; while (c->in[0] && c->in[0].is_series_circuit()) c = c->in[0]; c->push(this); return DONE; } else { float t_res = 0; float num_components = my_components; if (this->num_ready == this->num_components) { for (int x=0; x 0001110000011 Use in combination with the sparsifier and the effect on control panel buttons is a "checkbox" that can be toggled on/off. --- Epsilon Add a very small value (1e-5) to the input signal before passing it on. Use this component for systems where the output value does not converge to the output limit. For example, a series of Square root components will never reach exactly 1, but the Floor component requires a value of exactly 1 to output 1. --- Clamp Clamp the input signal to a given minimum and maximum value. To invert the clamp, set the maximum to a lower value than the minimum, the input signal will then be clamped outside of the range. --- Moving Average Output a value according to: I := xa + I(1-a) Where 'x' is the input signal, 'I' is the internal value and 'a' is a weight factor. I is always initially 0. Example usage: Connect a Moving Average component to a Floor component, the input value of the system will "charge" for some time depending on the Moving Average's weight factor, before a 1 is output. --- 0-reset Moving Average Identical to Moving Average, but resets itself if an input signal of exactly 0 is received: I: = / x > 0 : xa + I(1-a) \ x = 0 : 0 Where 'x' is the input signal, 'I' is the internal value and 'a' is a weight factor. I is always initially 0. --- Sparsifier Output 1 if the input is 1 and the previous tick's input was not 1. Example: 000011110000 -> 000010000000 Use this gate to, for example, convert control panel button presses to button clicks. --- Sparsifier+ Output 1 if the current input signal is not equal to the last input signal. Essentially, bit noise is smoothed out and coherent signal streams are turned into sparse noise. Example 00001111000010 -> 00001000100011 Example: 01010101 -> 01111111 Use this gate to do, for example, nothing. :( --- Switch 5 OUT, 3 IN The input signal is sent to any of the 5 outputs. Initially, the signal is sent to OUT0. The two right inputs switch which output receives the signal. If a 1 is sent to IN2, the next output is selected, if a 1 is sent to IN1, the previous output is selected. A sparsifier can help filter out too much data. --- A wooden plank. Any of the two ends of a plank can be attached to other objects by placing them near the object and clicking the appearing icon. Material: The plank is light, slightly bouncy and has low friction. Electronics: None. --- Wheel and tire Can be attached to objects that are not in the same layer as the wheel itself. Material: It is pretty heavy, has high friction, and bouncy. Electronics: None. Must be connected to a motor. --- Blocker Annoying enemies who try to block the robot by standing in front of him. Material: Hollow light metal. Low friction, very low bounciness, light weight. Electronics: None. --- Robot Material: The robot is hollow making it light, it has low friction and medium bounciness. Electronics: Can be remote controlled in the Robot play mode. Responds to commands when stepping on a command pad. --- Suction cup Automatically attaches to objects in-game. High forces detach the cup. Material: Wood. Same properties as wooden plank. Electronics: One red wire socket for on/off control. --- Metal shelf Static object attached to the wall. Material: Iron. Low friction and low bounciness. Electronics: None. --- Command Pad When a robot steps on the command pad, the pad sends a command to the robot. Commands include: turn left, turn right, switch layer, jump, aim, shoot Material: Plastic. Low friction, medium bounciness. Electronics: One red wire socket. If nothing is connected, the command pad acts as if receiving a signal of 1. Different action depending on command: STOP - Send stop command on signal 1, otherwise no command. STARTSTOP - Send start command on signal 1, stop command on signal 0. RIGHT - Turn right on signal 1, nothing on signal 0. LEFT - Turn left on signal 1, nothing on signal 0. LEFTRIGHT - Turn left on signal 0, right on signal 1. JUMP - Jump on signal 1, nothing on signal 0. AIM - On signal 1, set the angle of the right arm to the constant angle. Nothing on signal 0. SHOOT - On signal 1, shoot. On signal 0, do nothing. LAYER+ - On signal 1 step one layer out from the wall. On signal 0 do nothing. LAYER- - On signal 1 step one layer in towards the wall. On signal 0 do nothing. --- Wall-attached motor A static motor attached to the wall. The motor has two modes, passive and active. When active, input power is used to rotate the motor. When passive, input power is used to counteract rotation. Material: Iron. Properties: - Default mode Passive or active. This is the default mode used when a red wire is not connected or when 0 is received through the wire. Electronics: One power wire socket. One red wire socket for toggling passive/active. --- Motor Electronics: IN0 --- Magnetic IN-socket Automatically attaches to nearby magnetic OUT-socket (if compatible signal type). Can be used for either power or signaling. OUT0: Received signal IN0: Alternative input (data discarded if connected to magnetic socket) --- Magnetic OUT-socket Automatically attaches to nearby magnetic IN-socket (if compatible signal type). Can be used for either power or signaling. IN0: Input signal to be forwarded OUT1: Alternative output (not used if connected to a magnetic socket) --- Wireless transmitter One sender and one receiver. --- Motor Electronics: IN0: Power IN1: Power control IN2: Speed vs torque control (0 is fastest, 1 is strongest) --- Feedback motor Motor with speed and torque feedback. Output speed is a value between 0 and 1, where 0 is no angular movement and 1 is the maximum possible speed as determined by the speed vs torque tradeoff setting. Output torque is a value between 0 and 1 where 0 means essentially no torque is required to keep the motor spinning. A value of 1 means the maximum amount of torque is being applied but the motor is still not spinning. The error feedback outputs exactly 1 when an "error" is detected. Errors are due to external forces that prevent the motor from rotating or cause the motor to rotate in the wrong direction. Note that this signal can be very noisy when the motor is stuck. Example 1) Motor is stuck Torque feedback: 1 Speed feedback: 0 Error feedback: 1 or 0 (noisy) Example 2) Motor is rotating in the wrong direction Torque feedback: 1 Speed feedback: 0 Error feedback: 1 Example 3) Motor is running at full speed Torque feedback: 0 or close to 0 Speed feedback: 1 Error feedback: 0 Electronics: IN0: Power IN1: Power control IN2: Speed vs torque control OUT0: Speed feedback OUT1: Torque feedback OUT2: Error feedback --- Servo motor Angle control, angle will be equal to '2pix' where 'x' is the input control value. The current angle of the motor is converted to an output feedback signal using 'x = a/(2pi)' where 'a' is the current angle and 'x' is the output value. The servo motor always takes the shortest path to the target angle, so for instance if the target value is 0.1 and the current value is 0.9, the difference is calculated as +0.2 instead of -0.8, which will result in a value of 1.1. This conversion is done internally and is not reflected, in the output feedback value, which will send 0.1 if the internal value is 1.1. Likewise, if the motor has wrapped around many times and has an internal value of, for instance, 10.1, a target value of 0.2 will be interpreted as 10.2. Electronics: IN0: Power IN1: Servo control IN2: Speed vs torque control (0 is fastest, 1 is strongest) OUT0: Feedback --- Linear servo motor Linear servo motor where an input value of 0 is one end of the motor and an input value of 1 is the other end. The motor is not bistable and has a fixed speed vs force tradeoff. Electronics: IN0: Power IN1: Servo control OUT0: Feedback --- Linear motor If recoil is enabled and the speed of the motor is 0, full force is applied in the reverted direction. When the recoil effect is active, all feedback data sent through the interface is relative to the recoil direction. Errors are reported through the interface if the motor is unable to move, unless it has reached its final position (any of the two ends depending on direction/recoil). Errors are always reported if the motor is moving in the wrong direction. Properties: - Speed/force tradeoff (internal gearing) - Recoil enable/disable Electronics: IN0: Control and power interface Electronics: IN0: Power IN1: Power control IN2: Speed/force tradeoff (replaces property value) --- Generator Generate electricity for powering electronic devices. Material: Iron. Heavy weight, low friction, low bounciness. Electronics: OUT0: Power output IN0: Voltage control --- Button A one-time button, outputs 0 by default and 1 continuously once clicked. The bottom of the button can be attached to most surfaces. Material: Iron. Electronics: One red wire out-socket. --- Toggle button Switches between 0 and 1 red wire output every click. Material: Iron. Electronics: One red wire out-socket. --- Lever Sends a smooth red wire signal any percentage between 0 and 1. Maximum clockwise position is 1 and maximum counter-clockwise position is 0. Logical devices will round smooth red wire signals to the nearest value. When the lever is in the centre position (0.5) logical devices treat the signal as 1. Non-logical devices have specific behaviour. For example, a smooth red wire signal received by a generator affects the voltage and current. Material: Iron. Electronics: One red wire out-socket. --- Scanner Scans for movement. Outputs 1 when movement is detected and 0 otherwise. Electronics: 1 input power socket. 1 output signal socket, for reporting movement. --- Red wire Used for message signaling. Most messages are either 0 or 1 (for on/off signaling), but messages are allowed to be any number between 0 and 1 and are then referred to as "smooth" messages. Most devices don't handle smooth messages but round the value to the nearest value of either 0 or 1, exceptions include the generator which can use the smooth value to control its voltage and current output. The bandwidth of the wire is 50 messages per second. --- Power wire The power wire is black and delivers power to devices. --- Hub Combines multiple input power signals and distributes to output devices. --- OR device If the rounded value of any input signal is 1, output 1. --- AND device If the rounded value of both input signals are 1, output 1. --- XOR device If the rounded value of any, but not both, input signal is 1, output 1. --- Inverter Inverts the given signal, 0 becomes 1 and 1 becomes 0. For smooth signals, the output is 1-x where x is the input signal. --- Floor Converts smooth signals to non-smooth signals without rounding. Any input value below 1 is equal to an output value of 0. --- FIFO queue First-in-first-out queue with an initial buffer of 8 extra 0-messages. Approximately 50 messages are passed through red wires every second. This means a series of 6 delayers will cause roughly 1 second delay before the message arrives. --- Square Raises the given input signal to the power of 2. Does not affect non-smooth signals. For smooth signals, the rounding threshold which separates logical values of 0 and 1 is raised from 0.5 to an input value of approximately 0.707 (0.707*0.707 is ~0.5). --- Square root Outputs the square root of the input signal. Does not affect non-smooth signals. Note that since signals are in the range from 0 to 1, contrary to what one might intuitively think, the square root component will actually amplify the signal. For example a signal of 0.5 is converted to ~0.707. Consequently for subsequent components, the rounding threshold which separates logical values of 0 and 1 is lowered from 0.5 to an input value of approximately 0.25. ------------------------------------- CREDITS -------------------------------------- Principia Copyright (c) 2012 Bithack AB Programming, graphics, 3d modeling, sfx engineering and other crap Emil Romanus Music Daniel Hjerth ---- "Roboto" font (c) Google Inc. "Easy Speech" font (c) Jean-Jacques Morello ------------------------------------------------------------------------------------ Write to file of::write uint8 g_group uint8 g_child uint32 id -------------------------------------------------------------------- If in group _ is the body-local coords. ------------------------------------ ACHIEVEMENTS ------------------------------------------- Headstand (The robot lands on its head and stabilizes in that position.) Smartass (Follow an exponent gate by a sqrt gate, or vice versa) Star Collector (Collect 50 stars.) Gravedigger (High angular velocity of the robot.) Superman (The robot flies a long horizontal distance with low angular displacement.) Gouranga Las Vegas (5 robots walking in the same direction) Harakiri (Shoot a land mine while standing next to it) World War 3 (10 land mines exploding in a chain reaction) Big Daddy Drive a vehicle that shoots rockets Woodstock 100 pieces of wood on the board Noob Play a puzzle 10 times without moving anything Sonic Robot speed > 250 ------------------------------------------------------------------------------------------------------------ -------------------------------------- Community Section SLOW CONNECTIONS !!!!!!!!!!!!!!!!!!!!!!!!! Hopkopplat kontosystem med phpBB eller annat simpelt forumsystem. Varje bana som laddas upp blir en forumtrod. Troden embeddas och ser ut som ett kommentarsfaelt naer man tittar po level description i communityt. Ska aeven go att posta fron levelsidan Behoever antispamsystem, kunna markera banor, kommentarer och rapportera anvendare som spam. DB: - level - id, autoincrement parent_id solution_parent_id user_id creation_date modified_date title VARCHAR(255) description TEXT type ENUM puzzle,adventure,freebuild,minigame,solution status ENUM pending,published,removed screenshot_status ENUM working,done,error bool allow_derivatives num_downloads num_views num_thumbs nycklar: id PRIMARY type+status INDEX creation_date INDEX title+description FULLTEXT eller nogot sont CREATE TABLE principia_web.level ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, `parent_id` INT UNSIGNED, `solution_parent_id` INT UNSIGNED, `user_id` INT UNSIGNED, `creation_date` DATETIME NOT NULL, `modified_date` DATETIME, `title` VARCHAR(255) NOT NULL, `description` TEXT, `type` ENUM('Puzzle', 'Adventure', 'Custom', 'Puzzle Solution') NOT NULL, `status` ENUM('Pending', 'Published', 'Removed') NOT NULL, `screenshot_status` ENUM('Working', 'Done', 'Error') NOT NULL, `allow_derivatives` BOOL, `num_downloads` INT DEFAULT 0, `num_views` INT DEFAULT 0, `num_thumbs` INT DEFAULT 0, ); CREATE INDEX `type_status` ON `level` (`type`, `status`); CREATE INDEX `creation_date` ON `level` (`creation_date`); - - ---- Levels Build a bistable linear servo motor. ---- ---- MODEL STUFF Socket dimensions: .25 x .25 x .25 z = .375 ---- EXTRA PAUSE BUTTON nej +0+++ Hey! Sorry to interrupt you, but... It seems that the temperature of your Android device is getting very hot. This can severly affect performance and make Principia run very slowly, ruining the experience. When the temperature rises, Android automatically decreases the performance to keep your device from overheating. This is called CPU throttling. If you notice periodic slowdowns in performance, you should open up the graphics options and lower the settings. This will save battery life and increase the performance. Have fun. -------------- Level properties Type: Freebuild, Puzzle, Minigame Name Description Width Height Background Gravity Gameplay Final score [ ] Physics - Position iterations - Velocity iterations Community [ ] Allow saving for offline play [ ] Allow derivative works (sandbox download) TODO Note Block - Plays an instrument-like noise, with a setting for pitch?