The game features two spaceships, "the needle" and "the wedge", engaged in a dogfight while maneuvering in the gravity well of a star. Both ships are controlled by human players. Each ship has limited fuel for maneuvering and a limited number of torpedoes, and the ships follow Newtonian physics, remaining in motion even when the player is not accelerating. Flying near the star to provide a gravity assist was a common tactic. Ships are destroyed when hit by a torpedo or colliding with the star. At any time, the player can engage a hyperspace feature to move to a new, random location on the screen, though each use has an increasing chance of destroying the ship instead. The game was initially controlled with switches on the PDP-1, though Alan Kotok and Bob Saunders built an early gamepad to reduce the difficulty and awkwardness of controlling the game.
Spacewar is one of the most important and influential games in the early history of video games. It was extremely popular in the small programming community in the 1960s and was widely ported to other computer systems at the time. It has also been recreated in more modern programming languages for PDP-1 emulators. It directly inspired many other electronic games, such as the first commercial arcade games, Galaxy Game and Computer Space (1971), and later games such as Asteroids (1979). In 2007, Spacewar was named to a list of the ten most important video games of all time, which formed the start of the game canon at the Library of Congress.
During the 1950s, various computer games were created in the context of academic computer and programming research and for demonstrations of computing power, especially after the introduction later in the decade of smaller and faster computers on which programs could be created and run in real time as opposed to being executed in batches. A few programs, however, while used to showcase the power of the computer they ran on were also intended as entertainment products; these were generally created by undergraduate and graduate students and university employees, such as at the Massachusetts Institute of Technology (MIT) where they were allowed on occasion to develop programs for the TX-0 experimental computer. These interactive graphical games were created by a community of programmers, many of them students and university employees affiliated with the Tech Model Railroad Club (TMRC) led by Alan Kotok, Peter Samson, and Bob Saunders. The games included Tic-Tac-Toe, which used a light pen to play a simple game of noughts and crosses against the computer, and Mouse in the Maze, which used a light pen to set up a maze of walls for a virtual mouse to traverse.
In the fall of 1961, a Digital Equipment Corporation (DEC) PDP-1 minicomputer was installed in the "kludge room" of the MIT Electrical Engineering Department to complement the older TX-0, and even before its arrival a group of students and university employees had been brainstorming ideas for programs that would demonstrate the new computer's capabilities in a compelling way. Three of them—Steve Russell, then an employee at Harvard University and a former research assistant at MIT; Martin Graetz, a research assistant and former student at MIT; and Wayne Wiitanen, a research assistant at Harvard and former employee and student at MIT—referring to their collaboration as the "Hingham Institute" as Graetz and Wiitanen were living in a tenement building on Hingham Street in Cambridge, Massachusetts, came up with the idea for Spacewar. "We had this brand new PDP-1", Steve Russell told Rolling Stone in a 1972 interview. "Marvin Minsky had built some little pattern-generating programs which made interesting patterns like a kaleidoscope. Not a very good demonstration. Here was this display that could do all sorts of good things! So we started talking about it, figuring what would be interesting displays. We decided that probably you could make a two-dimensional maneuvering sort of thing, and decided that naturally the obvious thing to do was spaceships."
The gameplay of Spacewar involves two monochrome spaceships called "the needle" and "the wedge", each controlled by a player, attempting to shoot one another while maneuvering on a two-dimensional plane in the gravity well of a star, set against the backdrop of a starfield. The ships fire torpedoes which are not affected by the gravitational pull of the star. The ships have a limited number of torpedoes and a limited supply of fuel, which is used when the player fires his thrusters. Torpedoes are fired one at a time by flipping a toggle switch on the computer or pressing a button on the control pad, and there is a cooldown period between launches. The ships follow Newtonian physics, remaining in motion even when the player is not accelerating, though the ships can rotate at a constant rate without inertia.