home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 356.lha / Life_v5.0 / README.pp / README
Encoding:
Text File  |  1990-03-14  |  5.4 KB  |  144 lines

  1. And another version.  Adds torus option to assembly version.  Fixes
  2. a couple of minor things.
  3.  
  4. Yet another version.  This one adds the `-a' option which means use the
  5. processor instead of the blitter for the LIFE calculations.  Makes things
  6. run faster on 68020 and 68030 Amigas.
  7.  
  8. This is a new version of my ancient LIFE program, significantly hacked and
  9. added to.  It is by no means in a final state, but it since no one else has
  10. presented a nice LIFE environment, it will have to do.  Some example input
  11. files have been provided as well, in a new (not another!) macro language
  12. that I hacked together one day many days ago.  It requires operation from
  13. the CLI.
  14.  
  15. First, let's run it.  Simply change directories to the life directory on
  16. the disk, and type, for instance,
  17.  
  18.     life xmp/r
  19.  
  20. That's all there is to it!  Hit Q, ESC, X, or ^C to exit.  Some other
  21. sample command lines are:
  22.  
  23.     life -h xmp/acorn
  24.     life -o -t -p2 xmp/bomb
  25.     life -r100 -h xmp/bcity  ; be patient!
  26.  
  27. The rest of this documentation has three parts:  an explanation of the
  28. command line arguments, an explanation of the keyboard command keys during
  29. the run of the program, and an explanation of the macro language.  This
  30. is the usage line of the program.  Note that all parameters must not be
  31. separated from their option letter by a space; use -h352 instead of -h 352.
  32.  
  33.     life [-h[n]] [-r[n]] [-pn] [-o] [-t] [-v[n]] [-s] [infile]
  34.  
  35. -h    This option sets hires mode.  The optional parameter sets the
  36.     horizontal resolution to something other than 640; it must be
  37.     a multiple of 16.  Actually, if the parameter is less than 400,
  38.     low res is assumed.
  39.  
  40. -r    Set a cell randomly every generation.  If a parameter is supplied,
  41.     it indicates how long to delay in generations before setting each
  42.     cell; -r10 sets a random cell every 10 generations.
  43.  
  44. -p    Set the number of bitplanes to use.
  45.  
  46. -o    Orify; this option allows cells to leave `tracks', so you can trace
  47.     the glider guns and the like.  You *must* use at least -p2 with this
  48.     option.
  49.  
  50. -t    Wrap the screen as in a torus.
  51.  
  52. -v    Set the vertical resolution.  If the supplied parameter is greater
  53.     than 300, the screen is set to interlace.
  54.  
  55. -s    Do not start computing until the appropriate keyboard key is hit.
  56.  
  57. Which brings us to the keyboard command options.  These keys should be hit
  58. during the programs execution.
  59.  
  60. Q, X,    Exit the program.  Because the explanation is so simple but there
  61. ^C, ESC    are so many keys, I need to add this nonsense sentence so the docs
  62.     documentation looks pretty.
  63.  
  64. 0, G    Go!  Run at full speed.
  65.  
  66. S    Stop.  Wait for one of the keystroke commands to continue.
  67.  
  68. SPACE    Execute a single generation and then stop.  Useful for single-stepping.
  69.  
  70. 1, 2,    Insert a delay between generations; slow things down enough so you
  71. 3, 4,    can watch comfortably.  The actual delay inserted can be calculated
  72. 5, 6,    by the formula (2^n)/50, in seconds, where n is the key pressed.
  73. 7, 8,    This allows delays from 1/25 of a second between generations, all the
  74. 9    way to 10.24 seconds between generations.
  75.  
  76. Ahh, now we get to the hard part, documenting the macro language which is
  77. used to set up initial generations.  This command language is based somewhat
  78. on Logo (remember multitasking Color Computer Logo?)  All whitespace is
  79. ignored.  All caps are converted to lowercase.  Comments are enclosed in
  80. < and >.  The turtle starts in the middle of the screen, facing up, with
  81. the pen down.  The basic commands are:
  82.  
  83. f    Move forward one cell, setting the current cell if the pen is down.
  84. r    Turn towards the right.
  85. l    Turn towards the left.
  86. b    Turn facing the other direction.
  87. u    Lift the pen off the paper.
  88. d    Put the pen on the paper.
  89.  
  90. The commands take a single argument, as well.  For instance,
  91.  
  92.     10 f
  93.  
  94. moves forward 10 times, setting cells if the pen is down.
  95.  
  96. Parentheses group actions, which can be repeated.  For instance,
  97.  
  98.     10 ( f r f l )
  99.  
  100. with the pen down draws a staircase pattern, by moving forward, then right,
  101. then forward, then left, 10 times.  This grouping is nestable.
  102.  
  103. x    Go to the x location supplied as a parameter.
  104. y    Go to the y location supplied as a parameter.
  105. -    Flip left and right.  If executing again, things go back to normal.
  106. +    Make right be the normal right, undoing any effects of the above.
  107. .    Move forward without setting any cells, ignoring the current pen.
  108. *    Move forward, setting the current cell, ignoring the current pen.
  109.  
  110. Brackets ([]) push and pop a location stack.  The things saved and restored
  111. are the x and y location, the direction, whether `right' means a real right
  112. or a left (from the - command), and the pen state.  Thus, you can do things
  113. like:
  114.  
  115.     10 ( [ 10 * ] r . l )
  116.  
  117. to draw a 10 by 10 filled block.  That `r . l' sequence occurs often enough
  118. that the command `,' is used for it.  This way, you can draw pictures in
  119. your editor.  To draw a glider, you might use:
  120.  
  121.     [.*.],
  122.     [..*],
  123.     [***]
  124.  
  125. Easy enough, eh?  One last thing.  You can even define single-character
  126. macros!  If you use that glider often enough, you can make it a macro by
  127. simply using the `=' command.  You must assign it to something grouped in
  128. parenthesis.  So,
  129.  
  130. = g ( [
  131.    [.*.],
  132.    [..*],
  133.    [***]
  134.    ] )
  135.  
  136. sets `g' to be a glider macro.  Each time you use g in your script file, a
  137. glider will be drawn.  Note that it is good practice to enclose your macro
  138. definitions with [ and ], hence the brackets above.
  139.  
  140. There is a handful of examples provided.  No apologies are made for the
  141. cryptic command language or the single character macros supplied.
  142.  
  143. Enjoy!  Bugs to Tomas Rokicki, Box 2081, Stanford, CA  94309.
  144.