All robots have the same physical structure and capabilities. When you create a new robot you have total control over the robot's behavior and the way it looks, but you can not modify its construction. This provides a level playing field for players to compete purely on the intelligence and adaptability of their robots. The best robots are not physically stronger than the worst. The best robots are the most cunning.
A robot's size is defined by an upright square measuring 33 x 33 units. Even when a robot rotates, its outside boundary does not change. You can see this clearly in the game by opening the Settings Window, then click the Animation/Sound tab, and checking "Collision Boxes".

Gun Cooling
After firing an energy missile, a robot's gun requires time to cool before another missile can be fired. The resulting gun heat depends upon the amount of energy used in the last call to the fire command. The formula used to calculate initial gun heat is:
(2 * energy) + 12
Energy is the valued passed to the
fire command. After each turn, the gun cools by one. The
_gunheat variable can be used to determine the amount of heat remaining in
the gun.
Lateral Movement
This table shows a robot's lateral movement characteristics. Speed is measured in units per turn. Within the arena a robot's lateral movement can only be blocked by other robots or walls. Robots move laterally using the ahead and back commands. A robot's top speed is controlled with the speedtarget command, while its acceleration and deceleration are controlled with the acceltarget and deceltarget commands respectively.
| Minimum | Maximum | |
| Speed | 0 | 25 |
| Acceleration | 0 | 2 |
| Deceleration | 0 | 5 |
Robot Battle rotates and moves a robot laterally in separate steps during its turn. Since rotation and movement do not occur at the same time, robots move along small straight line segments rather than actual curved paths. Robots only appear to move along curves because these line segments are small.
If you are interested in the details, the movement equations in Robot Battle follow the 2D straight line motion formulas below. In these equations v0 is current _velocity, v1 is the calculated _velocity for the robot's next turn, a is _accel for the current turn (see comments below), and t is time which is most often 1.0 (more comments below).
Δx = v0
* t + (a * t^2) / 2
v1 = v0 + a * t
It is difficult to predict a robot's exact movements even knowing these formulas. For example, when a robot nears _speedtarget it moves with two different acceleration rates during one turn. Over the first portion of the turn it accelerates at the _acceltarget rate while over the remaining time the robot has zero acceleration. Another complication is predicting when a robot will begin deceleration. Internally, the game initiates deceleration in order to best match a robot's _deceltarget rate. The final complication is that the _accel variable actually contains the acceleration rate used in a robot's previous turn (see _accel for more information).
Rotational Movement
A robot's rotational movement can not be blocked by other objects or walls. A robot's components are rotated using the following commands: bodyleft, bodyright, gunleft, gunright, radarleft, and radarright. Each of these commands changes the angle of only one robot component unless either the lockall or lockgun command has been called.
The rest of this topic describes rotation rates for each component. As a new robot author, you do not need to understand these details. It is enough to know that when you pass a desired rotation amount to a rotation command, the component always rotates the amount you specify. You only need to understand the details below to determine how many turns it will take a component to complete a rotation command.
Each of a robot's three components has its own rotation rate. Rotation is measured in degrees per turn. Clockwise is positive while counter-clockwise is negative. The table below lists the maximum rotation rate relative to the ground of each component when it rotates in isolation.
| Maximum Rotate Rates | |
| Body | ±5 |
| Gun | ±10 |
| Radar | ±15 |
When additive rotation is disabled (on the advanced tab in the New Match window), the numbers in the table above are all that matters. The rotation of one component has no effect on the rotation of other components.
Disabled Additive Rotation Example (all components start facing 0 degrees):
Produces the actual rotation rates below. When all rotations are complete, all
components will be facing 180 degrees.
body: 5
gun: -10
radar: -15
When additive rotation is enabled, the rotation of each component affects the actual rotation rate of the component immediately above it. Additive rotation has no effect on the final angle of each component, it only affects the number of turns it takes for components to complete rotation commands.
When calculating a component's actual rotation rate relative to the ground, you must account for the rotation of the component below it. Since a robot's body sits on the ground, its actual rotation rate is always between ±5 degrees per turn. The gun's actual rotation rate relative to the ground is determined by adding the body's actual rotation rate to the gun's isolated rate of ±10. Likewise, the radar's actual rotation rate is determined by adding the gun's actual rotation rate to the radar's isolated rate of ±15.
When additive rotation is enabled, a component that has not been rotated will automatically counter-rotate to remain in place if the component below it rotates. For example, if a robot issues only a bodyleft command, the gun automatically rotates right at the same rate so that it remains in place. The best way to calculate rotation rates it to start with the body component and work your way up.
Additive Rotation Example 1 (all components start facing 0 degrees):
Produces the actual rotation rates below. When all rotations are complete, all
components will be facing 180 degrees.
body: 5
gun: 5 + -10 = -5
radar: -5 + -15 = -20
Additive Rotation Example 2 (all components start facing 0 degrees):
Produces the actual rotation rates below. When all rotations are complete, the
body and radar will be facing 180 degrees and the gun will remain at 0 degrees.
body: 5
gun: 5 + -5 = 0 (since the gun was not rotated, it compensates to remain in place)
radar: 0 + -15 = -15
See Also
game turns, arena attributes, cookie and mine attributes, missile attributes