Mainframe computers arecomputers used primarily by businesses and academic institutions for large-scale processes. Beforepersonal computers, first termedmicrocomputers, became widely available to the general public in the 1970s, the computing industry was composed of mainframe computers and the relatively smaller and cheaperminicomputer variant. During the mid to late 1960s, manyearly video games were programmed on these computers. Developed prior to the rise of the commercialvideo game industry in the early 1970s, theseearly mainframe games were generally written by students or employees at large corporations in amachine orassembly language that could only be understood by the specific machine or computer type they weredeveloped on. While many of these games were lost as older computers were discontinued, some of them wereported to high-level computer languages likeBASIC, had expanded versions later released for personal computers, or were recreated forbulletin board systems years later, thus influencing future games and developers.
Early computer games began to be created in the 1950s, and the steady increase in the number and abilities of computers over time led to the gradual loosening of restrictions on access to mainframe computers at academic and corporate institutions beginning in the 1960s. This in turn led to a modest proliferation of generally small, text-based games on mainframe computers, with increasing complexity towards the end of the decade. While games continued to be developed on mainframes and minicomputers through the 1970s, the rise of personal computers and the spread of high-level programming languages meant that later games were generally intended to or were capable of being run on personal computers, even when developed on a mainframe. These early games includeHamurabi, an antecedent of thestrategy andcity-building genres;Lunar Lander, which inspired numerous recreations in the 1970s and 1980s;Civil War, an early war simulation game;Star Trek, which was widely ported, expanded, and spread for decades after;Space Travel, which played a role in the creation of theUnixoperating system; andBaseball, an earlysports game and the first baseball game to allow player control during a game.

Mainframe computers are powerfulcomputers used primarily by large organizations for computational work, especially large-scale, multi-user processes. The term originally referred to the large cabinets called "main frames" that housed thecentral processing unit and mainmemory of early computers. Prior to the rise ofpersonal computers, first termedmicrocomputers, in the 1970s, they were the primary type of computer in use, and at the beginning of the 1960s they were the only type of computer available for public purchase.[1][2]Minicomputers were relatively smaller and cheaper mainframe computers prevalent in the 1960s and 1970s, though they were still not intended for personal use. One definition from 1970 required a minicomputer to cost less than US$25,000.[3] In contrast, regular mainframes could cost more than US$1,000,000.[2]
By the end of the 1960s, mainframe computers and minicomputers were present in many academic research institutions and large companies such asBell Labs.[2][4] While the commercialvideo game industry did not yet exist at that point in theearly history of video games and would not until the early 1970s, programmers at these companies created several small games to be played on their mainframe computers. Most of these spread only to other users of the same type of computer and therefore did not persist as older computer models were discontinued; several, however, inspired future games, or were later released in modified versions on more modern systems or languages.[5] These early mainframe games were largely created between 1968 and 1971; while earlier games were created they were limited to small, academic audiences. Mainframe games also continued to be developed through the 1970s, but the rise of the commercial video game industry, focused onarcade video games andhome video game consoles, followed by the rise of personal computers later in the decade, meant that beginning in the 1970s the audience and developers of video games began to shift away from mainframe computers or minicomputers, and the spread of general-purpose programming languages such as theBASIC programming language meant that later mainframe games could generally be run on personal computers with minimal changes, even if initially developed on a mainframe.[6]
The very first computer games began to appear in the 1950s, starting withBertie the Brain, a computer-based game oftic-tac-toe built byDr. Josef Kates for the 1950Canadian National Exhibition.[7] While the status of these games as video games depends on the definition used, the games developed during this time period ran on the large antecedents of mainframe computers and were primarily developed for the purposes of academic research or to showcase the technological development of the computers on which they ran. Access to these computers, located almost exclusively in universities and research institutions, was restricted to academics and researchers, preventing any development of entertainment programs. Over the course of the decade, computer technology improved to include smaller, transistor-based computers on which programs could be created and run in real time, rather than operations run in batches, and computers themselves spread to more locations.[8]
By the 1960s, improvements in computing technology and the early development of relatively cheaper mainframe computers, which would later be termed minicomputers, led to the loosening of restrictions regarding programming access to the computers. At theMassachusetts Institute of Technology (MIT), access to theTX-0 experimental computer was opened to students and employees of the university. This in turn led to the development of programs that in addition to highlighting the power of the computer also contained an entertainment aspect. The games created for the TX-0 by the small programming community at MIT includedTic-Tac-Toe, which used alight pen to play a simple game of noughts and crosses against the computer, andMouse in the Maze, which let players set up a maze for a mouse to run through.[9][10][11] When theDigital Equipment Corporation (DEC)PDP-1 computer was installed at MIT in 1961, the community built a video game to showcase its abilities,Spacewar!, which then became the first known video game to spread beyond a single computer installation as it was copied and recreated on other PDP-1 systems and later on other mainframe computers.[10][12]
Over the course of the decade, computers spread to more and more companies and institutions, even as they became more powerful—by 1971, it is estimated that there were over 1000 computers with monitors, rather than the few dozen at the beginning of the 1960s.[13] While different computers could generally not run the same programs without significant changes to the programs' code, due to differences in the physicalhardware ormachine languages, the expansion of the computing industry led to the creation of catalogs and user groups to share programs between different installations of the same series of computers, such as DEC's PDP line. These catalogs and groups, such as theIBM program catalog and the Digital Equipment Computer Users' Society (DECUS), shared small games as well as programs, including, for example, "BBC Vik The Baseball Demonstrator" byJohn Burgeson and "Three Dimensional Tic-Tack-Toe" in the April 1962 IBM catalog,[14] and dice games and question and answer games in the DECUS newsletter.[15][16]The Sumerian Game (1964) for theIBM 7090, astrategy video game of land andresource management, was the firsteducational game for children.[17] Mainframe games were developed outside of the IBM and DEC communities as well, such as the 1962 PolishMarienbad for theOdra 1003,[18] andblackjack,hangman, and tic-tac-toe on theUnited States Air Force andRAND'sJOSS.[19]
By the latter half of the 1960s, higher-level programming languages such as BASIC which were able to be run on multiple types of computers further increased the reach of games developed at any given location. While most games were limited to text-based designs, rather than visual graphics likeSpacewar, these games became more complicated as they reached more players, such as baseball and basketball simulation games.[20][21][22] The November 1969 DECUS catalog listed 37 games and demos includingSpacewar andThe Sumer Game, compared to 58 scientific and engineering applications, the most common intended purpose of a minicomputer.[23] Access to the computers themselves was also extended to more people by systems such as theDartmouth Time-Sharing System (DTSS), which connected several thousand users through many remote terminals to a central mainframe computer. By the 1967–68 school year the DTSS library of 500 programs for the system included,John G. Kemeny andThomas E. Kurtz wrote, "many games". Over a quarter of the system's usage was for casual or entertainment purposes, which Kemeny and Kurtz welcomed as helping users to become familiar with and not fear the computer. They noted that "we have lost many a distinguished visitor for several hours while he quarterbacked theDartmouth football team in a highly realistic simulated game".[24][25] By 1972 the football simulation had become amultiplayer video game, supporting head-to-head play.[26]
Mainframe games were also played and watched by people outside of college campuses. In 1968,Cornell University School of Hotel Administration funded the development of twobusiness games:Cornell Hotel Administration Simulation Exercise (CHASE) andCornell Restaurant Administration Simulation Exercise (CRASE). The former was abackronym, having been developed by Prof. Robert Chase and his students. Notably the restaurant game featured competitive play, with teams of players managing competing restaurants. The games were made playable for attendees at national conventions of theAmerican Hotel & Motel Association and the Club Managers Association of America in 1969.[27] On Christmas Eve, 1970, theBBC television programTomorrow's World broadcast a mainframe computerracing game played between TV presenterRaymond Baxter and British two-timeFormula One world championGraham Hill on their Christmas special. The game was written byIBM-employee, Ray Bradshaw, usingCALL/360 and required two data center operators to input the instructions. "The race was run to show that computers could be fun."[28]

