home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / GAMES / T_ROBS20.ZIP / T-ROBOTS.DOC < prev    next >
Text File  |  1992-02-09  |  42KB  |  1,141 lines

  1.                           
  2.                           
  3.                           
  4.                           
  5.                           
  6.                           
  7.                           
  8.                           
  9.                             ____________________
  10.                           /                      \
  11.                         /      T-Robots v2.00      \
  12.                       /        --------------        \
  13. ----------===========<      By:  Ed T. Toton III      >===========----------
  14.                       \   (c) copyright 1991, 1992   /
  15.                         \   All rights reserved.   /
  16.                           \______________________/  
  17.                           
  18.                       Special thanks to Jeremy Kusnetz
  19.                             & Kenneth B. Foreman
  20.                             
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 0 
  61.  
  62.                          ---  Table of Contents  ---
  63.  
  64.  
  65.             Things you should have............................1
  66.  
  67.             Legal Stuff.......................................2
  68.  
  69.             Introduction to T-robots..........................2
  70.  
  71.             Technical information.............................2
  72.  
  73.             Running T-Robots..................................2
  74.  
  75.             Basics of T-Robots................................4
  76.  
  77.             The programming language..........................5
  78.  
  79.             Command lists and descriptions....................6
  80.  
  81.             IF statement lists and descrip...................11
  82.  
  83.             Programming the robots...........................13
  84.  
  85.             Staging a competition............................15
  86.  
  87.             Trouble-shooting and Speed-control...............15
  88.  
  89.             More legal stuff.................................16
  90.  
  91.             Final Notes......................................18
  92.  
  93.  
  94. -----------------------------------------------------------------------------
  95. THINGS YOU SHOULD HAVE
  96.  
  97.    You need a text editor! Writing programs will be very difficult without 
  98.  one. DOS 5 has a nice editor (that's what I'm using to write this), or you
  99.  can use a programming environment (like Turbo Pascal or C or Quick-Basic),
  100.  or you can even use some word processors. If you use basic or or something
  101.  like Word Perfect, you will need to remember to save it as "dos text" or
  102.  "ascii format".
  103.  
  104.    Here are the files you should have:
  105.  
  106.   T-ROBOTS.EXE    -   The program.
  107.   T-ROBOTS.DOC    -   This file.
  108.   PRINTDOC.BAT    -   Batch file to print out this documentation.
  109.   COMMENTS.TXT    -   Comments written by other T-robots users.
  110.   README.1ST      -   Important notices. You should have read it by now.
  111.   DEMO.BAT        -   The demonstration run. Run this for a demo.
  112.   DEMO.DAT        -   The demonstration config file.
  113.   CHASER.TR      \
  114.   SNIPER.TR       >-  These are some sample robots.
  115.   TARGET.TR      /  
  116.   ????????.TR     -   Other robots written for use with this program.
  117.                       ALL T-robots robots MUST have the .TR extension.
  118.  
  119.  
  120.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 1 
  121. -----------------------------------------------------------------------------
  122. TRADEMARKS:
  123.  
  124.       T-Robots   (c) 1991, 1992  Ed T. Toton III
  125.       P-Robots   (c) 1988        David Malmberg
  126.       C-Robots   (c) 1985        Tom Poindexter
  127.       Turbo Pascal is a registered trademark of Borland International.
  128.  
  129.  
  130. -----------------------------------------------------------------------------
  131. T-ROBOTS:    "Tee-Robots"
  132.  
  133.    T-Robots is designed to allow people to design and program robots to 
  134. fight one another. Competitions between people is what it's all about!!
  135. The robots are programmed in a simple language which will be explained 
  136. shortly.
  137.    T-Robots was inspired by P-Robots (written by David Malmberg), which was
  138. in tern inspired by C-robots (written by Tom Poindexter). T-Robots is 
  139. designed with the idea of programming robots, without going to the lengths
  140. of learning to program in high-level languages, but to still allow fairly
  141. simple program design. The language has some similarities to basic, and only 
  142. has a small amount of available commands, thus making it easy to learn, while
  143. offering experienced programmers an interesting challenge. Though it is not
  144. a real programming language of sorts, it can still teach the basic concepts
  145. of programming and logical thinking.
  146.   Later versions of the program may allow you to make hardware changes for 
  147. your robot. Such as add and remove specific types of weapons and armor. This 
  148. is under consideration, but no garauntees will be made at this time.
  149.    The system may also still have bugs or discrepencies. Please contact me 
  150. if you spot one!! Also, please let me know if I have left anything out of 
  151. the documentation that you think I should include. And in addition to that,
  152. please inform me if you have any ideas of new commands to add to the 
  153. programming language.
  154.  
  155.  
  156. -----------------------------------------------------------------------------
  157. TECHNICAL INFO:
  158.  
  159.    T-Robots is designed to be compatable with most graphic adapters. I
  160. believe it will work properly on most. It has been tested on several VGA's,
  161. a CGA, and a Hercules.
  162.    T-Robots is written in Turbo Pascal 6.0. It does not multi-task, it 
  163. simulates it.
  164.    T-Robots should be used on 286's and better. It may run too slowly on 
  165. slower computers.
  166.  
  167. -----------------------------------------------------------------------------
  168. RUNNING T-ROBOTS
  169.  
  170.    To run T-robots, you must have at least one robot program ready, and you 
  171. must make a configuration file to use it. To run T-Robots, you type 
  172. "t-robots", then a space, then the name of the config file.
  173.       ex:   T-ROBOTS MYFILE.DAT
  174. The config file tells T-Robots what settings to use, and which robots to run.
  175. Inside the file you put ONE item per line. Settings start with a dash (-), 
  176.  
  177.  
  178.   
  179.   
  180.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 2 
  181.  
  182. and sometimes have a parameter number. For the robots you put the name of the 
  183. robot file, but without the TR extension. The settings will be explained 
  184. shortly. Here is an example:
  185.  
  186. -d0
  187. -gn
  188. -s100
  189. myrobot
  190. robot1
  191. robot1
  192.  
  193.    This file would tell T-robots to have no delay (thus run at the maximum 
  194. speed), with NO graphics (so as to get a quick result), and to update the 
  195. output every 100 cycles (again to increase speed. This setting usually 
  196. defaults to 10). It then loads MYROBOT.TR into robot #1, ROBOT1.TR into
  197. robot #2, and ROBOT1.TR into robot #3. There can be up to 6 robots,
  198. and in this case only 3 are used.
  199.    The settings are as follows:
  200.  
  201.  -D##  Sets the delay in hundredths of a second. 
  202.        Should never be over 20 (unless in combination with -N#).
  203.  -A    If graphics are on, this will allow the status bars to be displayed.
  204.  -GN   Turns the graphics OFF.
  205.  -S##  Number of cycles between output updates. (increase for greater speed)
  206.        only works with the graphics turned off.
  207.  -M#   Force a specific graphic mode (usually automatic). Modes are listed 
  208.        later.
  209.  -N##  Cycles between each delay. Usually 1, but can be increased when using
  210.        it with -D1 to speed things up (to make it faster than -D1 by itself).
  211.  -P##  Increases the number of program commands each robot executes each
  212.        cycle. Can be useful when using complicated programs. Don't set too 
  213.        high though, it can mess things up.
  214.  -R##  Tells T-robots to Run a number of battles as you specify.
  215.  -TN   Turns off the title screen. Once you've seen it a few times, you'll
  216.        get tired of it and this is here for that purpose.
  217.  -F#   Sets the number of missiles each robot can have in the air at once.
  218.        Can be set anywhere from 0 to 10.
  219.  -Q    Sets T-Robots to run in Quiet mode.
  220.  
  221. Here are the default settings:
  222.  -D    1
  223.  -A    off, you must use -A if you want status bars on.
  224.  -GN   on, you must use -GN if you want the graphics off.
  225.  -TN   on, you must use -TN if you want the the title screen off.
  226.  -S    10
  227.  -M    0
  228.  -N    1
  229.  -P    2
  230.  -R    1
  231.  -F    4
  232.  -Q    on, you must use -Q if you want the sound off.
  233.  
  234.  
  235.  
  236.   [  Note- It is HIGHLY suggested that you make a print-out of this file!  ]
  237.  
  238.  
  239.  
  240.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 3 
  241.  
  242. Graphic modes:
  243.  0  :  Autodetect (default)
  244.  1  :  CGA
  245.  2  :  MCGA
  246.  3  :  EGA
  247.  4  :  EGA64
  248.  5  :  EGA mono
  249.  6  :  IBM 8514 SVGA
  250.  7  :  Hercules
  251.  8  :  AT&T400
  252.  9  :  VGA
  253.  10 :  PC3270
  254.  
  255.  There are two keyboard commands you must know before you start. One is
  256. the quit key, which is 'Q'. The other command, which only works if you are
  257. running multiple matches, is the 'N' key, which aborts the present match
  258. and starts the next.
  259.  
  260.   If you want to run the included demo, drop to dos and run the batch file
  261. called DEMO. That's right, in dos type DEMO and hit enter. It will run
  262. the demo for you.
  263.   When running multiple matches you should still baby-sit the program because
  264. somtimes robots will end up in opposite corners, or whatever, and will be
  265. unable to hit each other, in which case you need to press 'N' to skip to the
  266. next round.
  267.  
  268. -----------------------------------------------------------------------------
  269. BASICS:
  270.  
  271.   The arena is 1 kilometer wide and 1 kilometer long. The coordinate system is 
  272. set up such that (0,0) is at the upper-left corner and (1000,1000) is at the 
  273. lower-right.
  274.   The screen is set up as follows:
  275.  
  276.    0,0  ________________________________________  1000,0  |  |  |  |
  277.        |                                        |         |  |  |  |
  278.        |                                        |         |  |  |  |
  279.        |                                        |         |  |  |  |
  280.        |                                        |         |  |  |  |
  281.        |                                        |         |  |  |  |
  282.        |                                        |
  283.        |               Arena                    |          (status bars)
  284.        |                                        |
  285.        |                                        |
  286.        |                                        |
  287.        |                                        |
  288.        |                                        |
  289.        |                                        |
  290.        |                                        |
  291.        |                                        |
  292. 0,1000 |________________________________________| 1000,1000
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 4 
  301.  
  302.    Navigation is done in a 360 degree circle. Here are the directions for 
  303. each course:
  304.                        0 (360)
  305.                        |
  306.                   315  |  45
  307.                      \ | /
  308.              270 ----- + ----- 90
  309.                      / | \
  310.                   225  |   135
  311.                        |
  312.                       180
  313.  
  314.    The Robots are all equipped with a scanner, armor, a laser, and a missile
  315. launcher (with unlimited ammunition).
  316.    Robots don't stop, start, or turn on a dime. When you tell the robot to 
  317. move at a certain speed, it will accelerate until it reaches that speed or
  318. it collides with something. Once it has reached that speed it will remain 
  319. there until you change it or it collides with something. 
  320.    When you instruct the robot to turn, it will rotate until it faces the 
  321. new direction, or you tell it to do otherwise. The robot will always rotate 
  322. in the direction that is shortest to face the target heading. if you tell
  323. it to turn 270 degrees to the right, it will turn 90 to the left (it's 
  324. shorter, and is still the same heading).
  325.    Missiles are always set with a maximum range. They will detonate when 
  326. they reach that range, or if they get close to another robot. The range
  327. is set using the RANGE command. Even if you change your RANGE, the range
  328. at which the missiles in the air are set for will remain the same. Once
  329. launched, they cannot be affected. 
  330.    The missile rack also needs to reload after firing, so even if you call
  331. the fire command a couple times in a row, only one or two missiles may come
  332. out. You have to plan accordingly. The laser doesn't have this problem, but
  333. it generates more heat, and doesn't cause a blast when it hits the wall.
  334.    Each robot has two status bars (if you used the -A option). The left one,
  335. which is in the same color as the robot if you have a 16 color display, is
  336. the robot's armor. The one next to it (in blue for those of you who have
  337. 16 color) is the robot's heat scale.
  338.  
  339. -----------------------------------------------------------------------------
  340. THE PROGRAMMING LANGUAGE:
  341.  
  342.  
  343. The language is used as follows:
  344.  
  345. The programming language consists of four basic types of statements.
  346.  
  347. 1) Remarks. - These are not compiled into your program, they are simply
  348.               notes that you can read when viewing programs.
  349. 2) Labels.  - These are the target locations for GOTO and GOSUB commands.
  350.               They are not executed and do not use your robots time.
  351. 3) Commands.- These are the functions of your robot. They command the robot
  352.               to perform specified activities.
  353. 4) If's.    - These allow you to put conditions on certain commands which 
  354.               must be met before the command will be executed, otherwise it 
  355.               is ignored.
  356. 5) Variables- Variables are a major programming thingie. They may have values
  357.               from -9999 to 9999. There are other restrictions listed below.
  358.   
  359.   
  360.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 5 
  361.  
  362. Remarks: 
  363.  
  364.   Syntax:
  365.           ;      <statement>
  366.      The semi-colon MUST be the FIRST character on the line, and whatever you
  367.    put on the line with it will be ignored by the compiler.
  368.  
  369.  
  370. Labels:
  371.   
  372.   Syntax:
  373.           :####
  374.      The colon MUST be the FIRST character on the line. RIGHT after it, 
  375.    without any spaces in-between, you put a number anywhere from 0 to 9999.
  376.    That number is the label. Do not use the same number twice within the 
  377.    same program.
  378.  
  379.  
  380.  
  381. Commands:
  382.  
  383.   Syntax: 
  384.           Command [parameters]
  385.      The command may or may not have parameters, but if there are, you 
  386.    seperate them from the command with ONE space. If you use more than 
  387.    one you will get an error. The command must start all the way at
  388.    the left of the line. No spaces.
  389.  
  390. If's:
  391.  
  392.   Syntax:
  393.           IF <if statement> <command>
  394.      The IF statements ALWAYS start with the word "IF" as the first thing 
  395.    on the line. On the same line, seperated by ONE space, is the 
  396.    "if statement", which contains the condition under which the command 
  397.    will be executed. The command then follows, also seperated by ONE space.
  398.    The command may be another IF. No more than 3 IF's may be linked in one 
  399.    line.
  400.  
  401. Variables:
  402.  
  403.       Each robot has 26 variables at it's disposal, named "A" to "Z". Note 
  404.    that not all of them are readily available. "X", "Y", "H", "D", and "S"
  405.    cannot be assigned values. You can access them to see certain aspects of 
  406.    the robot. "X" and "Y" are your coordinates. "H" is your heat, "D" is
  407.    the direction the robot is facing, and "S" is the speed. You may use all 
  408.    other variables as you wish. A sample robot using variables is called
  409.    "VAR-ROB.TR". Look for that if you have questions.
  410.  
  411. ------------------------------------------------------------------------------
  412. COMMANDS:
  413.  
  414.      (any numbers in parentheses next to the command name indicates 
  415.       a number of additional cycles used to execute the function.
  416.       In other words, it's slower)
  417.      (The "*"'s mean that such commands may have a variable in place
  418.       of the number. Those without this will not allow it)
  419.  
  420.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 6 
  421.  
  422. MOVE *
  423.   Syntax:   MOVE <speed>
  424.     valid speed range:  0 - 100
  425.  
  426.   MOVE instructs the robot to move at the designated speed. 0 is dead still,
  427.   while 100 is full speed. Maximum speed will decrease as the robot starts
  428.   to overheat.
  429.  
  430.  
  431. TURN *
  432.   Syntax:   TURN <angle>
  433.     valid angle range: -359 - 359
  434.  
  435.   TURN instructs the robot to rotate the number of degrees specified to the 
  436.   right. If the number is between -179 and -1 or it is between 181 and 359, 
  437.   then the robot will turn left.
  438.     General rule:   positive numbers turn right:  1 to  180
  439.                     negative numbers turn left : -1 to -180
  440.  
  441.  
  442. HEAD  *
  443.   Syntax:   HEAD <heading>
  444.     valid heading range: 0 - 360
  445.  
  446.   HEAD instructs the robot to rotate to face a new heading as specified
  447.   in the parameter. It won't face the new direction immediately, for it 
  448.   always takes time to rotate.
  449.  
  450.  
  451. RANDSPIN
  452.   Syntax:   RANDSPIN
  453.  
  454.   RANDSPIN instructs the robot to rotate to face a new heading as specified
  455.   by the random number generator. The new heading will be anywhere from 0 to 
  456.   359. It won't face the new direction immediately, for it always takes time 
  457.   to rotate.
  458.  
  459.  
  460. DESTRUCT
  461.   Syntax:   DESTRUCT
  462.  
  463.   DESTRUCT detonates the robot. Nearby robots may be damaged by the 
  464.   explosion.
  465.  
  466.  
  467. FIRE  (1)
  468.   Syntax:   FIRE
  469.  
  470.   FIRE instructs the robot to fire a missile. The missile rack will then need
  471.   to re-load and firing again will not be possible for another few cycles.
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 7 
  481.  
  482. SFIRE (3)
  483.   Syntax:   SFIRE
  484.  
  485.   FIRE instructs the robot to fire a missile. The missile rack will then need
  486.   to re-load and firing again will not be possible for another few cycles.
  487.   The missile will automatically scan with the present scan settings before 
  488.   launch, and automatically set it's maximum range to the distance to the
  489.   nearest target within the scan area.
  490.  
  491. LFIRE (1)
  492.   Syntax:   LFIRE
  493.  
  494.   LFIRE instructs the robot to fire it's laser. The laser generates
  495.   more heat than the missiles, but reaches the target location instantly.
  496.  
  497. SHOOT (1)  *
  498.   Syntax:   SHOOT <range>
  499.     valid range:  30 - 1000
  500.  
  501.   SHOOT instructs the robot to fire a missile that will detonate at the 
  502.   specified range (thus over-riding the present settings). The missile rack 
  503.   will then need to re-load and firing again will not be possible for 
  504.   another few cycles.
  505.  
  506. RESET
  507.   Syntax:   RESET
  508.  
  509.   The RESET command resets your robot. It will return the default values
  510.   to SHIFT, ANGLE, RANGE, OVERBURN, and KEEPSHIFT, and will start the 
  511.   program over.
  512.  
  513.  
  514. SETSHIFT  *
  515.   Syntax:   SETSHIFT <angle>
  516.     valid shift range: 0 - 360
  517.  
  518.   SETSHIFT sets a specific angle in relation to the robot in which the 
  519.   robot's turret will point. 0 is forward, 90 to the right, 180 back, 
  520.   and 270 left.
  521.  
  522.  
  523. SHIFT  *
  524.   Syntax:   SHIFT <angle>
  525.     valid angle range: -359 - 359
  526.  
  527.   SHIFT is acummulative version of SETSHIFT. Everytime it is called,
  528.   it rotates the turret the specified number of degrees to the right 
  529.   (or left if you use a negative number).
  530.  
  531.  
  532. KEEPSHIFT-ON
  533.   Syntax:   KEEPSHIFT-ON
  534.  
  535.   The KEEPSHIFT-ON command will turn the shift-keeper on. The Shift-keeper
  536.   keeps the gun pointing in the same direction in relation to the arena
  537.   when the robot turns. If your gun was pointing north, and you turn east,
  538.   the gun still points north. 
  539.  
  540.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 8 
  541.  
  542. KEEPSHIFT-OFF
  543.   Syntax:  KEEPSHIFT-OFF
  544.  
  545.   This turns off the shift-keeper.
  546.  
  547.  
  548. RANGE   *
  549.   Syntax:   RANGE <range>
  550.     valid range: 0 - 1000
  551.  
  552.   RANGE sets the maximum range for your missiles, your laser, and your 
  553.   scanner.
  554.  
  555.  
  556. ANGLE    *
  557.   Syntax:   ANGLE <angle>
  558.     valid angle range: 0.01 - 359.99
  559.  
  560.   ANGLE sets the radius of your scan angle. The scanner always points in 
  561.   the same direction as your weapons. If you specify an ANGLE of 10, then
  562.   the area your scanner will scan will be an arc 20 degrees wide, centered
  563.   down the line of fire of your weapons.
  564.  
  565.  
  566. BURN-ON
  567.   Syntax:   BURN-ON
  568.  
  569.   BURN-ON turns the overburn ON.
  570.  
  571.  
  572. BURN-OFF
  573.   Syntax:   BURN-OFF
  574.  
  575.   BURN-OFF turns the overburn OFF.
  576.  
  577.  
  578. DELAY   *
  579.   Syntax:   DELAY <delay>
  580.     valid delay range: 0 - 9999
  581.  
  582.   This sets a number of cycles of program-inactivity for your robot.
  583.  
  584.  
  585. GOTO  *
  586.   Syntax:   GOTO <label>
  587.  
  588.   Sends the program cursor to the specified label.
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 9 
  601.  
  602. GOSUB  *
  603.   Syntax:   GOSUB <label>
  604.  
  605.   Sends the program cursor to the specified label, like GOTO, BUT it will
  606.   return to the location of the GOSUB statement when you call RETURN.
  607.   Everytime you call GOSUB, the location of that command is placed on the 
  608.   stack. If the stack was full, the GOSUB statement is ignored. Up to 20
  609.   GOSUBS may be called without calling a RETURN before the stack will fill.
  610.   When you call RETURN, the program cursor will go back to where the last
  611.   GOSUB was called before. For a better understanding, examine the BASIC 
  612.   programming language, or Quick-Basic. The commands GOSUB and RETURN
  613.   work the same there. Several of the sample robots use these.
  614.  
  615.  
  616. RETURN
  617.   Syntax:   RETURN
  618.  
  619.   Pops the last GOSUB location from the top of the stack, and
  620.   sends the program cursor there.
  621.  
  622. STOPTURN
  623.   Syntax:   STOPTURN
  624.  
  625.   This command stops your robot from rotating. If your robot is still turning
  626.   due to a previous command, this will stop it.
  627.  
  628. STOPACC
  629.   Syntax:   STOPACC
  630.  
  631.   This command will stop your robot from accelerating or decelerating. If your 
  632.   robot is still changing speed due to a previous command, this will stop it.
  633.  
  634. ADD  *
  635.   Syntax:   ADD <variable> <value 1> <value 2>
  636.  
  637.   This command adds values 1 and 2 and puts the result into the variable.
  638.   The values may be either variables or numbers in the range of -9999 to 9999.
  639.   Examples: ADD e e 1        { adds 1 to e         }
  640.             ADD k 2 3        { sets k equal to 5   }
  641.             ADD t u i        { sets t equal to u+i }
  642.             ADD t k 0        { sets t equal to k   }
  643.  
  644. SUBTRACT   *
  645.   Syntax:   SUBTRACT <variable> <value 1> <value 2>
  646.  
  647.   This command is identical to ADD except that value 2 is subtracted from
  648.   value 1 instead of being added. 
  649.  
  650. <var>=   *
  651.   Syntax:  <variable>=<value>
  652.  
  653.   Sets the variable equal to the value. The value may be any integer from
  654.   -9999 to 9999, or another variable.
  655.   Example:  A=1200    { sets A equal to 1200                     }
  656.             B=H       { sets B equal to your robot's heat level. }
  657.  
  658.  
  659.  
  660.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 10 
  661. ------------------------------------------------------------------------------
  662. IF statements:       
  663.  
  664.      (The "*"'s mean that such commands may have a variable in place
  665.       of the number. Those without this will not allow it)
  666.  
  667.  
  668. ARMOR  *
  669.   Syntax:   IF ARMOR<### <command>
  670.                 or
  671.             IF ARMOR>### <command>
  672.  
  673.   This will execute the command if the armor of your robot is greater than 
  674.   or less than (as specified) the number you list. The number may be between 
  675.   0 and 100.
  676.  
  677.  
  678. X   *
  679.   Syntax:   IF X<### <command>
  680.                 or
  681.             IF X>### <command>
  682.  
  683.   This will execute the command if the X coordinate of your robot is greater 
  684.   than or less than (as specified) the number you list. The number may be 
  685.   between 0 and 1000.
  686.  
  687.  
  688. Y    *
  689.   Syntax:   IF Y<### <command>
  690.                 or
  691.             IF Y>### <command>
  692.  
  693.   This will execute the command if the Y coordinate of your robot is greater 
  694.   than or less than (as specified) the number you list. The number may be 
  695.   between 0 and 1000.
  696.  
  697.  
  698. SPEED *
  699.   Syntax:   IF SPEED<### <command>
  700.                 or
  701.             IF SPEED>### <command>
  702.  
  703.   This will execute the command if the speed of your robot is greater than 
  704.   or less than (as specified) the number you list. The number may be between 
  705.   0 and 100.
  706.  
  707.  
  708. HEAT  *
  709.   Syntax:   IF HEAT<### <command>
  710.                 or
  711.             IF HEAT>### <command>
  712.  
  713.   This will execute the command if the heat of your robot is greater than 
  714.   or less than (as specified) the number you list. The number may be between 
  715.   0 and 500.
  716.  
  717.  
  718.  
  719.  
  720.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 11
  721.  
  722. RANDOM
  723.   Syntax:   IF RANDOM <command>
  724.  
  725.   This will execute the command on a 50% probabilitty.
  726.  
  727.  
  728. OVERBURN-ON
  729.   Syntax:   IF OVERBURN-ON <command>
  730.  
  731.   This will execute the command if the overburn for your robot is ON.
  732.  
  733.  
  734. OVERBURN-OFF
  735.   Syntax:   IF OVERBURN-OFF <command>
  736.  
  737.   This will execute the command if the overburn for your robot is OFF.
  738.  
  739.  
  740. ENEMY (1)
  741.   Syntax:   IF ENEMY <command>
  742.  
  743.   This will execute the command if there is an enemy within the range
  744.   set by RANGE, and within the arc set by ANGLE and in the direction
  745.   set by SHIFT and SETSHIFT in relation to your robot.
  746.  
  747.  
  748. RANGE (1) *
  749.   Syntax:   IF RANGE<#### <command>
  750.                   or
  751.             IF RANGE>#### <command>
  752.  
  753.   This will execute the command if the nearest enemy is at a distance
  754.   greater than or less than (as specified) the distance you list.
  755.   distances can be from 0 to 1000.
  756.  
  757.   
  758. SCAN (1)  *
  759.   Syntax:   IF SCAN<#### <command>
  760.                   or
  761.             IF SCAN>#### <command>
  762.  
  763.   This will execute the command if the nearest enemy that is within your 
  764.   arc set by ANGLE and is within the distance set by RANGE and is in the 
  765.   direction set by SHIFT and SETSHIFT in relation to your robot is at a 
  766.   distance greater than or less than (as specified) the distance you list.
  767.   distances can be from 0 to 1000. 
  768.  
  769.  
  770. NUMROBOTS *
  771.   Syntax:   IF NUMROBOTS<#### <command>
  772.             IF NUMROBOTS>#### <command>
  773.             IF NUMROBOTS=#### <command>
  774.  
  775.   This will execute the command if the number of robots still in existance
  776.   (including yours) is greater than or less than or equal to (as specified)
  777.   the number you list. Valid ranges are from 1 to 6.
  778.  
  779.  
  780.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 12
  781.  
  782. HIT
  783.   Syntax:   IF HIT <command>
  784.  
  785.   This will execute the command if your robot was damaged since the last 
  786.   time you called THIS statement. 
  787.  
  788.  
  789. ATSPEED
  790.   Syntax:   IF ATSPEED <command>
  791.  
  792.   This will execute the command if your robot is moving at the target speed. 
  793.   if you collide, your speed and target speed are set to 0. 
  794.  
  795.  
  796. ATHEAD
  797.   Syntax:   IF ATHEAD <command>
  798.  
  799.   This will execute the command if your robot is facing the target heading. 
  800.  
  801.  
  802. <var>=, <var>>, <var><   *
  803.   Syntax    IF <variable>=<value> <command>
  804.             IF <variable><<value> <command>
  805.             IF <variable>><value> <command>
  806.   This will execute the command if the variable has a value appropriate to
  807.   the conditions in relation to the other value. The Value may be any integer
  808.   from -9999 to 9999 or another variable.
  809.   Examples: IF d<10 fire
  810.             IF i>200 turn 10
  811.             IF g=a destruct
  812.    
  813.   
  814. -----------------------------------------------------------------------------
  815. PROGRAMMING THE ROBOTS:
  816.  
  817.   General rules:
  818.            1.  Always start everything on the left side of the line.
  819.            2.  You MAY leave blank lines. The compiler ignores them.
  820.            3.  One command is executed each cycle unless otherwise noted.
  821.            4.  Examining the sample robots is the best teacher.
  822.            5.  Commands may be upper-case, lower-case, or any combination.
  823.            6.  Never make multiple labels of the same ID number within the 
  824.                same program.
  825.            7.  All robots MUST have the extension TR.
  826.                   ex- MYROBOT.TR, or THISGUY.TR
  827.  
  828.    Each command is executed in one cycle. 
  829.                 (unless it is a particularly slow command)
  830.  
  831.    The following commands take one cycle to execute:
  832.  
  833.       MOVE 100
  834.       Range 860
  835.       if x<50 turn 90
  836.       if x<49 if y>988 if armor>50 setshift 45
  837.       if speed<10 goto 5
  838.       if heat>400 gosub 37
  839.  
  840.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 13
  841.  
  842.    If statements may be piled up as shown to emulate the "AND" operator
  843.    without any speed-loss. You can only put up to 4 IF's and 1 command.
  844.    Examples:      IF ARMOR<50 IF X>600 FIRE
  845.                   IF ENEMY AND Y>400 AND Y<800 AND RANGE<20 GOSUB 5000
  846.  
  847.    The following commands are slower:
  848.  
  849.       if enemy move 20
  850.       shoot 35
  851.       if scan<50 sfire
  852.       if armor>50 if x<50 if enemy shoot 1000
  853.       sfire
  854.  
  855.    Boolean Evaluation is not complete! You can make your robot run a little 
  856.  faster if you order your commands properly. Here is an example:
  857.  
  858.         Here is a line to make the robot shoot under 
  859.         certain conditions:
  860.                         IF enemy IF x<500 FIRE
  861.  
  862.         No matter whether he sees an enemy or not, or if the robot has an x
  863.         value of less than 500, this line will take 2 program cycles to 
  864.         execute, because "IF ENEMY" is a slow command. However, if it were 
  865.         worded like:
  866.                         IF x<500 IF enemy FIRE
  867.                                      
  868.            then there would be a significant speed increase. It will take 
  869.         just as long if the "IF X" statement is true, but it will be faster
  870.         if the "IF X" is false, simply because it never executes the 
  871.         "IF ENEMY" command.
  872.  
  873.  
  874. WATCH YOUR HEAT!!  Over-heated robots can easily become DEAD robots!
  875.  
  876.   Here is the heat scale:
  877.  
  878.     100+   Max speed reduced to 95.
  879.     150+   Max speed reduced to 85.
  880.     200+   Max speed reduced to 70.
  881.     250+   Max speed reduced to 50.
  882.     300+   Heat starts burning armor off.
  883.     400+   Robot stops executing commands until cools below 400 (shutdown).
  884.     500+   Robot explodes.
  885.  
  886.  
  887. OVER-BURN SHOULD BE USED WITH CAUTION!!!
  888.  
  889.   Overburn effects the following:
  890.              1) better acceleration, but more heat from it.
  891.              2) better turn speed,   but more heat from it.
  892.              3) better laser effect, but more heat from it.
  893.              4) bigger explosion from death or self-destruct.
  894.              5) worse heat dissipation.
  895.  
  896.  
  897.  
  898.  
  899.  
  900.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 14
  901.  
  902.   There are several "setting" commands, such as SETSHIFT, and ANGLE. The 
  903. default settings are as follows:  (in other words, it's as if these commands
  904. were at the front of your program, but they don't take time to execute):
  905.  
  906.   Item:       Value:
  907.   ------------------
  908.    SETSHIFT       0
  909.    ANGLE         10
  910.    RANGE       1000
  911.    OVERBURN     off
  912.    KEEPSHIFT    off
  913.  
  914.   All variables are set to 0 at the beginning of the battle.
  915.  
  916.   You will want to note that SHIFTing turns everything on your turret. This
  917. includes your laser, missiles, and scanner. For SETSHIFT, everything works
  918. in relation to your robot. So if you specify 90, that means the turret will
  919. point 90 degrees to the right of your robot, and it will stay there until
  920. you change it.
  921.   If you really want to you can leave spaces before the commands, but the 
  922. first non-space character must still be a semicolon for remarks, a colon
  923. for labels, and so forth..
  924.   Another thing you will want to remember is that the stack for your robot is
  925. only 20 in size. That means you can call 20 GOSUB's before calling a RETURN.
  926. Be careful: if the stack fills up, and you call a GOSUB, it will be ignored.
  927. There is no problem with having excess RETURNS, if you call one when the 
  928. stack is empty, it too will be ignored. Having misused these two commands is 
  929. the greatest cause of robot malfunction.
  930.  
  931. -----------------------------------------------------------------------------
  932. STAGING A COMPETITION
  933.  
  934.    When starting a competition, you should set up several "rules" in advance
  935. so that everyone involved can take them into account when writing their 
  936. programs. Among the most important rules are:
  937.                                     1. Program speed. (the -P# setting)
  938.                                     2. Whether either of the weapons
  939.                                          will be dissallowed.
  940.                                     3. The number of missiles you can have
  941.                                          in flight.   (the -F# setting) 
  942.  
  943. -----------------------------------------------------------------------------
  944. TROUBLE-SHOOTING & SPEED-CONTROL
  945.  
  946.   The T-Robots program is basically fully automatic and self-contained. It
  947. will probably either work or it won't. If there is a problem, most likely
  948. (but not definitely) you are out of luck. Here are some possible causes of
  949. your difficulty:
  950.                  1.  Not enough memory.
  951.                  2.  Incompatable graphics adapter.
  952.                  3.  Damaged copy of T-robots.
  953.                  4.  Computer is not sufficiently IBM compatable.
  954.                  5.  You haven't followed any of the instructions.
  955.                  6.  Computer is damaged or not performing properly.
  956.                  7.  You're using too early a version of DOS.
  957.                      (suggest DOS 3.3 or higher)
  958.  
  959.  
  960.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 15
  961.  
  962.   If you HAVE gotten the program to run, but it's too slow, there are some
  963. things you can do to speed it up. First, you can limit the number of missiles
  964. that can be in flight at once, using the -F setting. You can also try putting
  965. only 2 or 3 robots in the arena at once. You will find that the program slows
  966. down alot when you put 5 or 6. Another thing you can do is put the -D0 
  967. setting in. That will turn off the delay that is placed in the program to
  968. keep it running at the proper speed on faster computers.
  969.  
  970.   If the problem is that the program runs TOO fast, then put the -D1 setting 
  971. in. You can also put the -N command. Keep play with different settings on 
  972. the -N until you get it where you want it. If the speed is too fast, you
  973. may want to put more missiles and more robots, since there's nothing to stop
  974. you from doing it.
  975.  
  976.   Also keep in mind that the -A command slows the entire simulation 
  977. dramatically. It is suggested that you use it when you have the speed to
  978. spare, and not when it's too slow.
  979.   The correlation between -D and -N needs to be explained. The delay will be
  980. implemented every N cycles. Now here's how the delay works: If the number of 
  981. hundredths of a second (as determined by -D) haven't gone by yet, then the 
  982. program will sit and wait for the time to go by. If the amount of time HAS
  983. gone by, then it doesn't bother to wait for it. So if you set -N10 and -D10,
  984. you will probably not see any effect at all (unless your computer is pretty
  985. fast), simply because it will probably take more than ten hundredths 
  986. (or rather one tenth) of a second to perform 10 cycles.
  987.  
  988. -----------------------------------------------------------------------------
  989. CHANGES:
  990.  
  991.   v2.0   - Variables are now included!!! The magnitude of this cannot 
  992.            possibly be fully understood, for the entire program had to 
  993.            be completely overhauled (so that almost every command will
  994.            allow you to use variables instead of numbers).
  995.          - The ATHEAD and ATSPEED commands for IF statements weren't
  996.            working. That has been fixed.
  997.  
  998.  
  999. -----------------------------------------------------------------------------
  1000. NOTICE:
  1001.  
  1002.    This program is being distributed on the "shareware" concept. It is by
  1003. no means completely free. If you think the program is of use to you, please
  1004. send a registration fee of $14. If you think that is rediculous, then send
  1005. less (or more for that matter). If you hate the program or found too many
  1006. bugs, write me and tell me, and include a graphic explanation (but don't
  1007. be too harsh!! Heheheh). In any event, write to:
  1008.  
  1009.                            Ed T. Toton III
  1010.                          7101  Talisman Lane
  1011.                           Columbia Md 21045
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 16
  1021.  
  1022.       And WHY should you register it?
  1023.         1.  Because you're supposed to. If you use T-robots somehwat often,
  1024.              or several people use a copy off the same computer, or you
  1025.              keep it on your hard drive for lengthy periods, then it
  1026.              should be registered!
  1027.         2.  To support my continuing efforts to bring you some level of
  1028.              functional programs. If I get no cash, you get no improvements
  1029.              in these programs, and I won't be encouraged to make new and
  1030.              better software!
  1031.         3.  To get that warm glow for knowing that you supported the author 
  1032.              of at least one of the many shareware programs you probably use.
  1033.         4.  To find out if there is a newer version. All you need to do is 
  1034.              ask! But letters with money take priority!
  1035.         5.  You could be sick and demented and thus register everything you
  1036.              get your hands on.
  1037.         6.  To get a registered copy of StratSys 2.0!! If you register this
  1038.              program you will recieve a registered copy of StratSys 2.0 in 
  1039.              the mail (please tell me what disk type you want). StratSys is
  1040.              VGA & Mouse required, and is explained in detail below...
  1041.         7.  To find out about my other programs you need only ask!
  1042.              But again, letters with money take precedence.
  1043.  
  1044.         Source code is not yet available. It may be in later versions.
  1045.  
  1046. -----------------------------------------------------------------------------
  1047. DISCLAIMER:
  1048.  
  1049.    This program is provided "AS IS" and I make no gauruntees about it's
  1050. performance. I will not be and can not be held responsible for any damages 
  1051. incurred during it's use, or as a result of it's use. It's on a "use at your 
  1052. own risk" basis. Nothing at all should happen, the program is harmless, 
  1053. but I have to say it anyway
  1054.  
  1055.   
  1056. -----------------------------------------------------------------------------
  1057. COPYRIGHT:
  1058.  
  1059.    This program may be freely distributed (which is actually encouraged) 
  1060. AS IS. No one may modify this program in ANY way. ESPECIALLY where names
  1061. and credit is given, and INCLUDING all the documentation, data files, and
  1062. executable program files. It may NOT be used for comercial or profit-turning 
  1063. ventures of any kind, including sale by disk vendors, without the written 
  1064. consent by ME, with ONE exception: Disk vendors MAY sell it without my 
  1065. written consent ONLY if they charge no more than $5 higher then the cost of 
  1066. the disk (excluding any shipping and handling charges). NOTHING may be added 
  1067. to it either (except in the case of writing to the file COMMENTS.TXT, and
  1068. in the case of adding more robot program files). NO BBS ads are allowed EXCEPT 
  1069. as zip comments, or as a single SEPERATE text file.
  1070.    Any robots you write for use with T-Robots are yours and you may do what 
  1071. you wish with them. It is encouraged that you distribute robots around as 
  1072. well as this program.
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 17
  1081. -----------------------------------------------------------------------------
  1082. FINAL NOTE:
  1083.  
  1084.    If you have any questions, concerns, suggestions, criticisms, donations,
  1085. remarks, praise or opinions, please write! I WANT TO HEAR FROM YOU!! 
  1086. (the address is listed above).
  1087.  
  1088.  
  1089.                                                 Ed T. Toton III
  1090.                                                  "Necromancer"
  1091.                                                      -1992
  1092.  
  1093.  
  1094.  
  1095.  
  1096.    Oh, and one more thing. Your comments are welcome! If there are any 
  1097. statements or comments or suggestions you would like to make to those who
  1098. later try to use T-Robots, please feel free to add them to the file called
  1099. COMMENTS.TXT. And if you think the comments are good (either yours, or the
  1100. ones already in your COMMENTS.TXT file), please send them to me! I might
  1101. make them a part of the next release of the program (if there is one).
  1102.  
  1103.  
  1104.  
  1105. OTHER SOFTWARE:
  1106.  
  1107.   I have made several programs (not including the 7 or so games I made 
  1108.   in quick-basic a while back) that may be of interest to you. Here is
  1109.   a list of some of them:     (as of 2/3/92)
  1110.  
  1111.   Blaze v2.6        : =VGA screen-saver. Supports password security,
  1112.                        and a customization system (config file). Has 
  1113.                        been known to travel quickly through BBS's.
  1114.  
  1115.   CompWar v2.6      : =Latest release of CompWar, the on-line game for 
  1116.                        use with WWIV BBS systems.
  1117.  
  1118.   Date-Matcher v1.2 : =On-line match-maker program for BBS's that support
  1119.                        DOS interrupt driven door programs. 
  1120.  
  1121.   StratSys v2.0     : =A 2-player VGA combat strategy game. VERY flexible.
  1122.                        Comes with 4 game scenarios (Cival War, Naval Battle,
  1123.                        Robot Conquest, and a medieval scenario). Expansion
  1124.                        packs are available (at the moment one with 12 
  1125.                        scenarios). Comes with an editor for the images and
  1126.                        maps, so you can make your own scenarios!
  1127.  
  1128.   My-Gags set 1.0   : =A set of 10 small gag programs that I have made.
  1129.                        They are designed to be placed in the autoexec.bat
  1130.                        file. Half of them are TSR's, including one that 
  1131.                        creates "line-noise" through the keyboard buffer,
  1132.                        one that beeps occasionally, and one that keeps 
  1133.                        changing you caps-lock/numlock/scroll-lock. 
  1134.                        
  1135.  
  1136.  
  1137.  
  1138.  
  1139.   
  1140.   T-Robots  = (c) 1991, 1992  =  Ed T. Toton III                       pg 18
  1141.