|
|
 |
 |
 |
 |
 |
SECTION BRIEF - One of the most interesting simulation possibilities
is that of manually controlled cybertanks. By pressing various keys on the computer
terminal, a cybertank designer can exercise a great deal of control over the cybertank.
All cybertanks are equipped with what Is known as a Cybertank Remote System
(CRS). The CRS is basically a link between your terminal’s keyboard and your cybertank.
By issuing single letter commands [A-Z] from your terminal’s keyboard during simulations,
you can greatly alter the behavior of your cybertank.
Cybertanks that rely on the CRS to respond to keyboard control are often called
Manual cybertanks. Manual cybertanks have a tremendous advantage over standard AI
cybertanks because the cybertank benefits from the designer’s logic and reasoning
capabilities during a simulation. When designing Manual cybertanks, complex routines
to move around indestructible buildings, avoid water, or retreat from the enemy
are unnecessary. Such routines can be handled by the cybertank designer during the
simulation.
Attaining manual Control is a rather simple process. In the following example,
the CCL code continually checks to see if the last key pressed is an “I”, "K", “K”,
“M”, or ” ” (space). If the last key pressed is one of these keys, the on-board
computer system will branch to the appropriate label. After the cybertank turns
or moves forward, the on-board computer system branches back to the ReadKey label
and the process is repeated.
ReadKey
If Last Key Pressed = "I" then Branch to TurnNorth
If Last Key Pressed = "J" then Branch to TurnWest
If Last Kev Pressed = "M" then Branch to TurnSouth
If Last Key Pressed = "K" then Branch to TurnEast
If Last Key Pressed = " " then Branch to MoveForward
Branch to ReadKey
TurnNorth
Turn Tank to 0
Branch to ReadKey
TurnWest
Turn Tank to 6
Branch to ReadKey
TurnSouth
Turn Tank to 4
Branch to ReadKey
TurnEast
Turn Tank to 2
Branch to ReadKey
MoveForwd
Move Tank Forward 1
Branch to ReadKey
By using the above CCL, you con completely control the movement of your cybertank.
If you want your cybertank to turn to the west, move forward one hectometer. And
then turn to the south, you would press "J", " ", “M”.
For a complete discussion of Manual cybertanks please see Part 3, Section 5.7).
|
 |
|
 |
 |
 |
|