Ready to ship 2.8
[super-star-trek.git] / doc / sst-doc.xml
index 5807be7d0252c9201d0e152aa7ead82d1407eef9..b07f3e6723b465f834809a9cb2a0e0a105a10a3b 100644 (file)
@@ -2,9 +2,13 @@
 <!DOCTYPE book PUBLIC 
     "-//OASIS//DTD DocBook XML V4.1.2//EN" 
     "docbook/docbookxx.dtd"[
-<!ENTITY sst-site      "http://sst.berlios.de/">
+<!ENTITY sst-site      "http://catb.org/~esr/super-star-trek/">
 <!ENTITY retro         "http://catb.org/~esr/retro/">
 ]>
+<!--
+Copyright by Eric S. Raymond
+SPDX-License-Identifier: BSD-2-clause
+-->
 <book>
 <bookinfo>
 <title>Super Star Trek</title>
@@ -251,16 +255,85 @@ game&mdash;but, of course, the level of game you play is up to you.  If
 you want to start at the Expert level, go ahead.  It's your funeral.
 The Emeritus game is strictly for masochists.</para>
 
-<para>The fourth question, new in SST2K, sets your game options.  A
-blank answer or 'fancy' enables all SST2K features.  The option
-'plain' approximated the original CDC 6600 FORTRAN game from UT Austin
-and disables a number of features: Tholians, planets &amp; dilithium,
-Thingies shooting back, deep-space-probes, Klingon ramming and
-movement, time-warping through black holes, death-ray
-upgrade. inhabited worlds.  The option 'almy' approximates Tom Almy's
-C translation from 1979, disabling Thingies shooting back, base
-shields, time-warping through black holes, and inhabited
-worlds.</para>
+<para>The fourth question, new in SST2K, sets the wayback machine.  A
+blank answer enables all SST2K features.  Given a year, it will disable
+features not implemented in that year or earlier. The year
+'1973' approximated the original CDC 6600 FORTRAN game from UT Austin.
+Here is a mapping of years to features:</para>
+
+<variablelist>
+<varlistentry>
+<term>1974</term>
+<listitem><para>Planets and dilithium mining</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>1979</term>
+<listitem><para>Tholians and their webs, supercommanders.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>1980</term>
+<listitem><para>Deep-space probes.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>1981</term>
+<listitem><para>Bad guys do tactical movement.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>1982</term>
+<listitem><para>Bad guys can ram you.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>1997</term>
+<listitem><para>Death ray gets an upgrade.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>1998</term>
+<listitem><para>Automatic generation of self-destruct password.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>2004</term>
+<listitem><para>Upgraded shields for bases, and chance of time-waeping through a black hole.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>2005</term>
+<listitem><para>Our ship is bracketed in the chart/</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>2006</term>
+<listitem><para>Logic for inhabited worlds and Klingon captures.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>2007</term>
+<listitem><para>Automatically update the long-range scan when displaying the chart.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>2010</term>
+<listitem><para>Use color in interface.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>2013</term>
+<listitem><para>Defeated Klingons can be captured.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>2014</term>
+<listitem><para>The cloaking device.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>2019</term>
+<listitem><para>Consistent dot-filling in the galaxy chart.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>2023</term>
+<listitem><para>Alphameric coordinates.</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>Some caveats apply.  The development history of this game is obscure; some
+years of introduction have had to be guessed, and we have chosen guesses to
+make support as many interesting wayback options as possible.  Some options
+are not affected by the wayback setting - notably, the TUI interface is always
+available even though it wasn't written until 2005.  Some early features,
+notably "clockface" course setting, couldn't be reconstructed.</para>
 
 </chapter>
 <chapter><title>How To Issue Commands</title>
@@ -341,7 +414,7 @@ complicated, but you will learn the abbreviations quickly enough.</para>
 </orderedlist>
 
 <para>If you are part way through entering a command and you change your
-minde, you can cancel the command by typing -1 as one of the
+mind, you can cancel the command by typing -1 as one of the
 parameters, with the exception of the manual move command.</para>
 
 <para>If anything is not clear to you, experiment.  The worst you can do is
@@ -383,12 +456,29 @@ described by an example.</para>
      10  . . . . . . . . . .  Time Left     3.72
 </screen>
 
