home *** CD-ROM | disk | FTP | other *** search
- OMEGA : Neural Cybertank Design and Simulation
-
- The following is a listing of the appendices in the Cybertank
- Engineer's Handbook. It includes the syntax of all the available commands
- and variables. If you have any background in programming, this should be
- all that you will need to program a tank.
-
-
- CCL RESERVED WORDS
-
- The following list of words cannot be used in user defined variables.
-
- ACTIVE ALIGN ALIGNED ALLY ARE
- ARMOR AT AVAILABLE BACKWARD BEEP
- BEING BEYOND BRANCH BREAK CLEAR
- CLOSEST CODE COMMLINK COPY DATA
- DESTRUCT DETECT DIRECTION DISTANCE DO
- DOWN EMPTY ENEMY FACE FACING
- FIRE FOR FORWARD FOUND FROM
- FUEL FUNCTIONAL GET GOSUB GOTO
- HQ IF INACTIVE INCLUDE INTERNAL
- IS JAM KEY KIT LAST
- LAUNCH LEFT LOCK LOCKED LOWER
- MOVE MOVEMENT NOT OBJECT OBSTRUCTED
- OBSTRUCTION OFF ON PRESSED RAISE
- RANDOM RANGE REMAINING REMOTE REPAIR
- RESUME RETURN RIGHT ROTATE SCAN
- SCANNED SCANNER SELF SHIELD SIGNAL
- SWITCH TANK TEAM THEN TO
- TRANSMIT TREADS TURN UNAVAILABLE UNLOCK
- UNLOCKED UP WAS WEAPON WITH
- WITHIN
-
- CCL SYSTEM VARIABLES
-
- The following is a list of all the CCL System Variables, Feel free
- to use them, but remember that they cannot be altered or used as labels.
-
- AllyCode AllyDir AllyDist AllyEnemyDir
- AllyEnemyDist AllyEnemyX AllyEnemyY AllyHQX
- AllyHQY AllyNum AllyX AllyY
- ArmorDamage CopyCode CopyDir CopyDist
- CopyEnemyDir CopyEnemyDist CopyEnemyX CopyEnemyY
- CopyNum CopyX CopyY EnemyDist
- EnemyHQDist EnemyHQX EnemyHQY EnemyX
- EnemyY FuelLevel IntDamage KitsLeft
- ObjDist ObjType ObjX ObjY
- ObstacleDist ObstacleType ObstacleX ObstacleY
- RandomNum RemotesLeft ScanDamage ScanDir
- TankDir TankNum TankX TankY
- TreadDamage XYDist WeapDamage
-
- The following are complete descriptions of the system variables.
-
- AllyCode Code transmitted by team member. This value ranges from 1-100.
-
- AllyDir The last direction heading of a transmitting team member.
-
- AllyDist The distance between the transmitting and recieving tanks.
-
- AllyEnemyDir The direction heading of the last enemy tank scanned by
- the transmitting team member.
-
- AllyEnemyDist The distance to the enemy tank as it was last scanned by the
- transmitting team member.
-
- AllyEnemyX The X coordinate of the last enemy scanned by the transmitting
- team member, ranging from 1 to 62.
-
- AllyEnemyY The Y coordinate of the last enemy scanned by the transmitting
- team member, ranging from 1 to 62.
-
- AllyHQX The X coordinate of your team's headquarters.
-
- AllyHQY The Y coordinate of your team's headquarters.
-
- AllyNum The identification number of the transmitting team member,
- based on the order in which it was selected in the
- Simulation Design Module.
-
- AllyX The X coordinate of the transmitting team member.
-
- AllyY The Y coordinate of the transmitting team member.
-
- ArmorDamage This is the % of damage to the armor, ranging from 0 (intact)
- to 100 (destroyed).
-
- CopyCode Holds a copy of AllyCode when COPY COMMLINK DATA command
- is executed.
-
- CopyDir Holds a copy of AllyDir when COPY COMMLINK DATA command
- is executed.
-
- CopyDist Holds a copy of AllyDist when COPY COMMLINK DATA command
- is executed.
-
- CopyEnemyDir Holds a copy of AllyEnemyDir when COPY COMMLINK DATA command
- is executed.
-
- CopyEnemyDist Holds a copy of AllyEnemyDist when COPY COMMLINK DATA command
- is executed.
-
- CopyEnemyX Holds a copy of AllyEnemyX when COPY COMMLINK DATA command
- is executed.
-
- CopyEnemyY Holds a copy of AllyEnemyY when COPY COMMLINK DATA command
- is executed.
-
- CopyNum Holds a copy of AllyNum when COPY COMMLINK DATA command
- is executed.
-
- CopyX Holds a copy of AllyX when COPY COMMLINK DATA command
- is executed.
-
- CopyY Holds a copy of AllyY when COPY COMMLINK DATA command
- is executed.
-
- EnemyDist The distance between your tank and the last scanned enemy.
-
- EnemyHQDist The distance between your tank and the enemy headquarters.
- (Unknown until the Enemy HQ is found by you or transmitted
- by a team member)
-
- EnemyHQX The X coordinate of the enemy headquarters.
- (Unknown until the Enemy HQ is found by you or transmitted
- by a team member)
-
- EnemyHQY The Y coordinate of the enemy headquarters.
- (Unknown until the Enemy HQ is found by you or transmitted
- by a team member)
-
- EnemyX The enemy tank's last scanned X coordinate.
-
- EnemyY The enemy tank's last scanned Y coordinate.
-
- FuelLevel Amount of fuel remaining, ranging from 0 (empty) to 100 (Full).
-
- IntDamage This is the % of damage to the internals, ranging from
- 0 (intact) to 100 (destroyed).
-
- KitsLeft The number of repair kits available.
-
- ObjDist The distance between your tank and the last scanned object.
-
- ObjType The type of object last scanned.
-
- ObjX The X position of the last scanned object.
-
- ObjY The Y position of the last scanned object.
-
- ObstacleDist The distance between your tank and the last scanned movement
- obstacle. Ranges from 0 to 3.
-
- ObstacleType The type of movement obstacle last scanned (see next section).
-
- ObstacleX The X coordinate of the last scanned movement obstacle.
-
- ObstacleY The Y coordinate of the last scanned movement obstacle.
-
- RandomNum Holds the number generated by the GET RANDOM Command.
-
- RemotesLeft The number of remote scanners left.
-
- ScanDamage This is the % of damage to the scanners, ranging from
- 0 (intact) to 100 (destroyed).
-
- ScanDir The direction the scanner is currently facing (0 to 7).
-
- TankDir The direction the tank is currently facing (0 to 7).
-
- TankNum This is the number of your tank, based on the order it
- was selected in the SDM.
-
- TankX Your tank's current X coordinate.
-
- TankY Your tank's current Y coordinate.
-
- TreadDamage This is the % of damage to the treads, ranging from
- 0 (intact) to 100 (destroyed).
-
- XYDist The distance between your tank and the specified coordinates
- calculated by the GET DISTANCE TO X Y command.
-
- WeapDamage This is the % of damage to the weapons, ranging from
- 0 (intact) to 100 (destroyed). The tank can still function
- with a destroyed weapon.
-
-
- OBJECT TYPES
-
- The following list contains the possible values that ObjectType can have.
-
- Type Value Description
- 00 No Object
- 01 Roads, Grass, Etc...
- 02 Water
- 03 Damaged Cybertanks, squashed trees, craters
- 04 Trees
- 05 Houses, HQ
- 06 Buildings, barriers (Indestructible)
- 07 and up Cybertanks
-
- Types 3-5 are destructible, while object type 6 is indestructible.
-
- Types 2 and up are detectable by the Movement Obstacle Sensor.
-
- Types 4-6 block a scanner's line of sight when scanning for enemy
- tanks, etc.
-
-
- QUICK SYNTAX GUIDE
-
- All the commands that are available. Words in [] are not needed,
- but make the code easier to read. Where "x" "y" are found, you type a
- number between 1 and 62, separated by a SPACE (not a comma). "label" is
- any word that does not include any of the reserved words.
-
- Tank Movement
- MOVE [TANK] FORWARD "#" 40 cycles/space
- MOVE [TANK] BACKWARD "#"
- TURN [TANK] LEFT "#" 16 cycles/angle
- TURN [TANK] RIGHT "#"
- TURN [TANK] TO "angle"
- TURN [TANK] TO "x" "y"
- TURN [TANK] TO FACE [ENEMY] [TANK]
- TURN [TANK] TO FACE ENEMY HQ
- ALIGN TANK [WITH SCANNER] 16 cycles/angle
- IF TANK [IS] ALIGNED [WITH SCANNER] THEN [BRANCH TO : DO] "label"
- IF TANK [IS] NOT ALIGNED [WITH SCANNER] THEN [BRANCH TO : DO] "label"
- IF [MOVEMENT IS] OBSTRUCTED THEN [BRANCH TO : DO] "label"
- IF [MOVEMENT IS] NOT OBSTRUCTED THEN [BRANCH TO : DO] "label"
- IF OBSTRUCTION [IS] ENEMY HQ THEN [BRANCH TO : DO] "label"
- IF OBSTRUCTION [IS] ALLY HQ THEN [BRANCH TO : DO] "label"
- IF TANK [IS] FACING [ENEMY] TANK THEN [BRANCH TO : DO] "label"
- IF TANK [IS] NOT FACING [ENEMY] TANK THEN [BRANCH TO : DO] "label"
- IF TANK [IS] FACING ENEMY HQ THEN [BRANCH TO : DO] "label"
- IF TANK [IS] NOT FACING ENEMY HQ THEN [BRANCH TO : DO] "label"
- IF TANK [IS] FACING "x" "y" THEN "label"
- IF TANK [IS] NOT FACING "x" "y" THEN "label"
- DETECT [OBSTRUCTION] AT "#"
- DETECT [OBSTRUCTION] AT TANK DIRECTION
- DETECT [OBSTRUCTION] AT SCANNER DIRECTION
- IF [TANK] TREADS [ARE] FUNCTIONAL THEN [BRANCH TO : DO] "label"
- IF [TANK] TREADS [ARE] NOT FUNCTIONAL THEN [BRANCH TO : DO] "label"
-
- Using the Scanner
- ROTATE [SCANNER] LEFT "#"
- ROTATE [SCANNER] RIGHT "#"
- ROTATE [SCANNER] TO "angle"
- ROTATE [SCANNER] TO "x" "y"
- ROTATE [SCANNER] TO FACE [ENEMY] TANK
- ALIGN SCANNER [WITH TANK]
- SCAN FOR [ENEMY] TANK
- SCAN FOR [CLOSEST] OBJECT
- SCAN FOR ENEMY HQ
- LOCK SCANNER
- UNLOCK SCANNER
- JAM [SCANNER SIGNAL]
- LAUNCH [REMOTE SCANNER]
- IF SCANNER [IS] FUNCTIONAL THEN [BRANCH TO : DO] "label"
- IF SCANNER [IS] NOT FUNCTIONAL THEN [BRANCH TO : DO] "label"
- IF SCANNER [IS] ALIGNED [WITH TANK] THEN [BRANCH TO : DO] "label"
- IF SCANNER [IS] NOT ALIGNED [WITH TANK] THEN [BRANCH TO : DO] "label"
- IF [ENEMY] TANK [WAS] FOUND THEN "label"
- IF [ENEMY] TANK [WAS] NOT FOUND THEN "label"
- IF [CLOSEST] OBJECT [WAS] FOUND THEN [BRANCH TO : DO] "label"
- IF [CLOSEST] OBJECT [WAS] NOT FOUND THEN [BRANCH TO : DO] "label"
- IF ENEMY HQ [WAS] FOUND THEN [BRANCH TO : DO] "label"
- IF ENEMY HQ [WAS] NOT FOUND THEN [BRANCH TO : DO] "label"
- IF [CLOSEST] OBJECT [IS] ENEMY HQ THEN [BRANCH TO : DO] "label"
- IF [CLOSEST] OBJECT [IS] ALLY HQ THEN [BRANCH TO : DO] "label"
- IF [SCANNER IS] LOCKED THEN "label"
- IF [SCANNER IS] UNLOCKED THEN "label"
- IF [TANK IS] BEING SCANNED THEN [BRANCH TO : DO] "label"
- IF [TANK IS] NOT BEING SCANNED THEN [BRANCH TO : DO] "label"
- IF REMOTE [SCANNER IS] AVAILABLE THEN [BRANCH TO : DO] "label"
- IF REMOTE [SCANNER IS] UNAVAILABLE THEN [BRANCH TO : DO] "label"
-
- Using the Weapon
- FIRE [WEAPON] AT [ENEMY] TANK
- FIRE [WEAPON] AT [CLOSEST] OBJECT
- FIRE [WEAPON] AT OBSTRUCTION
- FIRE [WEAPON] AT "x" "y"
- FIRE [WEAPON] AT TANK DIRECTION
- FIRE [WEAPON] AT SCANNER DIRECTION
- FIRE [WEAPON] AT ENEMY HQ
- IF WEAPON [IS] FUNCTIONAL THEN [BRANCH TO : DO] "label"
- IF WEAPON [IS] NOT FUNCTIONAL THEN [BRANCH TO : DO] "label"
- IF [ENEMY] TANK [IS] WITHIN [WEAPON] RANGE THEN [BRANCH TO : DO] "label"
- IF [ENEMY] TANK [IS] BEYOND [WEAPON] RANGE THEN [BRANCH TO : DO] "label"
- IF [CLOSEST] OBJECT [IS] WITHIN [WEAPON] RANGE THEN [BRANCH TO : DO] "label"
- IF [CLOSEST] OBJECT [IS] BEYOND [WEAPON] RANGE THEN [BRANCH TO : DO] "label"
- IF ENEMY HQ [IS] WITHIN [WEAPON] RANGE THEN [BRANCH TO : DO] "label"
- IF ENEMY HQ [IS] BEYOND [WEAPON] RANGE THEN [BRANCH TO : DO] "label"
-
- Tank Status
- IF FUEL [IS] REMAINING THEN [BRANCH TO : DO] "label"
- IF FUEL [IS] EMPTY THEN [BRANCH TO : DO] "label"
- SELF DESTRUCT
-
- Defense Shield
- RAISE [SHIELD]
- LOWER [SHIELD]
- IF SHIELD [IS] UP THEN [BRANCH TO : DO] "label"
- IF SHIELD [IS] DOWN THEN [BRANCH TO : DO] "label"
-
- Tank Repairs
- REPAIR INTERNAL
- REPAIR ARMOR
- REPAIR TREADS
- REPAIR SCANNER
- REPAIR WEAPON
- IF [REPAIR] KIT [IS] AVAILABLE THEN [BRANCH TO : DO] "label"
- IF [REPAIR] KIT [IS] UNAVAILABLE THEN [BRANCH TO : DO] "label"
-
- Using the CommLink
- TRANSMIT [CODE] "#" [TO TEAM]
- CLEAR [COMMLINK] DATA
- COPY [COMMLINK] DATA
- SWITCH [COMMLINK] ON
- SWITCH [COMMLINK] OFF
- IF ALLY TANK "#" [IS] ACTIVE THEN [BRANCH TO : DO] "label"
- IF ALLY TANK "#" [IS] INACTIVE THEN [BRANCH TO : DO] "label"
-
- Miscellaneous Commands
- GET DISTANCE [TO] "x" "y"
- GET RANDOM [TO "#"]
- BEEP
- BREAK
-
- Manual Control
- IF KEY [PRESSED] THEN [BRANCH TO : DO] "label"
- IF [LAST] KEY [PRESSED] = "1 character" THEN [BRANCH TO : DO] "label"
-
- System Commands
- BRANCH TO "label"
- GOTO "label"
- DO "label"
- GOSUB "label"
- RESUME
-
- Using Library Capsules
- INCLUDE "capsule filename"
-
-
- Authorization Errors
-
- DUPLICATE LABEL FOUND
- Occurs when the same label is used twice in the AI.
-
- MAXIMUM NUMBER OF LABELS EXCEEDED
- Too many labels, or labels too long. Try shorter labels.
-
- UNKNOWN COMMAND
- Unrecognized command, usually because of a typo.
-
- USER VARIABLES EXCEEDED
- You are only allowed 32 variables in a program.
-
- DOES NOT COMPUTE IN LINE
- Occurs if command is incompete, ie "SCAN FOR FRIENDLY TANK", which
- almost makes sense.
-
- VALUE USED OUT OF RANGE...
- Occurs when a value in a statement is not within the allowed
- range, ie "TURN TANK TO 9", where 9 is not between 0-7.
-
- THE LABEL ... WAS NOT FOUND...
- Occurs when you try to reference a label that does not exist.
-
- THE FOLLOWING LINE IS AN ILLEGAL LABEL
- A label must be on the left margin, a line must be tabbed over.
-
- THE FOLLOWING LABEL IS TOO LONG
- A label must not be any longer than 10 characters.
-
- THE FOLLOWING CAPSULE WAS NOT FOUND
- You are attempting to include a capsule that is not on the disk.
- Check your spelling of the name.
-
- IF YOU INCLUDE A CAPSULE, THAT CAPSULE CANNOT INCLUDE ANOTHER
- You cannot imbed INCLUDEd capsules.
-
- YOUR TANK MUST HAVE INTELLIGENCE BEFORE IT CAN BE AUTHORIZED
- Your tank must have AI.
-
- YOU ARE MISSING ONE OR MORE ITEMS FROM YOUR TANK'S CHASSIS
- Your tank must have one of all the major items; Weapon, scanner, etc.
-
- THE COST OF YOUR TANK'S CHASSIS EXCEEDS YOUR AVAILABLE BUDGET
- Your tank's chassis cannot exceed your budget.
-
-
- The following is a sample listing of 'DINKY', in your resource
- directory.
- This is just a very simple tank. Your tank can be as complex as
- you wish.
-
- * * * * * * * * * * * * * * * * *
- * *
- * D I N K Y *
- * *
- * * * * * * * * * * * * * * * * *
- * *
- * CODE: OSI-D0923-23122-000 *
- * *
- * DESIGNER: STUART B. MARKS *
- * *
- * STANDARD CLEARANCE REQUIRED *
- * *
- * * * * * * * * * * * * * * * * *
-
-
- START
- DO TANKSEARCH
- DO ATTACKTANK
- BRANCH TO START
-
- * The following routine will
- * search for an enemy until one
- * is found. Until an enemy is
- * found, the cybertank will move
- * forward, if possible. If not
- * possible, the cybertank will
- * randomly either turn left or
- * right.
-
- TANKSEARCH
- SCAN FOR ENEMY TANK
- IF ENEMY TANK WAS FOUND THEN TANKFOUND
- ROTATE SCANNER LEFT 1
- DETECT OBSTRUCTION AT TANK DIRECTION
- IF MOVEMENT IS OBSTRUCTED THEN CHANGEDIR
- MOVE FORWARD 1
- BRANCH TO TANKSEARCH
-
- CHANGEDIR
- GET RANDOM TO 2
- IF RANDOMNUM = 1 THEN CD1
- CD0
- TURN TANK LEFT 1
- DETECT OBSTRUCTION AT TANK DIRECTION
- IF MOVEMENT IS OBSTRUCTED THEN BRANCH TO CD0
- BRANCH TO TANKSEARCH
- CD1
- TURN TANK RIGHT 1
- DETECT OBSTRUCTION AT TANK DIRECTION
- IF MOVEMENT IS OBSTRUCTED THEN BRANCH TO CD1
- BRANCH TO TANKSEARCH
-
- TANKFOUND
- RETURN
-
- * The following routine, assuming
- * an enemy was found, will close
- * in on the enemy until it is
- * within firing range.
-
- ATTACKTANK
- SCAN FOR ENEMY TANK
- IF ENEMY TANK WAS NOT FOUND THEN TANKISGONE
- IF ENEMY TANK IS WITHIN RANGE THEN KILLTANK
- DETECT OBSTRUCTION AT SCANNER DIRECTION
- IF MOVEMENT IS OBSTRUCTED THEN DO CLEARPATH
- ALIGN TANK WITH SCANNER
- MOVE TANK FORWARD 1
- BRANCH TO ATTACKTANK
-
- * Assuming the enemy is within
- * weapon range, the following
- * routine will fire at the enemy
-
- KILLTANK
- FIRE WEAPON AT ENEMY TANK
- BRANCH TO ATTACKTANK
-
- TANKISGONE
- RETURN
-
- * The following routine will try
- * clearing a path around whatever
- * is obstructing movement.
-
- CLEARPATH
- IF OBSTACLETYPE = 6 THEN PATHBLOCK
- IF OBSTACLETYPE = 2 THEN PATHOK
- FIRE WEAPON AT OBSTRUCTION
- PATHOK
- RETURN
- PATHBLOCK
- FINDDIR = SCANDIR
- PATHCHECK
- DETECT AT FINDDIR
- IF NOT OBSTRUCTED THEN PATHTURN
- IF OBSTACLETYPE = 2 THEN PATHTURN
- FINDDIR = FINDDIR + 1
- GOTO PATHCHECK
- PATHTURN
- IF TANKDIR = FINDDIR THEN PATHMOVE
- TURN TANK TO FINDDIR
- PATHMOVE
- MOVE TANK FORWARD 1
- RETURN
-
-
- Another fine doc file from
- The Mad Romulan
-
-