In 1971, DEC employeeDavid H. Ahl converted two games,Hamurabi andLunar Lander, from theFOCAL language to BASIC, partially as a demonstration of the language on the DECPDP-8 minicomputer. Their popularity led him to start printing BASIC games in the DEC newsletter he edited, both ones he wrote and reader submissions. In 1973, he published101 BASIC Computer Games, containing descriptions and thesource code for video games written in BASIC. The games included were written by both Ahl and others, and included both games original to the language andported from other languages such as FOCAL. Many of these ports were originally mainframe computer games.101 BASIC Computer Games was a best seller with more than 10,000 copies sold. Its second edition in 1978,BASIC Computer Games, was the first million-selling computer book. As such, the BASIC ports of mainframe computer games included in the book were often more long-lived than their original versions or other mainframe computer games.[6]
Hamurabi in particular is mostly known for its appearance in Ahl's book. After hearing ofThe Sumerian Game, Doug Dyment at DEC created his ownThe Sumer Game for fellow employeeRichard Merrill's newly invented FOCAL programming language.[17][29] The game consists of ten rounds wherein the player, as the ancient Babylonian kingHammurabi, manages how much of their grain to spend on crops for the next round, feeding their people, and purchasing additional land, while dealing with random variations in crop yields and plagues. Multiple versions of the game were created for the FOCAL andFOCAL-69 languages,[30][31] but an expanded, uncredited version of the game was included in101 BASIC Computer Games asHamurabi, and later versions of the game, even in FOCAL, referenced the new title over the old.[31][32]Hamurabi influenced many later strategy and simulation games and is an antecedent to thecity-building genre.[33]
The other game Ahl originally ported to BASIC,Lunar Lander, appeared in the book in three different forms. The original version of the game was calledLunar, and was originally written in FOCAL for the PDP-8 by Jim Storer while a student atLexington High School in the fall of 1969.[34][35] A different version calledRocket was written in BASIC by Eric Peters at DEC, and a third version,LEM, was written by William Labaree II in BASIC. Ahl converted Jim Storer's FOCAL version to BASIC, changed some of the text, and published it in his newsletter. A year or so later, all three BASIC versions of the game appeared in101 BASIC Computer Games, under the names ROCKET (Storer version), ROCKT1 (Peters version), and ROCKT2 (Labaree version). All three text-based games required the player to control a rocket attempting to land on the Moon by entering instructions to the rocket in response to the textual summary of its current position and heading relative to the ground.[36] Ahl and Steve North converted all three versions toMicrosoft BASIC, changed the collective name toLunar Lander, and published them inCreative Computing magazine in 1976; that name was used in the 1978 edition ofBASIC Computer Games.[36]
Another game from the book isCivil War, a text-based computer game that puts the player against the computer in a simulation of theAmerican Civil War. It was created in BASIC in 1968 by Larry Cram, Luther Goodie, and Doug Hibbard, students at the same high school as Storer.[37] Ahl further credited G. Paul and R. Hess of "TIES" in St. Paul, Minnesota, for converting it into a two-player game.[38] The game simulates fourteen major battles of the conflict, with the human player as theSouth and the computer or opponent as theNorth. The player can control four direct variables which interact to determine a battle's outcome: how much of their money to spend on food, salaries, and ammunition, and which of four offensive or four defensive strategies to use. The morale of the Confederate soldiers is also tracked to help determine victory in a battle. The side with the fewest casualties wins a battle, and if the player wins eight or more battles they win the game.[38][39]Civil War was later one of a number of text-based games available on early 1980s pay-to-play systems.[40]