+<para>In fancy mode, the display will use letters for Y coordinates.</para>
+
+<screen>
+         1 2 3 4 5 6 7 8 9 10
+      a  * . . . . R . . . .  Stardate      2516.3
+      b  . . . E . . . . . .  Condition     RED  
+      c  . . . . . * . B . .  Position      e1, b4
+      d  . . . S . . . . . .  Life Support  DAMAGED, Reserves=2.30
+      e  . . . . . . . K . .  Warp Factor   5.0
+      f  . K .   . . . . * .  Energy        2176.24
+      g  . . . . . P . . . .  Torpedoes     3
+      h  . . . . * . . . . .  Shields       UP, 42% 1050.0 units
+      i  . * . . * . . . C .  Klingons Left 12
+      j  . . . . . . . . . .  Time Left     3.72
+</screen>
+
+
 <para>The left part is a picture of the quadrant.  The E at sector 2 -
-4 represents the Enterprise; the B at sector 3 - 8 is a starbase.
-There are ordinary Klingons (K) at sectors 5 - 8 and 6 - 2, and a
-Klingon Commander (C) at 9 - 9.  The (GULP)
-<quote>Super-commander</quote> (S) is occupies sector 4 - 4, and a
-Romulan (R) is at 1 - 6.  An uninhabited planet (P) is at sector 7 - 6
+4 (or b4) represents the Enterprise; the B at sector 3 - 8 (or c8) is a starbase.
+There are ordinary Klingons (K) at sectors 5 - 8 (e8) and 6 - 2 (f2), and a
+Klingon Commander (C) at 9 - 9 (i9).  The (GULP)
+<quote>Super-commander</quote> (S) is occupies sector 4 - 4 (d4), and a
+Romulan (R) is at 1 - 6 (a6).  An uninhabited planet (P) is at sector 7 - 6 (g6)
 (if it were inhabited, it would display as a '@').  There are
 also a large number of stars (*). The periods (.) are just empty
 space&mdash;they are printed to help you get your bearings.  Sector 6
@@ -733,6 +823,23 @@ the current quadrant, the shortest command would be</para>
 <para>and it will be done.  In automatic mode, either two or four numbers
 must be supplied.</para>
 
+<para> If your game is in "fancy" mode, there ia a way to input
+coordinates that avoids any need to remember thet the Y coordinate
+comes first.  Y values may be given as lowercase letters starting with
+a = 1. So for example:</para>
+
+<screen>
+       a1 = 1 - 1
+       c5 = 3 - 5
+       f2 = 6 - 2
+</screen>
+
+<para>The previous move xommand could be expressed as</para>
+
+<screen>
+       m a c7 e8
+</screen>
+
 <para>Automatic mode utilizes the ship's <quote>battle
 computer.</quote> If the computer is damaged, manual movement must be
 used.</para>
@@ -914,6 +1021,51 @@ firing.</para>
 <para>Phasers have no effect on starbases (which are shielded) or on
 stars.</para>
 
+</sect1>
+<sect1><title>Cloak</title>
+
+<literallayout>
+  Mnemonic:  CLOAK
+  Shortest abbreviation:  CLOAK
+  Full commands:  CLOAK ON
+                  CLOAK OFF
+</literallayout>
+
+<para>The cloaking device prevents your ship from being seen by any enemy
+vessels.  When the cloaking device is in use, your subspace radio will
+not receive transmissions, torpedoes will be less accurate, you cannot
+dock, and you cannot use your warp engines. Enemy ships will get a
+chance to attack you when you turn cloaking on.</para>
+
+<para>The Treaty of Algeron with the Romulans in Stardate 2311 prohibits the
+use of cloaking devices. If a Romulan ship observes you cloaking or
+uncloaking after this point in time you will be in violation, which
+will hurt your final score.</para>
+
+<para>The Faerie Queene does not have a cloaking device.</para>
+
+</sect1>
+<sect1><title>Capture</title>
+
+<literallayout>
+Mnemonic:  CAPTURE
+Shortest abbreviation:  CAPTURE
+Full commands:  CAPTURE
+</literallayout>
+
+<para>Ask a Klingon To surrender.</para>
+
+<para>The capture command provides a more humane way to end a battle than
+just destroying the Klingon battleship with the crew aboard. Assuming
+the subspace radio and transporter are working, and there is room in
+the brig, this command will ask the captain of the weakest Klingon
+ship in the quadrant to surrender.  If the captain agrees, some of the
+crew will transport to your ship and the Klingon ship will be
+destroyed. This command does take time and you will be attacked by any
+other enemy ships if the surrender occurs.</para>
+
+<para>When you dock, any captured Klingons will be transferred to the base
+and you will be credited with the lives you save.</para>
 </sect1>
 <sect1><title>Report</title>
 
