Colour Bind

Level Editor Documentation

Viewport navigation: To move the camera around, move the mouse to the edge of the screen you want to scroll towards, and hold down the right mouse button. To zoom in and out, use + and -.

Grid: To force the cursor to snap to the grid, hold down ‘g’. To centre the grid to the current gizmo (if you have something selected), press ‘h’. Press ‘h’ with nothing selected to return it to the origin. To rotate the grid around its centre, use ‘[‘ and ‘]’. To scale the grid up and down, use ‘{‘ and ‘}’.
Note that the grid snapping implementation is pretty low level - it literally just snaps the cursor to the nearest grid point no matter what. This can lead to some shenanigans with menus and translation gizmos if you’re not careful.

Loading and saving: To load a level, press ‘l’ (that’s a lower case L), then type in the name of the level you want and hit enter. To save the level, do the same with ‘s’. Saving over levels will happen without warning if you name the same thing, so be careful. You can create a new level by pressing ‘n’.

"Loadscreen"

Autosaves: Instead of an undo feature, the Colour Bind level editor saves the current level every so often (you can change the frequency in config.txt). Use the chevrons (< and >) to cycle through these saves - so, if you make a mistake, press < repeatedly to cycle back through autosaves to find a spot before you messed up. If you go too far, press > to go forward again.

Creating new stuff: To create stuff, right click somewhere, then left click on the menu thing that comes up for whatever you want to create. Below is a big section describing each object type and how to manipulate it.

"Right Click Menu"

Selecting stuff: This is pretty much as you’d expect and for once conforms mostly to convention. Click something to select it, or drag out a rectangle to select multiple things. Hold shift doing either of these things to add to the selection instead of replacing it.

Moving stuff around: When you have one or more things selected, a little transform gizmo thing will appear. You can do four things with this by clicking and dragging in different places. Free translate (in the square), translate constrained to one axis (one of the axes), or rotate (the red circle).

"Moving Stuff Around"

