Operators
->
Chain
In the context of procedural content generation this refers to the timing and spacing of tile-placement. In animation this refers to animation transitions.
Example usage in PCG
with tile
tile grass = bit(24)
tile water = bit(25)
tile rock = bit(26)
tile path = bit(30)
tile wall = bit(31)
rows {
1 * rock -> 20 * path
3 * wall -> 17 * grass
}
xrows !mirror {
4 * rock -> 4 * grass
}
Example usage in animation
Shape and tile states and transitions are chained using ->
, to provide several examples:
Operator | Description |
---|---|
-> x2 |
Scale by 2x |
-> rotate90a |
Rotate 90 degrees anti-clockwise |
-> circle |
Transform into a circle |
-> randomize |
Randomise property values |
-> set |
Assign values to properties during transition declaration |
*
Quantification
In PCG this is used for denoting the number of tiles of a given type (the type is specified in the right hand side of that expression).
!
Animation Delimitation
The delimiter the animation system uses to separate animation transitions.
not
Negation
Negation of the right hand side expression.
and
Logical AND
Logical AND between left and right hand side expressions.
or
Logical OR
Logical OR between left and right hand side expressions.
-=
Decrement
Decrement left hand side with right hand side expression
+=
Increment
Increment left hand side with right hand side expression
=
Assignment
Assignment of a value
mul
Multiplication
Multiplication between left and right operand
/
Division
Division between left and right operand
-
Subtraction
Subtraction between left and right operand
+
Addition
Addition between left and right operand
^
Power
Raise left operand to the exponent of right operand