1971 · Strategy · BASIC / SDS Sigma 7
Star Trek (1971) is Mike Mayfield's text strategy game, in which the Enterprise hunts Klingons across an 8×8 galaxy before time runs out.
The Enterprise hunts an invading Klingon fleet across a galaxy of 8×8 quadrants, each split into 8×8 sectors, before a random time limit runs out. A short-range scan prints a text map of the current quadrant with the ship as "-E-", and a long-range scan counts the stars, Klingons and starbases in neighbouring quadrants. Warp drive moves the ship, taking time in proportion to distance, and movement, combat and shields all drain energy, restored at starbases.
Combat is turn-based. Phasers need no aiming but weaken with distance, with the player choosing the power of each shot, while photon torpedoes keep their strength and destroy a Klingon in one hit but must be aimed by angle. Klingons fire back on their turn. The game ends when the Enterprise is destroyed, every Klingon is gone or time runs out, and a rating weighs energy used, damage and time left.
Mike Mayfield wrote it in BASIC in 1971, in his last year of high school, on an SDS Sigma 7 at the University of California, Irvine, to which he had illicit access; it had only a Teletype printer, so he aimed for a Spacewar!-style game that would work on paper, saving to punched tape each day. When a local Hewlett-Packard office offered him an HP 2000C, he rewrote it from scratch, finishing on 20 October 1972, and it entered HP's public-domain library in 1973 as STTR1.
David Ahl and Mary Cole ported it to DEC BASIC that summer, and in 1974 Bob Leedom expanded it into Super Star Trek, with three-letter commands, moving Klingons and named quadrants. By 1978 Ahl said it was hard to find a computer installation without a version.