Edit panels: Edit panels are things that show up when you have certain types of object selected. The one that shows up the most is the colour edit panel - lots of things have a colour and you can set it here. The other two are mass properties, for rigid bodies, and world geometry type, for world geometry. I’ll go into more detail about this stuff later on, but basically you select the thing you want to edit, click buttons on its edit panel, and then click the Set button to apply that edit panel to all the objects you’ve got selected (the objects for which it’s not appropriate just ignore it - like, if you select a rigid body and a gravity flag and then set colour and mass properties, the colour will apply to both but the gravity flag won’t receive any mass properties.

Edit mode: When a single object is selected, pressing E will toggle edit mode. This allows you to mess with the object in more detail - a big description of how edit mode works for each object type is contained below.

"Edit Mode"

Level description: If you press ‘d’, this will let you type in a name and a description of the level - this affects how the level shows up in the level selector.

Steam Workshop upload: If you’re playing the Steam version of the game, pressing ‘u’ will take you to the upload screen. Make sure you’ve entered a level description (see above) and select the difficulty of the puzzles and the skill-based challenges so people can search according to those criteria, then hit enter and it should upload. Note that you’ll have to find the level on the Colour Bind Steam Workshop page to do final publishing, set a screenshot for the level, etc.
Note: To add a custom Steam Workshop icon to your level currently you have to replace the SinglePlayerPreview.jpg or CoopPreview.jpg files in the Levels/ Directory inside the Colour Bind install directory (By default this is C:/Program Files (x86)/ Steam /steamapps /common /colourbind/). If the level is single-player then SinglePlayerPreview.jpg will be uploaded, if the level is co-op, then CoopPreview.jpg will be uploaded.

"Upload"

Object types!

World Polygon: This is world geometry - it stays still. It comes in three flavours. Standard, which is light grey foreground geometry that objects collide with, lasers bounce off, etc. Background, which is dark grey and doesn’t interact with physical objects - in the main levels, I have only used this for decoration and other visual purposes, but lasers also collide with it which might be useful for certain things. Finally, Slippery geometry is similar to standard but with a white outline and a much lower coefficient of friction.

Edit Mode: Edit mode for the world poly allows you to change the polygon’s shape. You can do this by adding, deleting, or moving verts, as well as changing the smoothing properties of the verts. To add a vert in edit mode, simply click on or near an edge. To delete a vert, right click on it (note that it won’t work if the poly is already down to its last three verts). Left clicking and dragging moves a vert. You can also select mulitple verts by dragging a rectangle with left click - this will highlight selected verts yellow. You can drag them (they won’t animate while you do but it will work) and delete them. Finally, to change the smoothing properties of a vert, you can use the keys 1-4 while you either have a vert picked up, or selected. 1 and 2 will decrease and increase the smoothness of the point, and 3 and 4 will decrease and increase the pointiness.

"World Polygon"

Polygonal object: This is a physical object. It collides with other objects, gets hit and coloured by lasers, affected by coloured gravity, and can be constrained to make a door (or other stuff). It has a physical property window that lets the player change its mass properties - the higher ‘slider’ is the density, and the lower ‘slider’ modifies the moment of inertia. Once you’ve moved the sliders hit ‘set’ to apply the changes.

Edit mode: This works the same as world polygons.

"Polygonal Object"

Physical circle: This is like above, but a circle, not a polygon. It works the same except for changing its shape in edit mode.

Edit mode: The only thing that changes here is the circumference of the circle - click and drag anywhere on the edge of the circle to change its radius.

Laser: Lasers have a colour that can be changed and set like a physical object. In edit mode, you can drag the start and end of the laser to reposition it. Lasers can also have the Turn On Laser and Turn Off Laser events sent to them. If you place a laser with its base over a physical object, it will be attached to that object - however, this functionality is a bit buggy as it was never used in the built in levels - use with caution!

"Laser"

Switch: Switches can be dragged around and they will automatically orient themselves to the edges of world geometry. Switches keep lists of events - one list for events they trigger when they are pressed in, and another for events they trigger when they pop out. They can also receive ‘move to open’ and ‘move to closed’ events (‘closed’ means ‘pressed’ in this case, so ‘move to open’ will make a pressed switch pop out, for instance). To add an event to either list, click the green plus sign next to the appropriate list then click on the event’s icon. In theory, if an event is in a switch’s list, and the event is tied to a triggerable object, the triggerable object will draw with a white circle on it while the switch is selected. You can also change the type of the switch with the bottom left button - hold switches pop out automatically, but toggle and push switches will automatically have an event added that makes them stay pushed when you push them (essentially an event that makes itself move to closed). To make a toggle switch work with other switches you have to manually add ‘move to open’ events to all the switches in the group that pop all the other switches out. You can also attach a switch to an object - click ‘attach to object’ then click the physical object in question - you’ll want to move the switch over to the object to make this a bit more convincing. Unfortuntaely at the moment you’ll have to orient it to the object’s surface manually. Note that the button in the bottom right of the switch info doesn’t do anything and soon it’ll get removed - try not to look at it.
Note: Press tab while a switch is selected and it will swap its default state (on or off). Note that this change isn’t reflected visually in the editor yet.

"Switch"

Events: Events are pretty useless things until you mess with them in edit mode. Basically the way an event works is, it means ‘do something’. An event has a target, which is the object that does something, and one or more triggers, which is the thing that causes the event to happen (a switch or a timer). In edit mode, there are three buttons on the right hand side of the thing - the rightmost vertical rectangle-looking thing, if you click it, it turns red - this means you can now select the target of the event. If you a type of event to a target that can’t handle it, nothing will happen. The other two buttons cycle through the event types. They are as follows:
Move to closed: Move a prismatic constraint to its starting position, or ‘press’ a switch.
Move to open: Move a prismatic constraint to its other position, or ‘release’ a switch.

"Event Target"

Start timer: Starts a timer ticking.
Note that if a timer has just finished, you’ll have to reset it before starting it will do anything.
Pause timer: Stops a timer from progressing.
Reset timer: Moves a timer’s time back to zero.
Note: The way the timers work is currently pretty awkward. If a timer runs its course, you will have to pause it (cos it’s still going, behind the scenes) and then reset it (to move it back to zero), to get it back to its original state and start it again
Turn on laser: Self-explanatory.
Turn off laser: See above.
Set red/green/blue gravity: These special events come with a line that you can adjust. It sets the world’s gravity of the stated colour to that line’s value. Toggle switch: Pops a switch in if it’s out, or out if it’s in. Not used in the game but potentially could be used to make binary counters and other shenanigans.
Show/hide text: Turns on and off a text element. Note that showing text that’s out of the range of your car won’t make it visible (see Text Element, below).
Text Tag: Attach this to a text element, and when you activate it, the content of the text tag will get printed to the console output with ‘text activation’ next to it. No but seriously, this doesn’t do anything - it’s used for achievement detection in the built-in levels but requires native code hooks.

"Timer"

Label: An in game label, that you might have seen next to a switch. The character on it means different things - press tab to cycle through symbols.
T: Clock
A: Arrow (used in the built in levels to mean ‘sets gravity to this direction’)
M: Mover arrow (used to mean ‘activate door’ or similar)
L: Laser-looking thing
F: Fail label
B: Blank
!: Exclamation point (used in the built in levels to mean ‘This switch does lots of crazy stuff’)
Edit mode: If you go into edit mode on a label you’ll see a dark red probe thing that you can drag around. If you move it onto a timer, that label will then display the progress of that timer (and also emit those tick sounds to correspond to it).

Body constraint: A body constraint is used to make either a door (the default state), or a hinge. Which state the constraint is in is indicated by its appearance - for historical/stupid reasons, if the constraint is in door mode (a prismatic constraint) it will appear as two yellow circles connected by a line. In hinge mode, it will be three circles (the third one can be dragged around but it won’t do anything). To switch modes, press ‘tab’ while the constraint is selected. For a hinge to work, you’ll need to attach it to an existing physical object - enter edit mode on the constraint then click the physical object to attach it.
Edit mode: Edit mode works differently for prismatic and rotational constraints. Primsatic constraints, the bigger circle represents the initial position, and the smaller circle represents the position of the object after a ‘move to open’ event has been sent. On hinge constraints, the biggest circle represents the hinge point - the second biggest circle has no physical effect, but creates the point on the object to which a line will be drawn to illustrate how the hinge moves to the player.

Bridge: These are pretty straight forward. Change their end positions in edit mode by dragging the ends around, change the colour outside edit mode like you would a physical object. The number of segments is generated automatically, but bear in mind that these can make the physics engine a little unstable if they’re really long, or lots of force is applied to them.

"Bridge"

Level goal: This contains a bunch of info about the level other than the location of the level goal. First off, you can hit ‘tab’ while the goal is selected to toggle between a single and multiplayer level. It is also where gravity is controlled for the level via edit mode.
Edit mode: In edit mode, the goal will have three vectors visible - these colours can be dragged around to set different gravity directions for the level. There are also three small coloured dots - these control gravity ties. Each colour can have its orientation controlled by the orientation of an object (such as in the built in level “Connection”) - click one of the small dots, then click on a physical object to make this connection. Click the dot on the level info again to break the connection. Attaching arrow labels to the object, etc, is up to you.

Toggling laser with a switch: I’ll give you a step-by-step walkthrough of setting up a laser that is turned off at the start and has a switch to turn it on.
1. Go into the level editor, and in the empty level, place a laser somewhere. 2. Select the laser (just the laser) and press the E key to enter edit mode. This will highlight the two ends of the laser, which you can drag around to position it as you want it. Press the E key again to leave edit mode. 3. With the laser still selected, press tab - the laser line should look slightly darker than before. Now it’s turned off - if you play the level now you should just see the source of the laser, not the laser itself. 4. Create a switch from the creation menu, and drag it to the edge of some world geometry - it should automatically align with the edge of the geometry. If you play the level now, you should be able to hit the switch and hear a click (but the switch will pop out again, and nothing will happen). 5. Create an event somewhere, select it, and use E to go into edit mode. It should be labelled ‘undefined type’. Over on the right of the rectangle that pops up in edit mode, are three ‘buttons’ (and as I write this, I realise how unclear and unusable that is - I’ll have to fix this in a patch). The smaller square buttons, clicking them should cycle through event types - select a ‘Turn laser on’ event by clicking the bottom button six (I think?) times. 6. Still in edit mode on the event, click on the taller rectangular button to the right of the edit dialogue. It should turn red. While this rectangle is red, you can select the target of the event - click somewhere on the line of the laser. The button should stop being red, but there should be two white circles around the base of the laser now, whenever this event is selected and in edit mode - that means it’s attached to the laser! 7. Now, over to the switch. Select it, and go into edit mode. First off, there is a button that says ‘Hold’ - this means it is a switch you have to hold down. Click that until it says ‘push’. This isn’t strictly required but it will look nicer (because the switch won’t pop out again). Now, go to the little green plus to the right of where it says “Switch On Events”, and click it, and then without doing anything else in between, click on the event you created earlier. 8. It should now say “Turn on laser” under the “Switch On Events” heading in the switch’s edit dialogue. Now, you should be good to go! Play the level - hopefully pressing the switch will turn the laser on. If not, please email me the .cbl file (it will be in the Levels directory of the game) you’ve created and I’ll try to figure out what’s happening.
What’s happening here conceptually is that an event is an abstract thing that causes things to happen to other objects. So, you attach a ‘turn on laser’ even to a laser, to cause the laser to turn on. A switch (or a timer or a proxy switch) is a trigger - it triggers events. So the switch is hooked up to the event, which is hooked up to the receiver (a laser in the case).