@@ -961,9 +1113,9 @@ calculate travel times and energy usage.</para>
 <sect1><title>Photon Torpedoes</title>
 
 <literallayout>
-Mnemonic:  PHOTONS
-Shortest abbreviation:  PHO
-Full commands:  PHOTONS &lt;NUMBER&gt; &lt;TARG1&gt; &lt;TARG2&gt; &lt;TARG3&gt;
+Mnemonic:  TORPEDO
+Shortest abbreviation:  TO
+Full commands:  TORPEDO &lt;NUMBER&gt; &lt;TARG1&gt; &lt;TARG2&gt; &lt;TARG3&gt;
 </literallayout>
 
 <para>Photon torpedoes are projectile weapons&mdash;you either hit what you aim
@@ -1015,6 +1167,14 @@ you can enter</para>
 <para>to aim between two sectors.  However, sector numbers must be 1 to 10
 inclusive.</para>
 
+<para>In fancy mode, you can write "PHO 3 2 6 1 10 4 7" as</para>
+
+<screen>
+     pho 3 b6 a10 d7
+</screen>
+
+<para>Fractional Y coordinates are not supported.</para>
+
 </sect1>
 <sect1><title>Dock at Starbase</title>
 
@@ -1445,6 +1605,31 @@ Full command:  HELP &lt;command&gt;
 <para>This command reads the appropriate section from the SST.DOC file,
 providing the file is in the current directory.</para>
 
+</sect1>
+<sect1><title>Curses switch</title>
+
+<literallayout>
+Mnemonic:  CURSES
+Full command:  CURSES
+</literallayout>
+
+<para>Switch from tty to curses interface. Mainly useful for
+debugging, when continuing a replayed game.</para>
+
+</sect1>
+<sect1><title>Option setting</title>
+
+<literallayout>
+Mnemonic:  OP
+Full command:  OPTIONS
+               OPTIONS SET
+              OPTIONS CLEAR
+</literallayout>
+
+<para>Set or clear feature flags. With no argument, list feature flags. The verbs SET and CLEAR
+are available to set or clear a list of feature flags following on the line.  Mainly useful
+for development and improving test coverage.</para>
+
 </sect1>
 </chapter>
 <chapter><title>Miscellaneous Notes</title>
@@ -1564,6 +1749,7 @@ orientation</quote>.</para>
  ABBREV    FULL COMMAND                           DEVICE USED
  ------    ------------                           -----------
  ABANDON   ABANDON                                shuttle craft
+ CA        CAPTURE                                subspace radio and transporter
  C         CHART                                  (none)
  CO        COMPUTER                               computer
  CR        CRYSTALS                               (none)
@@ -1584,7 +1770,7 @@ orientation</quote>.</para>
  P         PHASERS &lt;TOTAL AMOUNT&gt;                 phasers and computer
            PHASERS AUTOMATIC &lt;TOTAL AMOUNT&gt;       phasers, computer, sr sensors
            PHASERS MANUAL &lt;AMT1&gt; &lt;AMT2&gt; ...       phasers
PHO       PHOTONS &lt;NUMBER&gt; &lt;TARGETS&gt;             torpedo tubes 
TOR       TORPEDO &lt;NUMBER&gt; &lt;TARGETS&gt;             torpedo tubes 
  PL        PLANETS                                (none)
  PR        PROBE &lt;ARMED&gt; &lt;MANUAL&gt; &lt;DISPLACEMENT&gt;  probe launcher, radio 
            PROBE &lt;ARMED&gt; AUTOMATIC &lt;DESTINATION&gt;  launcher, radio, computer
@@ -1599,7 +1785,9 @@ orientation</quote>.</para>
  ST        STATUS                                 (none)
  T         TRANSPORT                              transporter
  W         WARP &lt;FACTOR&gt;                          (none)
