robo-code/robocode: Build the best – destroy the rest!
Robocode is a programming game, where the goal is to develop a robot battle tank to battle against other tanks in Java or .NET. The robot battles are running in real-time and on-screen.
robo-code/robocode: Build the best – destroy the rest!
Robocode is a programming game, where the goal is to develop a robot battle tank to battle against other tanks in Java or .NET. The robot battles are running in real-time and on-screen.


GunHeading.A Robot consists of:
Energy:
Ahead(double distance) & Back: Distance in pixels.
abs(velocity) * 0.5 - 1 (never < 0) (AdvancedRobot only)Velocity: Measured in pixels/turn. Max: 8px/turn. Accelerate: 1px/turn. Decelerate: 2px/turn.TurnLeft(double degrees) & TurnRight
(10 - 0.75 * abs(velocity)) deg/turn.Heading: Direction the tank is facing. Returns 0 to 360 (exclusive). 0 is North. 90 is East etc.Width & Height: Dimensions of the Robot. (36×36)Pew! Pew! Pew!!
GunHeat:
Fire when this is zero.GunCoolingRate. Default: 0.1 / turn.GunHeat is 3.Fire & FireBullet(double power): Bullet:
power between 0.1 and 3.power amount of energy. If power > energy, you become disabled.(4 * power). If power > 1, an additional 2 * (power - 1) damage.(3 * power) worth of energy.GunHeat increases with 1 + (power / 5).onBullHit, onBulletHitBullet and onBulletMissed events.20 - (3 * power)turnGunLeft and turnGunRight.
GunHeading: Direction the gun is facing. Returns 0 to 360 (exclusive). 0 is North. 90 is East etc.IsAdjustGunForRobotTurn: True = Guns turns separately of Body.Scans for other robots.
turnRadarLeft(double degrees) and turnRadarRight.
onScannedRobot events when another robot is detected.RadarHeading: Direction the radar is facing.IsAdjustRadarForGunTurn: True = Radar turns separately of Gun.IsAdjustRadarForRobotTurn: True = Radar turns separately of Body.The best way to debug your robot is, of course battling others!
Stuff that came into being during the making of this post
itenium-be/robocode: Example Eclipse and Visual Studio Robocode projects
Other interesting reads
robo-code/robocode: v1.9.3.3