On a Linux machine, start up a few terminals. In the first terminal you'll start a BZFlag server. The following command will do nicely:
bzfs -c -d -set _inertiaLinear 1 -set _inertiaAngular 1 \ -set _tankAngVel 0.5 -set _rejoinTime 0 -set _grabOwnFlag 0
The server will sit there, waiting for users to connect to it. Feel free to minimize the window for now.
Next you'll start a BZFlag observer. Note that the BZFlag client usually likes to take full control of the screen, keyboard, and mouse. However, since you're going to be doing things in other programs, too, BZFlag should be started in a window. To do this, run the following command:
bzflag -window 1024x768
Select "Join Game," and set the Team to "Observer." Since no one has joined the game yet, the observer is fairly boring. Start up some robots and connect them to the server. To do this, run the following in a terminal:
bzrobots -team green -solo 2 -p 3000
Go back to your observer. You should notice that two tanks have joined the game. They're happy to follow orders as soon as they're given. In the meantime, they will sit patiently.
Open up another terminal and run:
telnet localhost 3000
You are now connected to the bots. The bots should introduce themselves by saying:
bzrobots 1
Complete the introductions by typing:
agent 1
The bots now recognize you and are happy to follow your bidding. Just for fun, send the following instruction to the first bot, whose id is 0:
shoot 0
In the observer you should see a shot fired from one of the bots. While the first bot's cannon is being loaded, tell the second bot, whose id is 1, to shoot:
shoot 1
You can also move the bots around. You can set a desired speed, where 1.0 is the maximum forward speed, and -1.0 is maximum reverse speed. Similarly, you can set a desired angular velocity, where 1.0 is maximum counter-clockwise and -1.0 is maximum clockwise. Just specify the command, bot, and value, like so:
speed 0 1.0 angvel 0 0.5 speed 1 -0.7 speed 0 0.0 angvel 0 0.0 speed 1 0.0
This will set the speed of bot 0 to maximum forward speed, and then tell it to rotate counter-clockwise at half of the maximum possible angular velocity. Then the second bot is told to go in reverse at 70% of the maximum possible speed. Finally, the two tanks are stopped.