ROBOTWAR Welcome to the battlefield of the future! It is the year 2002. Wars still rage, but finally, they have been officially declared hazardous to human health. Now, the only warriors are robots - built in secret and programmed to fight each other to the death! Your country has just developed the most efficient battle robot to date. It should be unbeatable - but part of its micro-computer "brain" is still blank. Only when a strategy is programmed into its memory will the robot be able to fight. The task set before you is to program a robot that no other robot can destroy. RobotWar is a fascinating and highly competitive game where robots battle each other to the death! RobotWar is not a game using manual dexterity, instead the robots are controlled by pre-programmed strategies and highly spectator interest. As well as providing hours of entertainment, RobotWar is designed to teach and sharpen the skills of creative computer programming. Whether you are a beginner or an accomplished programmer, RobotWar will prove to be fun and challenging. Robot war players design and write robot programs. The program is written with the help of a text-editor, and then translated by an assembler into robot-understandable instructions. The program can then be tested on a simulated robot to make sure it is working properly. Once the player is assured that the program is running as planned, it is installed in a battle robot and sent out to do battle with the other robots. From the main menu, several options are selectable. These options are described below: Option 1 This will access the Battle branch where the player can setup and execute one robot battle. See "robots and robot battles". Option 2 This will access the robotwar assembler and testing branch where the programs are translated and checked for errors, or tested on a simulated robot. See "the assembler" and "the test bench". Option 3 This will access the text-editor where an existing program can be edited or a new program can be written. See "writing and editing source code". Option 4 This is a simple control that turns the battle sounds on or off. Pressing the 4 key will change the position of the sound switch. Option 5 This will access the disk storage branch where a disk can be initialized for storing robot code. See "storing robots on auxiliary disks". Option 6 This will cause the computer to exit from the robotwar program to applesoft basic. Option 7 This will access the match scheduling branch where the player can schedule and execute a series of battles. See "robots and robot battles". Option 8 This will allow the player to run a previously scheduled or interrupted match (a series of battles). If you resume a previously interrupted match it will begin with the battle after the one which was interrupted. Note: If no option is selected from the main menu, the program will automatically select option 8. Robots and Robot Battles Locomotion Each robot is moved by tracks mounted on a 1.5 meter square chassis. The two independent motors, driving the tracks, enable the robot to move vertically (north/south) and horizontally (east/west). Power Supply The power supply will take the severest damage from the enemy shells. It is built into the central body of the robot, along with damage sensors. These sensors monitor the damage to the power supply and when 100% damage is attained, the robot will explode. Radar On top of the robot is a radar unit that emits a beam in any desired directions. This beam reflects from walls and other robots and returns to the robot. The beam is accurately timed, enabling the robot to find it's position and to spot enemy robots. Guns and Ammunition Your robot is equipped with one gun that swivels through 360 degrees and is automatically loaded. It uses time-fused shells that can be set to explode at any specified distance. The gun also has a cooling period between each shot to keep it from overheating. The Brain Inside the robot is a micro-computer "brain" that executes the instructions exactly as they have been programmed. The brain has several parts: an accumulator where a robot performs all arithmetic operations, a program storage area where the instructions are stored in memory, and registers where numbers are stored. the brain links to input sensors monitoring damage and position as well as to the drive motors, radar, and gun. While the robot is on the battlefield the brain is in complete control! The battlefield Robot battles take place on a square battlefield inside four strong walls. Each wall is 260 meters long and strong enough that a robot cannot crash or shoot through it. As many as five robots can fight at once, but only one will emerge as the winner. There is an observations station, directly above the battlefield, enclosed in blast-proof glass to protect you and the other observers. Damage Robots are eliminated from battle by incurring over 100% damage. When a shell hits a robot or explodes nearby, the robot is damaged. The extent of that damage depends on the proximity of the shell to the robot. A shell exploding directly on top of a robot can do 30% damage. A robot can also be damaged through collisions with walls or other robots. The extend of damage would depend on the angle of collision. A head-on collision between two robots can do 25% damage to both robots. The Scoring System Each robot has a score associated with it. As each battle is fought the robots earn points which are added to it's cumulative score. Every time a robot's program is changed, it's score is reset to 0. Robots earn points in the following manner. during a battle, every time a robot is destroyed, 1 point is earned by all of the survivors. Thus in a five-robot battle, the first to be destroyed receives 0 points. For outlasting that first robot, all other robots on the battlefield earn 1 point. For outlasting 4 other robots, the winner of a 5-robot battle earns 4 points! Controlling Robots A robot computer contains 34 registers. The 34 registers are divided into three categories: 1. Memory registers which are used to contain numbers for latter recall. 2. Input/Output (I/O) registers which are used to monitor and control specific robot functions. 3. The Index/Data pair of registers which are used to access the other registers by their numbers instead of their names. 1. Memory Registers There are 24 memory registers used to store numbers. The memory registers are named A through W and Z. (X and Y are not included - they are input registers as described below). 2. Input/Output Registers There are nine I/O registers that allow the computer to control the robot's actions. Each controls or monitors a specific robot function as described below: a) The X register: The X register is used to monitor the horizontal position of the robot. It always contains the current horizontal position of the robot on the battlefield, as a number from 0 to 256. o is at the extreme left of the battlefield and 256 is at the extreme right. b) The Y register: The y register is used to monitor the vertical position of the robot. 0 is at the top of the battlefield and 256 is at the bottom. c) The AIM Register: The AIM register is used to monitor and control the angle at which the gun is aimed. when a number from 0 to 359 is stored in the Aim register, the robot's gun will turn to that angle. 0 aims the gun due north, 90 aims it due east, etc. The AIM register always contains the current angular position of the gun. d) The RADAR register: The RADAR register is used to control the radar unit on top of the robot and monitor the results of the radar beam. Storing a number from 0 to 359 in the RADAR register, sends a beam out in that direction. e) The SHOT register: The SHOT register is used to fire the robot's gun and monitor the state of readiness of the gun. Storing a new number in the SHOT register: Sets the timer on the shell so that it will travel that number of meters before exploding, and then fires it. After a shot is fired the SHOT register will contain the state of the gun's cooling process. When the SHOT register contains a zero the gun is ready to be fired again. f) The DAMAGE register: The DAMAGE register is used to monitor the amount of damage detected by the damage sensors. the DAMAGE register starts at 100 at the beginning of each battle and decreases towards 0 as damage is incurred. When the register reaches 0, the robot is completely destroyed and will disappear from the battlefield. The DAMAGE register always contains the current extend of damage. g) the SPEEDX register: This register is used to control and monitor the horizontal speed of the robot. The number stored in the SPEEDX register can range from -255 to 255 and controls the direction and speed of the robot. A negative number moves the robot to the left at that many decimeters/second, and a positive number moves the robot to the right at that many decimeters/second. If a zero is stored in this register the robot will stop moving in the horizontal direction. The SPEEDX register always contains the horizontal speed of the robot. h) The SPEEDY register: Acts the same as the SPEEDX register, only in the vertical direction. A positive number is in a downward direction and a negative number is in an upward direction. i) The Random register: This register is used to control the random number generator. Storing a number in the RANDOM register sets the limit for the generator. Then, each time the RANDOM register is accessed, it will contain a different integer (whole number) between 0 and th random number limit which was previously set. [----------------------------------------------------------] | (0,0) (256,0) | | | | | | o | | o 0 o | | 315 | 45 | | o \ |/ o | | 270------.------90 | | o/ |\ o | | 225 | 135 | | | o | | 180 | | | | | | (0,256) (256,256) | [----------------------------------------------------------] 3. The index/Data Registers The robot registers are usually referenced by their names. The Index/Data pair allows registers to be accessed by number instead of name. Storing a number from 0 to 34 in the INDEX register causes the corresponding register to be used whenever the DATA register is referenced. For example, assume the INDEX register contains 27. When the DATA register is referenced in an instruction, register #27 (AIM) will be substituted for DATA. Number Name Type 1-23 A-W Storage 24 X Current X position 25 Y Current Y position 26 Z Storage 27 AIM Aims gun 28 SHOT fires the gun 29 RADAR pulses the radar 30 DAMAGE monitors damage 31 SPEEDX control horizontal speed 32 SPEEDY control vertical speed 33 RANDOM random number generator 34 INDEX Index other registers