Next Previous Contents

5. The bot-creator

The botcreator is probably where you will spend most of your time with BattleBots.

5.1 Components of bot creator

The bot-creator consists of five fields:

-The menu
-The cycle counter
-The program window
-The hardware window
-The picture window

The first thing you should do when you create your bot is decide upon the hardware. In the rightmost frame you choose the amount of RAM (decides how big program you can make) and selects up to 32 hardware devices. Each of the hardware slots has a number of settings:

In the combobox you select the sort of device you want. The five buttons below sets the "level" , or how good the device is. The white box can contain special arguments that some devices need. It is currently used for two tasks: telling the turret which device it should turn, and telling non-turreted hardware at which dir (relative to the bots) it should point to. (In this case the circle is 0-255). The cost of every device is shown (as checked against current.cfg). The "info" button gives information on in/out ports for that device.

When you've chosen all the hardware it might be time to do the programming. Code is entered in the largest white field. To compile the code to a bot that can be simulated you should press Assemble under the menu Assemble. When you assemble your bot the smaller textfield to the left of the editor is filled with numbers, those are counts of how many cycles it will take for the CPU to execute each line of code.

If you want to check if your bot breaks any of the rules in the config press: "Check against Config" in the Tests menu.

It might be a good idea to use "Quick Battle" when you develop your bots. This is a feature where you define a number of predefined contestants (this is done with "config quick battle"). Then all you have to do to test your "in development" bot in battle is press "Quick battle".

A Quick Battle starts in a paused state. This is because you might want to see what happens with the register contents or other stuff for debug purposes. So a "debug" window is shown where contents of registers and of some memory locations are shown. In addition the debugwindow has a white box where instructions executed by your bot the latest round is shown. This feature only works if you've "assembled" just before you started the simulation (regardless of whether you actually made any changes!). Also a "dumpmem" button is present. When you press this button the contents of your bots RAM is dumbed to a binary file. The name of this file is of the form: BBdump#.bin, where # is he number of the first "free" (eg. nonexistant) file between 0 and 255.

The final field is the button at the bottom of the window. Here you can load the graphics that you want your bot to have. The botgraphics consists of a number of pictures 32x32 in size. You can have rows and columns. Each column contains the pictures for the bots at a slightly different angle, and if you have several rows, the bot will "animate" between the rows as he travels.


Next Previous Contents