Intro
ColourTode is a spatial language!
It's just a draft right now. I'm currently making the backend for it in CellPond.
You can type ColourTode!
You can drag & drop ColourTode!
Number
Numbers can only be single-digit!
Number Operations
You can add and subtract numbers.
Range
Ranges represent multiple possible numbers!
Array
Arrays are lists of up to three numbers or ranges (red, green, blue).
Array Operations
You can also combine arrays together.
Constant
You can define constants with =
. You can give them a single-character symbol and/or name!
Partial Array
Arrays can also be less than three items long.
You can combine them together to make complete arrays.
Built-In
Some colours are built-in. You can use them! (or override them)
Diagram Constant
You can assign diagrams to constants too!
Rule
You can make a rule by using right-arrows.
Split
You can make a cell split into smaller cells.
This rule makes red atoms split into two copies of itself. It will crash the engine!
Merge
You can merge multiple cells into one cell!
This rule makes red atoms merge together!
Variable
You can access variables for the red, green and blue channels of a cell.
This lets you edit the value of a cell, instead of just recolouring it. This makes every cell become more red over time...
Symmetry
Rules can be repeated with different transformations.
You can rotate a rule...
Flip it horizontally...
Flip it vertically... (note: it would have no effect on this rule)
Or any combination of them!
Stamp
Symbols can be assigned to diagrams. This makes the symbol behave differently on each side of the diagram.
These two code blocks have the same effect:
Identity
Stamps are helpful for maintaining the identity of a cell. It lets you use the variables/range of the correct cell. Let's look at an example...
This symbol increases the green value of a cell:
This symbol gets any cell with between 1 and 8 green:
This symbol gets any cell with less than max green, and makes it greener:
Now let's use this in a rule...
The above rule finds any cell with a bit of green in... and makes it grow upwards. Each time it grows, it gains a bit of green! And it stops growing when it hits max green.
Steps
Rules can have more than one step. If the first step doesn't match, it tries the next step. Each step needs to have the same 'silhouette'.
This rule makes red move upwards. If it can't, it disappears instead.
Last updated