-
+ CU        CURSES                                 (none)
+ OP        OPTIONS                                (none)
  L. R. Scan:   thousands digit:   supernova
                hundreds digit:    Klingons
                tens digit:        starbases
@@ -1633,10 +1821,8 @@ Impulse engines require 20 units to warm up, plus 100 units per
 <para>The original Star Trek seems to have been written by Mike
 Mayfield at the beginning of the 1970s.  His first version was in
 BASIC for a Sigma 7 in 1971; in 1972 he rewrote it in Hewlett Packard
-BASIC. The source is <ulink
-url="&sst-site;www/historic/mayfield.basic">available</ulink> on the
-SST2K website. In January 1975 it became part of the DECUS library
-under the name <ulink
+BASIC. The source is included in the SST2K repository.  In January
+1975 it became part of the DECUS library under the name <ulink
 url='http://www.trailing-edge.com/~shoppa/decus/110174.html'>SPACWR</ulink>.</para>
 
 <para>While some people claim to have recollections of playing Trek
@@ -1662,9 +1848,8 @@ Hicks dated 5 April 1973. This does not appear to have been derived
 from Ahl's SPACWR. The header says "GENERAL IDEA STOLEN FROM
 PENN. U.", and the game has several features not present in SPACEWR:
 notably, the Death Ray, ramming, and the Klingon summons to surrender.
-And, of course, it predates Ahl's book.  The source is <ulink
-url="&sst-site;www/historic/UT-Trek.basic">available</ulink> on the
-SST2K website.</para>
+And, of course, it predates Ahl's book.  The source is included in the
+SST2K repository.</para>
 
 <para>Dave Matuszek, Paul Reynolds et. al. at UT Austin played the
 Hicks version on a CDC6600, but disliked the long load time and
@@ -1685,6 +1870,10 @@ in 1973-1974 was like Mayfield's original and most later versions in
 BASIC, in that it used used polar coordinates (a clockface angle
 and a distance) for manual navigation.</para>
 
+<para>Tom Almy writes: "I've received further information that the
+black holes, Tholian web, Super Commander, and Emeritus mode were
+added by Marc Newman."</para>
+
 <para>At the time the UT FORTRAN source was last translated to C it emitted
 the message "Latest update-21 Sept 78".  Thus, it actually predated
 (and may have influenced) the best-known BASIC version, the "Super
@@ -1778,6 +1967,8 @@ the algorithm.</para>
 <para>The DECUS version had a Deep Space Probe. Looked like a good idea
 so I implemented it based on its description.</para>
 
+<para>I imported CAPTURE from BSD Trek.</para>
+
 </sect1>
 <sect1><title>Stas Sergeev's story</title>
 
@@ -1822,8 +2013,8 @@ is alive.</para>
 <para>Planets are auto-scanned when you enter the quadrant.</para>
 </listitem>
 <listitem>
-<para>Mining or using crystals in presense of enemy now yields an attack.
-There are other minor adjustments to what yields an attack
+<para>Mining or using crystals in the presence of the enemy now yields
+an attack.  There are other minor adjustments to what yields an attack
 and what does not.</para>
 </listitem>
 <listitem>
@@ -1839,7 +2030,7 @@ better anyway.</para>
 </listitem>
 </itemizedlist>
 
-<para>My changes got merged into SST2K in 2005, and I work on it now.</para>
+<para>My changes got merged into SST2K in 2005.</para>
 
 </sect1>
 <sect1><title>Eric Raymond's story</title>
@@ -1882,7 +2073,7 @@ command descriptions, and changed some logic in sst.c to match.
 <listitem><para>
 I've cleaned up a lot of grubby FORTRANisms in the code internals &mdash;
 used sizeof(), replaced magic numeric constants with #defines,
-that sort of thing.
+that sort of thing.  Later I translated the code from C to Python.
 </para></listitem>
 <listitem><para>
 I fixed a surprising number of typos in the code and documentation.
@@ -1950,6 +2141,9 @@ derived from a still earlier version in use at Penn State University.</para>
 </sect1>
 <sect1><title>References</title>
 