Possibly the most popular of the mainframe games that appeared in Ahl's book wasStar Trek. The game is a text-based computer game that puts the player in command of theStarshipEnterprise on a mission to hunt down and destroy an invading fleet ofKlingon warships. Unlike the other text-based games, however, it did not use written responses to player input, but instead hadcharacter-based graphics, with different characters used as graphical symbols to represent objects.[39] It was initially developed by Mike Mayfield in 1971 on anSDS Sigma 7 mainframe.[41] The game was also unlike many of the other mainframe games in the book in that it was originally written in BASIC; by the time the book was published, it had been widely copied among minicomputer and mainframe systems and modified into several versions. It was one of these, renamed by Ahl asSpace War, that appeared in101 BASIC Computer Games. The 1978 version of the book contained aMicrosoft BASIC port ofSuper Star Trek, an expanded version of the game first written in 1974, and this version was ported to numerous personal computer systems of the era; Ahl stated in the book that it was difficult to find a computer installation that did not contain a version ofStar Trek.[42] Multiple updated versions in a wide variety of languages have been made since. By 1980,Star Trek was described byThe Dragon magazine as "one of the most popular (if notthe most popular) computer games around", with "literally scores of different versions of this game floating around".[39]

Some mainframe games that did not appear in101 BASIC Computer Games have still had a lasting impact. One such game wasSpace Travel, developed byKen Thompson in 1969, whichsimulates travel in theSolar System. The player flies their ship around a two-dimensional scale model of the Solar System with no objectives other than to attempt to land on various planets and moons. The player can move and turn the ship, and adjust the overall speed by adjusting the scale of the simulation. The ship is affected by the single strongestgravitational pull of the astronomical bodies.[4] The game was developed at Bell Labs, and was ported during 1969 from theMulticsoperating system to theGECOS operating system on theGE 635 computer, and then to thePDP-7 minicomputer.[4][43] While porting the game to the PDP-7, Thompson developed ideas for his own operating system, which later formed the core of theUnix operating system.[43][44]Space Travel never spread beyond Bell Labs or had an effect on future games, leaving its primary legacy as part of the original push for the development of Unix.[44]
Another influential early mainframe game wasBaseball, asports game that was created on aPDP-10 minicomputer atPomona College in 1971 by English majorDon Daglow.[45] While "BBC Vik The Baseball Demonstrator" in 1961 had included light in-game interactivity that could force or prevent a hit by the current batter,[46] Daglow'sBaseball allowed players to manage the game as it unfolded in more advanced ways.[47] The program is documented at theNational Baseball Hall of Fame and Museum inCooperstown, New York.[48]Baseball was continually updated through 1974, and distributed to other PDP-10 installations.[47][49] The text-based game had each player control the pitcher or the batter; they would enter their intention to, for example, pitch to or walk the batter, or switch hitters. The batting player could direct on-base players to steal, and the batter to hit. The results of the play would be printed out onto paper as a verbose description, like a radio description of the game. Daglow went on to develop more sophisticated baseball games in 1983 withIntellivision World Series Baseball, and 1987 withEarl Weaver Baseball, as well as numerous other games.[47][48]