Robocode Updated By Java Junkies
These Robocode updates were an effort by a group of software engineering students at
the University of Florida.
2.1 Battlefield Additions
Additions to the regular battlefields include obstacles and power ups.
Obstacles are rectangular areas found in the battlefield that a robot can not drive
over, shoot through, or scan other robots through.
Power ups are small batteries found in the battlefield that when driven over, return
energy to the robot. Robots also have updated methods to react to scans of these
power ups, and react to the event of actually picking up these power ups.
Along with these battlefield additions, a battlefield creation system has been put into
place. To create a custom battlefield, create a new Text Document in the userBattlefields
folder of your robocode directory and save it as a .map file. The name of your .map file
will reflect the name of the map within the game. Use the following template in your
.map file to create your custom battlefield.
width “width of battlefield in integer format”
height “height of battlefield in integer format”
obstacle “x coordinate location 1” “y coordinate location 1” “obstacle width 1” “obstacle height 1”
obstacle “x coordinate location 2” “y coordinate location 2” “obstacle width 2” “obstacle height 2”
…… ………………. ………………….. ………………. ……………
powerUp “x coordinate location 1” “y coordinate location 1” “powerup respawn time 1”
powerUp “x coordinate location 2” “y coordinate location 2” “powerup respawn time 2”
…….. ………………….. …………………… ………………………
obstacle 200 400 100 100
obstacle 400 200 80 80
powerUp 400 400 50
powerUp 20 20 100
Because of the power provided by the map creation system, it is possible to create maps
that are too large for your computer to handle. Please be aware of this when defining the
map dimensions and the number of obstacles and power ups in the map. It should also be
known that creating an obstacle larger than map will cause a system crash.
New battlefields and user created battlefields can be found within the same menu tab as
the battlefield size changing options can be found.
2.2 Robot Creation Wizard
The Robot Creation Wizard is a new menu in Robocode that allows users to create and
compile robots that can be used within Robocode. The user does not need programming
experience to be able to create these robots.
To open the menu, click the “Robot” drop down list. Click “Editor” to open the robot
editor. From the robot editor, click “File,” then click “New,” and finally click “Use Robot
Generator.” This begins the robot creation process. Proceed to type in your robots name
and package name, then the Robot Creation Editor will open.
Use the buttons found within the “Robot Attributes” panel to change the color of your
robot. Use the tabs found within the “Robot Behavior” panel to show the options for that
specific robot event. When finished creating your robot, click the “Compile” button to
save your robot into the selected folder; however, be aware that only robots found in your
“Robot” folder of your Robocode directory will be accessible from within the game’s
robot selection menu.