+<para>These are the original references by Dave Matuszek and Paul
+Reynolds:</para>
+
 <orderedlist>
 <listitem><para><citetitle>Star Trek</citetitle> (the original television
 series), produced and directed by Gene Rodenberry.</para></listitem>
@@ -1969,9 +2163,9 @@ Books)</para></listitem>
 David Gerrold.  Similiar in scope to the above book.
 (Bantam)</para></listitem>
 
-<listitem><para><citetitle>The Star Trek Guide</citetitle>, third revision 4/17/67, by Gene
-Roddenberry.  The original writer's guide for the television
-series, but less comprehensive than (3) above.
+<listitem><para><citetitle>The Star Trek Guide</citetitle>, third
+revision 4/17/67, by Gene Roddenberry.  The original writer's guide
+for the television series, but less comprehensive than (3) above.
 (Norway Productions)</para></listitem>
 
 <listitem><para><citetitle>The Trouble With Tribbles</citetitle>, by
@@ -1994,4 +2188,80 @@ shops.</para></listitem>
 
 </sect1>
 </chapter>
+
+<appendix><title>Setting the Wayback Machine</title>
+
+<para>SST2K and its ancestors have a long history.  One of the
+objectives of this project is to make that history available.
+Accordingly, here is a timeline of the development of SST2K and
+its ancestors, as closely as we can reconstruct it.  Someday this
+may become the basis for a "wayback machine" switch that enables
+feature sets by year.</para>
+
+<itemizedlist>
+<listitem><para>1971 &mdash; Mike Mayfield's original BASIC Star
+Trek.</para></listitem>
+
+<listitem><para>5 April 1973 &mdash; Grady Hicks's BASIC version fot
+the Taurus.</para></listitem>
+
+<listitem><para>Summer 1973 &mdash; Dave Matuszek, Paul Reynolds, and
+the Austin crew begin work on the UT FORTRAN version.</para></listitem>
+
+<listitem><para>1974 &mdash; Dave Matuszek gets distracted by other
+things, notably a job change and the birth of his first
+child.</para></listitem>
+
+<listitem><para>21 September 1978 &mdash; This was the date on the
+first FORTRAN version Tom Almy saw, on which he based his later C
+translation.</para></listitem>
+
+<listitem><para>1979 &mdash; Marc Newman adds Tholians,
+super-commanders, and Emeritus mode.</para></listitem>
+
+<listitem><para>1995-1996 &mdash; Tom Almy translates his FORTRAN
+port to ANSI C.</para></listitem>
+
+<listitem><para>1997 &mdash; Tom Almy finds the sources for UT
+FORTRAN on the Web and merges in features new since the 1978 version:
+EMEXIT, Tholian Web, improved death ray.  He adds deep-space probes
+from the DECUS version.</para></listitem>
+
+<listitem><para>10 October 2004 &mdash; ESR starts hacking on Almy's C
+translation, de-FORTRANIZING the code. HELP/CALL/SOS becomes MAYDAY.
+</para></listitem>
+
+<listitem><para>30 October 2004 &mdash; SST2K project started on
+Berlios.</para></listitem>
+
+<listitem><para>18 January 2005 &mdash; First changes merged in from Stas
+Sergeev. The curses interface is added.</para></listitem>
+
+<listitem><para>September 2006 &mdash; BSD features merged
+in. Inhabited-worlds features and weighted critical hits date from
+this time.</para></listitem>
+
+<listitem><para>9 October 2006 &mdash; Translation to
+Python.</para></listitem>
+
+<listitem><para>1 March 2017 &mdash; Color added.
+Cloaking device and capture command added from BSD (via Almy's
+2013 version)</para></listitem>
+
+<listitem><para>25 March 2019 &mdash; At long last, chart entries are
+uniformly dot-filled. (Suppressed in the plain and almy
+interface styles.)</para></listitem>
+
+<listitem><para>25 August 2023 &mdash; Coordinates optionally in
+alphameric mode, e.g "b3" rather than "2 - 3". (Suppressed in the
+plain and almy interface styles.)</para></listitem>
+
+
+</itemizedlist>
+
+<para>One as-yet unanswered question is when the code changed from
+distance/direction navigation to coordinate offsets.  Dave Matuszek
+believes it must have been after he stopped working on the game in
+1974.</para>
+</appendix>
 </book>