>> Rodney Roberts IS & Education Professional Homepage






Science makes it known,
Engineering makes it work,
Art makes it beautiful.


 
 

Early Computer Gaming - Classic Star Trek

This page is a tidbit of history of early computer games, ASCII graphics, and HP3000s.  Classic Star Trek is an example of a pre-PC computer game without complex graphics and GUIs.  Computer gaming has been around as nearly as long as computers, well before PCs.  Its commonly believed that the age of computers and computer gaming began with the PC.  Not so.  Minicomputers were developed after mainframes and before PCs (the PC was called a microcomputer) - PDP-8 (the first minicomputer, first shipped in 1965), PDP-11, DEC VAX, HP1000, HP2000, HP3000, and others.  And then there were the computer games - Adventure, a text-based game of cave exploration, dwarfs, and treasure, written in FORTRAN (and executed on the HP3000), ported to C for the PC; Star Trek, which used ASCII graphics; and many others.

While looking through some old printouts, came across the source code for Classic Star Trek written in HP2000 and/or HP3000 Basic, circa late-1970s.  Just for grins, ported it to IBM Basic for MS-DOS.  The files needed for running Classic Star Trek can be downloaded below.

HP2000 Basic, HP3000 Basic, and IBM Basic for MS-DOS are very similar to Dartmouth Basic, though both have unique extensions.  Dartmouth Basic is an interpreted language.  That means an interpreter reads, parses, and executes each line of the Basic program as needed.

Computing at ESO Through the Ages
HP 2100 computer, shown with two 7970 tape drives, 7900-series hard disk, 2748 paper tape reader and a 2767A impact printer.
Credit: ESO - http://www.eso.org/public/images/potw1223a/


