Robots fight in a flat rectangular arena. Robots can not move beyond the walls of the arena and incur 1 energy damage when they collide with a wall. There are only 4 different object types in the arena; robots, energy missiles, mines, and bonus cookies. A robot's lateral movement can only be blocked by other robots and the arena walls. A robot's rotational movement can not be blocked.

Arena Size

  Minimum Maximum
Width 100 32767
Height 100 32767

A robot can determine the size of the arena using the _arenawidth and _arenaheight variables.

Arena Coordinates

The origin of the arena (0, 0) is the lower left corner. X values increase towards the right and Y values increase towards the top of the arena. A robot can obtain its position in the arena using the _xpos and _ypos variables.

Arena Angles

Rotational values are measured in degrees ranging from 0 to 359 inclusive. 0 degrees is towards the top of the arena, or map north. When compared to a robot's _xpos and _ypos variables, 0 degrees is in the direction of positive Y and 90 degrees is in the direction of positive X.

This differs from traditional Cartesian coordinate systems where 0 degrees is in the direction of positive X and 90 degrees is in the direction of positive Y. This difference does not cause any problems, but you must remember to check your usage of trigonometric operators and ensure they match Robot Battle's coordinate system.

A robot can obtain the orientation of its components and its direction of movement using the _bodyaim, _gunaim, _radaraim, and _heading variables.

See Also

robot attributes, cookie and mine attributes, missile attributes