You can submit new levels using the format described in this section. Each line of code represents one type of entity. The first character of the line specifies the entity type. The following entity types are currently supported:
Type | Symbol | Parameters | Description |
---|---|---|---|
Target | t | 1 point | The position of a laser target. |
Laser | l | 2 points | Two points: the first specifying the position of the laser and the second specifying its destination. |
Mirror | m | 2 points | The start and end points of a mirror segment. |
Switch | s | 1 point followed by 1 region | The position of a switch target and a region defining the locked area. |
Dark region | d | 1 region | Lasers can not travel through the boundary of this region. |
Bright region | b | 1 region | Lasers can not travel through the boundary of this region. |
Comment | # or / | anything | Comments are ignored when generating a level. |
Each entity contains one or more parameters which should be space separated. A "point" is a single parameter with two integer coordinates separated by a comma. A "region" is three or more points which specify the vertices of a polygon. This coordinate system has 1,1 at the top-left and 499,499 at the bottom-right.
# This is a comment.
b 50,50 125,250 50,450 250,375 450,450 375,250 450,50 250,125
d 230,230 270,230 270,270 230,270
t 100,100
t 325,250
l 400,100 390,110
s 175,250 125,250 250,125 125,125
m 100,125 125,100
m 100,375 150,375
m 350,375 400,375