The HP3000 has been around and continuously improved for many years.  It has been classified as everything from a minicomputer to a mainframe.  Users originally interfaced with it through either VDT (Video Display Terminal) or teletype terminals.  Today, PCs running terminal emulation software such as Reflection are often used; in this case the HP3000 is commonly referred to as a database server.  The HP1000, HP2000 (not the laptop! see above picture for a "real" HP2000), and HP3000 are time sharing systems, allowing multiple concurrent users to be logged on, sequentially giving each user a 'slice' of CPU time.
HP3000
HP3000
ASCII graphics (also called ASCII art and character graphics) is the art of drawing diagrams using the ASCII character set.  In other words, ASCII graphics is just using conventional keyboard characters for a graphic representation.  For instance, an asterisk ("star") can be used to represent a star.  A classic example of ASCII graphics is the Doom FAQ.  Early computer art (Peanuts characters, etc.), as well as flowcharts and PERT diagrams printed with line printers are also ASCII graphics.  Remember early emoticons?  :-) is a character graphic for a smiley face, ;-) represents a wink, :-( represents a frown, and so on.  Some may argue otherwise, but these could be considered ASCII graphics.

Teletype Terminal
ASR-33 Teletype Terminal
Video Display Terminal
Digital VT100

Classic Star Trek, like many early computer games, used ASCII graphics to present its output to the player.  ASCII graphics was the solution to present graphical output using common text-based VDT or teletype terminals.  What allowed ASCII graphics to work so well is that all characters use the same spacing (fixed-pitched font).

Below is a full screenshot of a Classic Star Trek sample game.  To the right is a magnified portion of the screenshot, illustrating each ASCII character using the same space.  This allowed characters to line up under each other and to scale the representation.  Classic Star Trek uses a grid of 33 * 8 characters to represent one quadrant of space.
fixed-pitched font
Star Trek Game User Interface
In the full screenshot's lower portion is a short range sensor scan.  On the lower left, the area between the dashed lines represents a two-dimensional view of one quadrant of space; this representation uses ASCII graphics.  On the lower right is a status summary.  In the upper left is a legend of what each ASCII graphic symbol group represents (not in original version; added for this port).  A random number generator is used to generate Stars, Klingon ships, and Federation Starbases for each quadrant.

The game goal is to save the Federation from the Klingons.  The game cycle is 1 output event to 1 input event based.  The game presents to the player a scenario (output event) as above, and the player then responds with a command (input event).  Available commands are:

      COMMAND 0 = WARP ENGINE CONTROL
      COMMAND 1 = SHORT RANGE SENSOR SCAN
      COMMAND 2 = LONG RANGE SENSOR SCAN
      COMMAND 3 = PHASER CONTROL
      COMMAND 4 = PHOTON TORPEDO CONTROL
      COMMAND 5 = SHIELD CONTROL
      COMMAND 6 = DAMAGE CONTROL REPORT
      COMMAND 7 = LIBRARY COMPUTER
      COMMAND 8 = ABORT MISSION
      
If a command requires additional information, Classic Star Trek will request it.  The game then processes the command, and present the results to the user.

The PC port of Classic Star Trek runs within a MS-DOS box (Win9x) or a Command Line (WinXP).  The Classic Star Trek download consist of 3 Basic interpreter files (BASIC.COM, BASICA.COM, and BASICA.EXE), 7 Basic source files (STTR1.BAS, STTR2.BAS, STTR3.BAS, STTR4.BAS, STTR5.BAS, STTR6.BAS and STTR7.BAS), and a Batch file (STGWB.BAT).  As much of the 'flavor' of the original has been retained as possible (including the Bell, or ctrl-G) with one more exception - colored text foreground has been used.


Download/Install/Run Instructions:
  1. Download stgwb.zip into the directory (folder) of your choice.

    (File has been scanned for malware by Lavasoft Ad-Aware Free 9.0.2; created with Filzip 3.06)

    Due to limitations of free web hosts, unable to provide a self-extracting .exe file.  Therefore it will be necessary to manually install.
     
  2. Win98:Will need to use a file decompression utility, such as Filzip 2.0.
    Open stgwb.zip. Extract to the C:\ directory (Destination dir.).  This should create a C:\IBMBASIC directory.  If it creates a C:\IBMBAS~1 directory 1, you may need to edit stgwb.bat and the .bas files (see below).

    WinXP Windows Explorer: Use Windows Explorer to navigate to the folder containing stgwb.zip; select; double click.  Extract to the C:\ folder. This should create a C:\IBMBASIC folder.

    It is necessary to hard-code the destination folder for one simple reason - each of the Basic programs contain at least one chain command.  The chain command causes the Basic interpretter to transfer control from one Basic program to another.  The chain command has the directory of the target program embedded in its argument, as shown below.
          650 CHAIN "C:\IBMBASIC\STARTREK\STTR3.BAS"
          
    There are other solutions, but it just adds another layer of complexity.  If the files must be stored in an another folder, then each occurrence of the chain command in the 7 Basic source files must be modified to reflect the change.  And the MS-DOS short name must be used.  For example, if the new directory is "C:\Program Files\IBMBASIC\STARTREK",1 then the chain command2 must be changed to
          650 CHAIN "C:\Progra~1\IBMBASIC\STARTREK\STTR3.BAS"
          
    The 7 Basic source files are in plain text format.  Also, the Batch file STGWB.BAT must be modified to reflect the folder change.
     
  3. Start a MS-DOS box (Win9x) or a Command Prompt (WinXP).
    Type in CD \IBMBASIC and press enter.
    Type in stgwb and press enter.
    After the game ends, type in system and press enter to exit the Basic interpretter.


To those whose experience with computers began with PCs running Win9x, Basic Classic Star Trek will seem incredibly primitive.  But an experienced computer gamer of that time could spend hours in front of the terminal playing.  And not because of slow response times!  It was a case of taking then current technology and using it for fun and games.  For people who enjoyed working with computers and were Star Trek fans, it was an intersection of two enjoyable activities.


1. See WinXP Command Prompt Path about changing the long file name of the WinXP Command Prompt path to its short file name equivalent.
2. While short file names work on Win7, the Basic Interpretter will not.  It does execute in a VMware Player 6.0.3 running Win98SE guest operating system as shown below.   Files (including stgwb.zip) can be transferred between host and guest operating system using Drag 'n Drop.  The Win98SE guest O/S will need a PKUNZIP utility to unzip stgwb.zip.
VMware Player


Any and all © copyrights, ™trademarks, or other intellectual property (IP) mentioned here are the property of their respective owners.  No infringement is intended.
Site best viewed with Mozilla FireFox 3.6.13 (or higher).

  Free web hosting provided by
Free Web Hosting
, Award Space Web Hosting , X10hosting Free Web Hosting. , Free Web Hosting. , & GigaRocket Web Hosting



>> Rodney Roberts IS & Education Professional Homepage