[[caption-width-right:236:A stunning "Full Screen Display" of your quadrant, not available in the original teletype version]]

->I've seen the sources to dozens of ''Star Trek'' computer games that various people have written, and I have to believe it's some kind of law. In all of these games, for many different systems, written in many different computer programming languages, and all written independently of each other, all have one thing in common. The variable used to count the number of remaining Klingons -- the enemy -- that haven't been killed yet, is ''always'' '''K9'''.
->-- Paul Robinson

The first ''Franchise/StarTrek'' computer game [[note]]The original version used teletype for output, so it was a few years before it became a "video game"![[/note]] is a TurnBasedStrategy game written by Mike Mayfield in 1971 on a [[UsefulNotes/MainframesAndMinicomputers Sigma 7 mainframe]], using the BASIC programming language. It became one of the big hits of the early home computer era in the late [[TheSeventies 1970s]] and early [[TheEighties 1980s]].

Klingon warships have invaded Federation space, and it's up to the ''Enterprise'' to hunt them down. Federation space is divided into a grid of 8 by 8 quadrants[[note]]This is at odds with later Paramount Trek canon, in which the galaxy is divided into only 4 quadrants. A quadrant ''is'' supposed to mean a quarter, after all.[[/note]], and each quadrant is a grid of 8 by 8 sectors. The ''Enterprise'' starts in one quadrant, which may have Klingons in it. If not, use long-range scanners to determine the contents of nearby quadrants. Quadrants may contain Klingon warships, friendly [[SpaceStation starbases]], and/or stars. Once you find the enemy, warp to that quadrant.

Combat is turn-based. You have phasers and photon torpedoes, and the Klingons have phasers. Your phasers automatically target the enemy, but may take several shots to destroy them. Torpedoes will kill an enemy in one shot, but you only carry a limited supply of them and you have to aim them by typing in a shot angle. The ship's computer (usually) includes a calculator to help you set up the shot. You can also maneuver using impulse drive. Meanwhile, the Klingons are shooting at you and moving around, and stars can get in the way of the fighting. The ''Enterprise'' takes SubsystemDamage, so a lucky shot can cripple you until repairs are made.

The ''Enterprise'' runs on a PowerSource of energy units. Warp drive, shields, and phasers all cost energy. (In some variants, taking a hit to your shields consumes energy.) Dock at a starbase to replenish your energy and torpedoes.

The game ends when all the Klingons are destroyed, or you run out of energy (destroyed by enemy fire or out of warp fuel).

BASIC was a very common programming language in the '70s, so the game was ported to minicomputers, and distributed in books and magazines as a type-in program. Later versions deepened the gameplay with exploration, mining missions, and (in some cases) "real time" play where the Klingons acted once every few seconds instead of once per turn.[[note]]A UsefulNotes/TRS80 adaptation named ''Graphictrek 2000'' even included steerable torpedoes[[/note]] It became one of the most popular games of the pre-PC college minicomputer era. In 1978, it was ported to Microsoft BASIC, the emerging standard for microcomputers. Versions appeared for the UsefulNotes/AppleII, UsefulNotes/TRS80, and UsefulNotes/IBMPersonalComputer, and it was one of the most popular games on those platforms too. Derivatives with graphics and sound started appearing, in particular ''VideoGame/StarRaiders'', and the original faded into history.

!!''Star Trek'' the text game provides examples of:

* AbandonShip: Doubling as VideoGameLives. Some variants of the game allow you to abandon the ''Enterprise''; you're then given command of a weaker ship, the U.S.S. ''[[UnfortunateNames Faerie Queene]]'', which you can't abandon.
* AwesomeButImpractical: Mongol [[OneHitKill plasma bolts]] in ''EGA Trek''. The player has to take time actively raiding enemy supply ships and planetary supply bases to find any, and even then, they're relatively rare. Successfully firing one takes the player's entire turn to do, preventing the use of other weapons, and they have an annoying tendency to [[EpicFail fail to detonate]]. The player is generally better off relying on their torpedoes and energy weapons unless the situation ''really'' calls for the extra firepower.
* BadassInDistress: Allied starbases and ships sometimes put out {{Distress Call}}s if enemy ships are in the same quadrant, whereupon the player can come to their aid for bonus points in their game score. Starbases tend to last a fair while in combat but deal no damage to the enemy, while allied ships tend to be [[GlassCannon fairly fragile]] but they ''do'' chip away at the enemy ships' shields with their energy weapons.
* BoringButPractical: Energy weapons (phasers, lasers, etc.) require a lot of energy to fire, drop off in effectiveness at longer ranges or when damaged, overheat if used excessively, and can take multiple shots to eliminate an enemy ship, although the last two depend on the skills of the player. At the same time, however, energy weapons never miss the target.
* BossInMookClothing: Mongol Bases in ''EGA Trek'' scarcely look any more intimidating than their usual array of ships -- until the player gets anywhere close and has to deal with the [[MoreDakka ungodly amount of damage]] that they quickly dish out, which usually causes a whole mess of SubsystemDamage since they only show up on higher difficulty levels. If the ''Lexington'' is not at full strength confronting one, and there are multiple Mongol ships around it (which usually happens), it's often a good idea to pull a TacticalWithdrawal, go find a friendly starbase and resupply or repair, or keep on fighting elsewhere until a Mongol supply ship or planetary supply base yields a [[OneHitKill Plasma Bolt]] or two, and ''then'' come back and crack the StoneWall.
* CaptainErsatz: Since the ''Franchise/StarTrek'' franchise was copyrighted and trademarked, any company that wants to sell a variant of the game has to [[SerialNumbersFiledOff file all the serial numbers off]]. It's not hard to guess why.
** When Radio Shack wanted to sell the Sol-20 variant "TREK 80" for its UsefulNotes/TRS80 microcomputer, they renamed it "Invasion Force", and had it feature the starship U.S.S. ''Hephaestus'' firing its masers and triton missiles at Jovian warships.
** Similarly, ''EGA Trek'' began with Klingons, the U.S.S. ''Enterprise'', the Federation, and ''Star Trek'' ship designs, changing them into "Mongols", the U.S.S. ''Lexington'', the "Union", and somewhat redesigning the ships.
** Sears Telegames' exclusive release for Atari 2600 was called ''Stellar Track''. Interstel's ''Star Fleet'' series had the United Galactic Alliance fighting off "Krellans" and "Zaldrons".
** An Apple II variant renamed the Enterprise the ''Endeavor'', and the Klingons the Klarnons. This allowed the game to keep using "E" for the player's starship and "K" for the enemy ships.
* CloakingDevice: ''EGA Trek'' also included "[[CaptainErsatz Vandal]]" ships with this ability. The Zaldrons of "Star Fleet I" had this ability as well.
* CriticalExistenceFailure: Played with; enemy ships that suffer damage generally deal less damage to the player's vessel in turn. At the same time, however, they don't suffer any other SubsystemDamage and, once cut down to no HitPoints, promptly [[StuffBlowingUp explode]].
* DeathOrGloryAttack: One frequent addition to the game is to equip a superweapon on the player's ship, like the DeathRay from ''EGA Trek'' or the E-ray from ''TREK 80''. If it worked, it killed every enemy in a quadrant. When it didn't work, it could do enough damage to destroy or cripple the player's ship, cause {{Black Hole}}s to appear all over the current quadrant, or in ''EGA Trek'', temporarily mutate your crew and leave them [[InterfaceScrew drawing smiley faces on the interface]] while [[SanitySlippage ignoring your orders and speaking nonsense]].
* DeflectorShields: A staple of ''Star Trek'', these serve in-game to absorb most of the damage before it impacts the ship and causes structural and SubsystemDamage.
* DirtyCoward: In ''EGA Trek'', "[[CaptainErsatz Mongol]]" Scout ships have the ability to [[ScrewThisImOuttaHere flee into neighbouring quadrants]] if damaged and not destroyed, necessitating pursuit sooner or later for cleanup.
* EliteMooks: In ''EGA Trek'', these come in the form of Mongol Commander battleships, and on higher difficulty levels, the occasional [[BossInMookClothing Mongol Base]]; both are significantly tougher than the average battlecruiser of their faction.
* EnemyDetectingRadar: Long-range scanners. Possibly the UrExample in video games. You could tell how many Klingon warships were in a neighboring quadrant, but not precisely ''where'' they were in the quadrant.
* EpicFail: In ''EGA Trek'', whenever a [[OneHitKill Mongol Plasma Bolt]] fails to explode, since they're usually a OneHitKill or OneHitPolykill if employed against an enemy base or vessel.
* EvilOnlyHasToWinOnce:
* ExplodingBarrels: Stars can explode if a torpedo is fired into them in some versions, destroying anything in the surrounding sectors. (The game penalizes players for stars destroyed to discourage this.) Some versions, like ''EGA Trek'', also have the risk of stars going supernova, destroying the entire quadrant (and damaging the player's ship as it's thrown out).
* ExplosiveOverclocking: The player's ship usually has a cruising speed of Warp 6, although Warp 8 can be attempted in emergencies at the cost of damage to the warp drive subsystem.
* FlipScreenScrolling: Moving from quadrant to quadrant.
* FragileSpeedster: In ''EGA Trek'', Mongol scout ships are capable of [[HyperspeedEscape repeatedly retreating to adjacent sectors]] when attacked, but ultimately they pack less of a punch and are destroyed about as easily as standard Mongol battleships in a straight fight.
* FreewareGames: It was released into the public domain shortly after it was written.
* FromBadToWorse: Some versions, particularly at higher difficulty levels, allow enemy ships to [[HyperspeedAmbush warp in]] from adjacent quadrants to your own to GangUpOnTheHuman. That said, if the player is defending a [[SpaceStation starbase]] at the time, it becomes a case of TooDumbToLive [=and/or=] SuicidalOverconfidence. It can also be exploited to reduce the time spent flying around seeking out the enemy.
* GameMod: Since it's a type-in BASIC program, you can change it any way you like.
* GameOver: Possibly video gaming's UrExample:
* GuideDangIt: The game generally doesn't mention that the player has to manually reset their warp factor from 1 up to the desired speed (usually Warp 6, unless an emergency [[ExplosiveOverclocking demands Warp 8]]). This can result in an [[LeeroyJenkins incautious]] or unaware player blowing a massive amount of time and ruining their score right off the bat, if they forget to call up Engineering and change the warp factor ''before'' they try to leave their first quadrant and take the fight to the enemy.
* HyperspeedAmbush: Some versions allow the Klingon, Mongol, etc. ships to warp in from surrounding quadrants to join in a battle against the player's ship, or the same enemies are capable of using a TractorBeam to intercept the player's vessel and pull it into a quadrant where they weren't intending to go.
* HyperspeedEscape: Some versions also allow Klingon, Mongol, etc. [[EliteMooks commanders]] and [[DirtyCoward scout ships]] to flee into neighbouring quadrants if heavily damaged but still intact, necessitating pursuit later on [[GottaKillThemAll for cleanup]].
* IdiosyncraticDifficultyLevels: ''EGA Trek'' has Lieutenant-Commander, Commander, Captain, Commodore and [[NintendoHard Admiral]].
* ImmuneToBullets: Vandal ships in ''EGA Trek'', being cloaked, [[NoSell automatically dodge]] all torpedo attacks. The only way to take them out, short of an exploding star conveniently nearby, is to fly up to close range and pour a [[MoreDakka large amount]] of "laser" energy into them until they explode.
* InvisibleWall: You'll run into one of these if you try to leave the 8x8 quadrant playfield. In some variants, your engines automatically shut down and you get the message "Sorry, edge of galaxy in that direction." In others, you crash into the energy barrier surrounding the galaxy and get damaged.
* InsistentTerminology: The galactic grid is usually said to be composed of 64 quadrants in a standard game. A quadrant is actually a fourth of something. So it would be more proper to call them sectors, and their divisions subsectors. The ''StarTrek'' universe does properly divide the galaxy into four quadrants, but these games were made decades before that development appeared. It may be an understandable mistake, as [[Series/StarTrekTheOriginalSeries the original series]] was sometimes erroneous and inconsistent in the use of the terms "quadrant" and "sector".
* InterfaceScrew: Damage to the Main Computer results in the loss of data on the long-range sensor map, meaning the player has to fly around to scan it all again, or reconstruct the last known tactical situation from their own memory.
* ItsUpToYou[=/=]WeCannotGoOnWithoutYou:
* KillSteal:
** Can occur in ''EGA Trek'', when the player has damaged one or more enemy ships [[HPToOne nearly to destruction]] and a "Vandal Death Pod" or two just happens to enter the quadrant and deal ScratchDamage to everybody, [[NoSell barely affecting]] the player's shields but putting the enemy ships over the edge to a CriticalExistenceFailure. Particularly frustrating if the enemy ships in question were [[PinataEnemy supply ships]] that were ''almost'' at the point of surrendering.
** Allied ships can also pull this off when you come to their rescue, as unlike starbases, they do chip away at the enemy ships with their energy weapons.
* KineticWeaponsAreJustBetter: Torpedoes generally destroy standard enemy ships in one hit and require very little energy to fire. At the same time, however, the onboard stock of them is extremely limited, they have to be aimed manually, and in some versions (like ''EGA Trek'') they can miss the target completely, which generally happens at long range.[[note]]Note that in Paramount's Trek universe, photon torpedoes aren't kinetic weapons at all; they're antimatter warheads with a miniature quasi-warp drive.[[/note]]
* KleptomaniacHero: Barring a DistressCall or two to answer elsewhere, it is generally always worth inspecting any planet the player comes across in the event that it yields spare {{Power Crystal}}s for emergency power reserves, or better yet, an enemy supply base with the potential for additional defensive or offensive equipment. The same goes for space combat in the games where enemy [[PinataEnemy supply ships]] spawn. It can make the difference against heavy odds later on, or allow your vessel to stay out and hunting enemy ships for longer without having to spend time returning to a starbase to resupply and/or repair.
* LuckilyMyShieldWillProtectMe: The answer to an incoming [[OhCrap Mongol plasma bolt]] in ''EGA Trek'' is generally to raise a [[ExactlyWhatItSaysOnTheTin plasma bolt shield]] ''[[PressXToNotDie right away]]''. These are generally obtained from raiding planet-based Mongol supply bases, or getting their supply ships to surrender in combat.
* NonstandardGameOver: Running out of fuel. Probably the UrExample.
* OneHitKill:
** Photon torpedoes usually achieve this in most versions, if they make contact with the target.
** ''EGA Trek'' takes this UpToEleven with Mongol Plasma Bolts, which are capable of safely taking out the Mongols' [[BossInMookClothing hostile starbases]] -- or damaging the ''Lexington'' severely if deployed by the Mongols.
* OneHitPolykill:
** The Mongol Plasma Bolts in ''EGA Trek''. If used by the player on tightly grouped Mongol ships, the SplashDamage can kill not only the target but all Mongol ships adjacent to it.
** The antimatter pods in ''TREK 80'' and ''Invasion Force''. When detonated by the player, they erase the sector of space they occupy and all 8 of the surrounding sectors. Anything in those sectors is wiped from existence, including the player's starship if he's stupid enough to detonate the pod next to himself. (The sectors also ''stay'' erased, so you can't fire beams or torpedoes through them; and if you enter one of them, your ship is instantly destroyed.)
* PhotoprotoneutronTorpedo:
** "Photon Torpedoes" in any Star Trek game that kept the original terminology.
** "Triton Missiles" in Radio Shack's "Invasion Force". (TREK 80, which Invasion Force was based on, did have Triton Mines, which would destroy everything in the quadrant including the Enterprise.)
** "Energy Torpedoes" in ''EGA Trek'', which also featured "Plasma Bolts", though the latter were rarer and more deadly.
* PinataEnemy: ''EGA Trek'' sometimes spawns Mongol supply ships, which are weaker than their usual battlecruisers, and if the player batters them merely to the point of [[KnowWhenToFoldEm surrender]] (not destruction), they hand over their cargo to the player's ship before [[NoBodyLeftBehind vanishing from the map]]. This loot can vary from emergency life support supplies to Mongol [[PowerCrystal power crystals]] (i.e. dilithium) and [[OneHitKill plasma bolts]].
* PowerSource: Your energy. In some versions, it is finite; in others like ''EGA Trek'', it replenishes very slowly -- and guess which subsystem tends to fail the most?
* PressXToDie:
** You can shoot your own starbases! Another probable UrExample. Depending on the version, torpedoing your own starbase will either merely warn you and dock your score, or destroy it -- thereby making it [[CaptainObvious impossible to refuel there again]] -- or even cause the starbase to destroy ''you'' in retaliation.
** Some versions also allow the player to self-destruct their starship, which can be a means of TakingYouWithMe.
* PressXToNotDie: From ''EGA Trek'':
--> '''Message:''' [[OhCrap Mongol at X-Y fires a plasma bolt.]]\\
'''Player:''' USE\\
'''Player:''' *Enter*\\
'''Player:''' [[ProperlyParanoid *selects correct number*]]\\
'''Message:''' [[LuckilyMyShieldWillProtectMe Raising plasma bolt shield ...]]
* RandomlyGeneratedLevels: The numbers and locations of Klingons, starbases, and stars are random.
* RayGun: Phasers, or their renamed substitutes.
* SortingAlgorithmOfEvil: In ''EGA Trek'', on lower difficulty levels, the Mongol fleet consists of standard [[{{Mooks}} battleships]], while higher difficulty levels add variety in the form of [[FragileSpeedster Scout]] [[DirtyCoward ships]], [[PinataEnemy Supply Ships]], Mongol [[EliteMooks Commanders]], and eventually [[BossInMookClothing Mongol Bases]].
* SpaceStation: Friendly ones are encountered frequently, where the player can repair and resupply their ship. ''EGA Trek'' adds hostile Mongol bases that serve as immobile EliteMooks.
* StoneWall:
** Vandal ships in ''EGA Trek'' never move, and they don't attack the player's vessel, but they NoSell any torpedo attacks (due to a CloakingDevice), and generally require ''much'' more laser energy damage to destroy than standard Mongol battleships or even ''[[EliteMooks Commander vessels]]'' can take in the same game.
** Allied Union starbases in ''EGA Trek'' serve the same function -- if the player docks with one while in combat with Mongol warships in the sector, its shields will then protect the ''Lexington'' from return fire, although the starbase itself is still [[StopHelpingMe an obstacle]] to torpedo shots aimed at the enemy.
* SubsystemDamage: Happens frequently during gameplay, usually as a result of combat, but random breakdowns can still happen and require repair time all the same. Either the player can attempt repairs in deep space, or complete them more quickly when docked with a friendly starbase.
* TurnBasedStrategy: Combat alternates between the player's ship and the enemy factions (Klingon, Mongol, Vandal, etc.).
* TwoDSpace:
** Played straight in most versions by virtue of having a strict X,Y coordinate system with no Z-axis.
** Averted (at least on the large scale) in Micklus's ''Star Trek 3.5'', which has a galaxy that's an 8 by 8 ''by 3'' three-dimensional grid of quadrants. Each quadrant is still flat, however.
* UndergroundMonkey:
** ''EGA Trek'' had a variety of {{Palette Swap}}ped "Mongol" ships as EliteMooks, scout ships or [[PinataEnemy supply vessels]].
** ''EGA Trek'' also had the possibility to explore planets, sending either a landing party either via transporter or shuttlecraft to get the stuff detected by the ''Lexington'''s sensors. These attempts can frequently end in failure, as the landing party would often be attacked, resulting in the loss of [[RedShirt crew members]].
** ''Supertrek'' has a use of shuttlecraft where you would mine for dilithium crystals on planets. This was an alternative to refueling at a starbase.
** ''Supertrek'' also had Romulans that were more of a nuisance than a threat. If you entered a Romulan quadrant, they'd simply politely ask you to leave. They didn't attack unless you attacked them first. And their attacks were weak.
* UpToEleven: Spare energy crystals (i.e. dilithium) obtained in ''EGA Trek'' are a crapshoot when used, but the player can luck out with one and boost their energy reserves over 100%, though of course the effect is [[AwesomeButTemporary temporary]] until the excess energy is used up.
* VideoGameCaringPotential: Later versions of the game, like ''EGA Trek'', feature weaker enemy ships (generally supply ships) that will [[KnowWhenToFoldEm surrender]] once damaged [[HPToOne to minimal health]] instead of stubbornly fighting to the death.
* VideoGameCrueltyPotential: A mild case, but if the player sees on their star chart that a starbase has enemy ships in the same quadrant, it's typically a better idea to go around cleaning up enemies elsewhere ''until'' the starbase puts out a DistressCall, and only ''then'' moving to that quadrant to clean up. Or if an enemy ship moves [[TooDumbToLive into a quadrant with a starbase]], it can be worth warping away and attacking the enemy elsewhere until the call for help arrives. Both allow the player to get credit for destroying the enemy ships ''and'' bonus points for saving a starbase under attack.