home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 128 9 / q09.d81 / t.cybertank < prev    next >
Text File  |  2022-08-28  |  17KB  |  337 lines

  1.                                C Y B E R T A N K
  2.  
  3.                                 by Jon Mattson
  4.  
  5.       CYBERTANK is a simulation of future warfare, in a time when the
  6. soldiers are computer-controlled mechanical monster-tanks, and the generals
  7. are top military programmers.  That sounds simple enough at first, but
  8. trying to actually define what CYBERTANK IS can be much trickier: part game,
  9. part educational experience, part logic puzzle.  I prefer the last
  10. definition myself, since your ultimate goal is to piece together the
  11. "perfect" program - a puzzle of sorts.  But you may come up with other
  12. definitions while cursing the computer screen...
  13.  
  14.       Note that you need have no previous programming experience to have fun
  15. with CYBERTANK.  It is somewhat self-teaching, and, in any event, the
  16. language it uses is unique.  In fact, CYBERTANK is a very good way to teach
  17. yourself the rudiments of logical thinking in any programming language.
  18.  
  19.       When you first run the program, a title screen will appear and various
  20. routines and graphics will be loaded. You will quickly find yourself in the
  21. Command Processor, which is where you will do your coding.  It is split into
  22. three distinct windows:
  23.  
  24.       The large top List Window normally displays a partial (12 line)
  25. listing of your current program.  Of course, it will be empty at first,
  26. since no program is in memory.  When it does contain a program longer than
  27. 12 lines, you can scroll up and down through the list at almost any time
  28. with the CRSR UP/DOWN keys (either set).  Please remember this, as it is the
  29. only option which is not normally listed on the screen.
  30.  
  31.       The central one-line window is the Command Line.  This is where you
  32. will enter your commands; in fact, you'll notice a flashing cursor there
  33. waiting for you.
  34.  
  35.       The large bottom Help Window always shows the options currently
  36. available to you.  It is "case sensitive" and will change according to your
  37. needs at the time.  Virtually all commands are entered with 1 or 2 letter
  38. codes to make typing easier, although a few may also prompt you for numeric
  39. input.
  40.  
  41.       For the moment, press ! to END your current (empty) program.  You will
  42. now be at the Main Menu, and the Command Line will inform you that it is
  43. waiting for instructions. Examining the Help Window, you will see 7 options:
  44.  
  45.   COMMAND PROCESSOR: This simply takes you back into the section previously
  46. described, where you may add lines to the end of your current program.
  47.  
  48.   INSERT COMMAND: This option and its counterpart, below, allow you to edit
  49. a program in memory.  You will be prompted for a command number at which to
  50. make the Insertion - remember that you can scroll through the listing with
  51. the cursor keys to check anything you need to know.  The listing will then
  52. shift to display the target area - the lines just before and just after the
  53. insertion point.  You will briefly enter the CP section to type in the
  54. Inserted command.  Note that Insert automatically updates any JUMP commands
  55. and the like, so you need not worry that your change will wreak havoc with
  56. program logic.  For this reason, always remember to base any Inserted JUMPs
  57. on the listing you actually see at the moment - not on what it will end up
  58. being.  Just do things in the easiest way, and the CP will take care of the
  59. rest.
  60.  
  61.   DELETE COMMAND: You will be prompted for a command number - which will
  62. then vanish.  Again, any JUMPs and the like will automatically be updated.
  63. JUMPs to a Deleted line will be shifted to the line following it, so be
  64. careful that this still makes sense.
  65.  
  66.   SAVE PROGRAM: You will be prompted for a unique 3-digit "pass code", which
  67. will be used to Save the program in memory to disk.  Avoid using '999', as
  68. the included sample uses this code.  Remember that it's not a wise idea to
  69. save anything to your LOADSTAR disk: any other disk with at least 9 free
  70. blocks per program will do.
  71.  
  72.   NEW PROGRAM: This will give you two options: start a New program from
  73. scratch or Load one from disk.  In the latter case, you will have to enter
  74. the program's 3-digit "pass code". Once the program is Loaded into memory,
  75. you will automatically be moved to the CP mode to examine it. If you want to
  76. examine a sample program, pick this option and enter '999' for the "pass
  77. code".  That will Load the sample included with CYBERTANK, which we'll talk
  78. about in greater detail later.
  79.  
  80.   FIELD TEST: This allows you to enter the Combat Simulator and test out
  81. your masterpiece.  We'll talk more about this later, too.  QUIT: This will
  82. exit CYBERTANK and return you to LOADSTAR if the disk is in the drive.
  83.  
  84.       Now, let's go back into the CP and take a closer look at the many
  85. commands available to you.  You should get used to three conventions first:
  86.  
  87.   1. Directions are always given with a digit 'n' from 0 to 7, with 0 being
  88. north, 1 being northeast, and so on.
  89.  
  90.   2. A special 'box' has been set aside to hold any single number you want
  91. the tank to remember.  This 'box' is called the HOLDER and is represented by
  92. H.  If you are a programmer, think of H as a standard variable which can
  93. hold numbers from 0 to 255.  If you aren't, just think of it as a box which
  94. can hold one number at a time so that you can examine it later.
  95.  
  96.   3. There will be times when you will want to keep track of how many times
  97. something has been done.  Your tank has two COUNTERS - C1 and C2 - for this
  98. purpose.  Several commands allow you to manipulate these COUNTERS
  99. individually, as explained below.
  100.  
  101.       Now for the commands:
  102.  
  103.   END: This ENDs whatever mode you are currently in.  In the CP, it returns
  104. you to the Main Menu.  In a Field Test, it ENDs the current program and puts
  105. you into Direct Mode (see below).  In Direct Mode, it switches control back
  106. to the program, either where it left off from a QUERY or at the beginning
  107. from an END.  This sounds complicated but is really quite simple in
  108. practice, as you'll soon see.
  109.  
  110.   IF: This sets up a decision making sequence and must always be followed by
  111. a Condition (see below).  When your tank encounters this command, it will
  112. try to decide if the condition is true or not.  If so, it will perform
  113. whatever instructions follow in the IF... sequence, until it hits an END IF
  114. (see below).  If not, it will skip the whole sequence, jumping down in the
  115. program past the END IF.  To make these sequences easier to pick out in the
  116. program, the CP indents all commands following the IF and uses a different
  117. text color, until the sequence is finished.  An example will be given later,
  118. where it will make more sense, and should clarify the use of this important
  119. command.
  120.  
  121.   END IF: This command simply denotes the end of an IF... sequence for the
  122. computer.  Every IF should have a matching END IF (or END IF w/JUMP); in
  123. fact, the CP will not allow you to exit until this condition is met.  Of
  124. course, careless Insertions and Deletions can ruin this pattern and cause
  125. unpredictable results - so be careful.
  126.  
  127.   END IF w/JUMP: This command acts as an END IF, but also automatically
  128. jumps to a new command of your choice instead of the one following the IF
  129. sequence.  Think of it as an END IF and JUMP combined into one command, only
  130. performed when the IF sequence is active.
  131.  
  132.   JUMP: As above, this command causes control to move to a new command of
  133. your choice.  Think of it as a BASIC GOTO.  Of course, unlike the above,
  134. this command is non-conditional and cannot be performed from within an IF
  135. sequence.
  136.  
  137.   FORWARD: Moves the tank forward one "space".
  138.  
  139.   REVERSE: Moves theatank back one "space".
  140.  
  141.   TURN LEFT: Turns the tank left 90 degrees, based on its current facing.
  142. Since the resulting direction will be relative to the tank's original
  143. facing, it is important to keep track of these changes if the tank's course
  144. in important to your program's logic. The HOME command (below) is useful in
  145. this regard.
  146.  
  147.   TURN RIGHT: As above, but turns right 90 degrees.
  148.  
  149.   RANDOM: The tank will pick one of the four movement choices above
  150. randomly. Since this makes keeping track of the tank's current course
  151. difficult, this command should be used sparingly.  It is good for shaking up
  152. any pattern the tank seems to be falling into.
  153.  
  154.   FIRE n: This is actually a set of 8 commands: FI