The game is played by writing programs to control a robot's movement, sensors and weapons. Programs are written in a hybrid of the BASIC / Logo programming languages. Two robots enter an arena with the survivor being declared the winner.
I asked the designer and programmer of Color Robot Battle what inspired the game:
Color Robot Battle is a fantastic example of compact code. The game, compiler and full screen editor are all written in 6809 assembly language and somehow manage to fit on a 4K ROM.
Although the language of CRB only takes a few minutes to learn, a whole range of strategies are possible. There are four types of command available:
- movement: followed by a number. Movement commands are F(orwards), B(ackwards), L(eft), R(ight), H(alt), T(urn), D(irection).
- conditional: detect what the robot is facing. =(true) or #(false) followed by R(obot), W(all), M(issile), L(aser), S(omething - any direction), ?(random).
- flow control: C(all) or G(oto) a label. Labels are defined at the beginning of a line and terminated by a >.
- attack: XL to fire the laser or XM to fire a missile.
The program starts at the label START>. Multiple commands on one line are separated by a colon :. If a condition fails the rest of the line is skipped.
Here's a simple example that manages to win a few battles:
*SIMPLE ; robot name START> ; start here F5 ; move forward 5 =W:T1 ; if facing a wall, turn 45° =?:T1 ; randomly turn 45° =R:XL ; if facing a robot, fire laser GSTART ; repeat from start
Thanks to the simplicity of the language, CRB makes the perfect introduction to programming games. So, does anyone fancy a tournament? ;-)