Spacewar

The first computer video game. Really!Spacewar screen shot

History

Authors: Stephen “Slug” Russell at MIT. Other major contributors include Peter Samson, Martin Graetz, Wayne Witanen, Alan Kotok and Dan Edwards.
Released on: DEC PDP-1 assembler in 1962.
Comments: The first computer video game. What more needs to be said?

Writing about Spacewar was one of the highlights of making Games of Fame. It’s a simple story of the right people in the right place at the right time.

The right people were Wayne Witanen, J. Martin Graetz and Stephen (Slug) Russell. Like nerds around the world their main non-working interests were bad sci-fi and bad sci-fi movies.

The right place was MIT, center of the computing universe in the 1960s.

The right time was the day MIT installed the world’s first PDP-1. The PDP-1 was about to start a revolution the designers never intended; a combination of just enough speed, just enough memory, and a graphical display that you could just barely control made the PDP-1 the machine that helped launched the “interactive” world we live in today.

Fully loaded PDP-1 at LLNL

LLNL’s PDP-1 was fully loaded with tape decks, paper tape readers and printers. The core of the machine can be seen on the right – the Flexowriter on the far right, the display in the center, and the main console between them.

The PDP-1 was typically set up along with a C-shaped metal bench that sat in front of the main cabinet/console/paper-tape reader, with a “Flexowriter” (a combo tape-punch and printer) on one side and the “Type 30 Precision CRT Display” on the other. Other versions and add ons could grow the system considerably, but the basic machine was small enough to fit in the average kitchen.

One look at this machine was all it took, they decided that they’re going to make the ultimate piece of demoware for it. He describes its evolution thus:

Long before the PDP-1 was up and running Wayne, Slug, and I had formed a sort of ad-hoc committee on what to do with it — it being the Type 30 Precision CRT display which was scheduled to be installed a couple of months after the computer itself. It was clear from the start that while the Ball and Mouse and HAX were clever and amusing, they really weren’t very good as demonstration programs. Why not?

Zooming across the galaxy with our Bergenholm Inertialess Drive, the Hingham Institute Study Group on Space Warfare devised its Theory of Computer Toys. A good demonstration program ought to satisfy three criteria:

  1. It should demonstrate as many of the computer’s resources as possible, and tax those resources to the limit;
  2. Within a consistent framework, it should be interesting, which means every run should be different;
  3. It should involve the onlooker in a pleasurable and active way — in short, it should be a game.

With the Fenachrone hot on our ion track, Wayne said, “Look, you need action and you need some kind of skill level. It should be a game where you have to control things moving around on the scope, like, oh, spaceships. Something like an explorer game, or a race or contest… a fight, maybe?”

“SPACEWAR!” shouted Slug and I, as the last force screen flared into the violet and went down.

The basic rules developed quickly. There would be at least two spaceships, each controlled by a set of console switches (“Gee, it would be nice to have a joystick or something like that…”). The ships would have a supply of rocket fuel and some sort of a weapon: a ray or beam, possibly a missile. For really hopeless situations, a panic button would be nice… hmmm… aha! Hyperspace! (What else, after all, is there?) And that, pretty much, was that.

Well sorta. Slug was the main programmer of the group and his nickname was granted because he was always so slow to do things. Working on Spacewar was no exception. People around the lab had heard of the game and kept bugging him to start it, but he always had a excuse handy. In this case his main complaint was that he didn’t have the math routines he’d need to write the movement code.

So one of the other hackers of the tixo crowd, Alan Kotok, called DEC. Sure enough they had a sin/cos routine for the PDP-1, and so he drove out and got the tape. He slammed it down in front of Steve and said “Here you are, Russell, now what’s your excuse?” With his best answer no longer useful, he started writing code in December.

By January ’62 he had a dot that you could move around the screen. He then evolved the shape of the ships themselves, now forever known as “wedge” and “pencil”. Next he wrote the code to handle the torpedoes, including the routines to detect when a torpedo hit something. Meanwhile Martin was working on the hyperspace function and Steve added on a random star pattern to the background.

By February the game was in debug-mode and Steve was no longer the Slug. He, like so many other hackers before and after, ended up spending almost all of his time in the computer room looking for chances to fix one more bug. Through March the bugs were ironed out and some of the other hackers added in a few features of their own. It finally settled down in April when the game went live.

And there it was, the world’s first video game.

If I hadn’t done it, someone would’ve done something equally exciting if not better in the next six months. I just happened to get there first.

– Steve Russell

I disagree with Russell on one point: I don’t think someone else would have done it better. Spacewar wasn’t just the first, it was the best.

For one thing it was fun. Lots of fun. As much fun as many of the games in the arcades in the 70’s. So much fun that it became an arcade game in the 70’s. Four times!

Spacewar is also a classic piece of demoware. Where other installations fed the public’s fear of the computer, how could anyone walk away from a game of Spacewar and not feel the power of the beast at a nice primal level? In the late 60’s a bunch of Standford students made a film about the tyrany of punch-card computing. Just down the hall were a bunch of other students playing games. Perhaps nothing else better illustrates the disconnect between the public’s image and the reality of computing in the ’60’s.

Then there’s the effects it had on the people at the universities. These were the people who would go on to shape the computer industry today. Thousands of hours of late-night computing time (when you could measure speed in dollars per minute) were spent driving the game at computer centers and universities around the world where it inspired many programmers. Who knows what effect this has had on the industry?

And then of course there’s the way this single game spawned the video game industry. Sure, that would have happened sooner or later, but I’ll bet it would have looked a lot different than it does now. The name Atari wouldn’t mean anything for one thing. And who knows if vectorbeam games would have appeared without this game inspiring people to design whole machines just to play it?

Without a doubt, Spacewar is one of the most influential computer programs ever written.

Spacewar’s Legacy

After the famous period in the early 60’s at the MIT AI lab, John McCarthy decamped along with many of his students and hackers (including Russell) and moved to Stanford. Here Spacewar was introduced to a new group and was extensively updated for their new machine, the PDP-10.

In 1970 DEC introduced the PDP-11, a low cost machine that complimented the PDP-10. It had the right mix of features and price, and it became one of DEC’s biggest sellers. The machine was cheap enough that you could dedicate it to a task, say collecting information from train track sensors, or maybe running Spacewar.

Bill Pitts and his friend Hugh Tuck formed a company called Computer Recreations in June of ’71 based on this idea. Their first version used a low-end PDP-11/20 and an HP “1300A Electrostatic Display” packaged in a walnut veneered box to make Galaxy Game for a total cost somewhere in the range of $20,000. The machine was installed in a Stanford student union coffee shop in Sept’ 71, and students lined up with dimes in hand to get their chance to play the game.

Obviously at a dime a game it was going to take a while to make the 20k back. The two quickly went back to work on an updated version where the PDP drove four consoles via a home-brew display interface. That way the cost of the computer was spread over the four consoles, bringing the unit cost down.

Computer Recreations' Galaxy Game

Galaxy Game had four terminals, arranged as two back-to-back systems.

They mounted their new creation in fancy fibreglass boxes and shipped it off to the coffee shop in June ’72. There it remained in constant use until May ’79 when it was removed because the display interface was getting finicky. Seven years of continous operation and money making has got to be some sort of record in the video game industry.

Galaxy Game is, as far as I can tell, the first commercial video game. Although you’d guess it would be famous it’s practically unknown. Instead the story of Spacewar is better known for another version it spawned…

Noland Bushnell saw Spacewar while at the University of Utah, and immediately decided there’s money to be made. In 1970 he kicks his daughter out of her bedroom and turns it into a lab where he attempts to get a version up and running. Later, while working his “day job” at Ampex, he meets Ted Dabney and the two really get to work on the idea.

Convinced of its future success, the two quit Ampex and shop around the idea under the company name Syzygy Engineering during 1970. Eventually their system gets purchased in 1971 by Bill Nutting of Nutting Associates, a small coin-operated trivia game company. The game wasn’t ready for production yet, so Nutting also hired Bushnell as chief engineer to finish it off.

Nutting's Computer Space

Computer Space had the coolest arcade cabinet ever.

They finally produced a game called Computer Space, which shipped in mid 1972. Unlike Galaxy Game Computer Space was more heavily modified to make it useful in an arcade setting. The biggest change from Spacewar was that it was modified for one player use. In Computer Space the enemy was two computer controlled flying saucers, and the sun was removed.

In order to make the machine less expensive it used a normal B&W TV as it’s display rather than an expensive vector display (although I’m curious what this does to the circuitry, at the time “raster displays” were complex). It also had the coolest cabinet ever seen in an arcade, organic looking fiberglass case with metal-flake paint.

Nutting ended up manufacturing about 1,500 of the games, including some two player versions more faithful to the original. It had a brief brush with fame, and you can even see it being played in the movie Soylent Green for a few seconds. Even with this limited success both Nutting and Bushnell deemed it a failure because they thought it was too complex to build and to play. There were no arcades at the time so the machines were installed in bars, so the games needed to be simple.

Nutting wanted to do another game and approached Bushnell about it, and at first he was excited and agreed. It was not to be though. Nutting wanted to own the game outright, but Bushnell wanted a third of the company in return. The negotiations broke down, never to recover.

Instead Bushnell and Dabney went off and decided to design and sell games on their own. Each put in their $250 royalty from Computer Space, and discovering that the name “Syzygy” was already being used by a roofing company, they founded Atari in 1972. Bushnell went back to the drawing board and started designing a new game, while Dabney kept the company going by running a pinball repair route. Dabney would later decide that the video game idea was too risky, and left Atari, keeping the repair route. Meanwhile Bushnell came came back with a game that was simpler to build and play, PONG. The rest is history.

Another interested player, Larry Rosenthal, designed a version called Space Wars in the mid-70’s. He shopped it around to a few companies, including Atari, but no one bit because of his huge 50% commission demands. He ended up selling the design to Cinematronics, a PONG-clone maker desperately looking for a new game. Their version hit the arcades in 1977 and was a big hit.

Cinematronics' Space Wars

The screen was large, the cabinet was enormous.

Space Wars was very faithful to the original, and one of the most attractive things about the it was that it included a large vector display. This made the game much better looking than other games of the day, which used low quality B&W TV’s as their output and put even lower resolution graphics on top. So Space Wars became the first vectorbeam type game to hit the arcades.

Like the original, Space Wars required two players. A quarter got you 2 minutes of play, and you could keep going until you ran out of money. I’ll never forget the look on other people’s faces in the arcade when I tried to get them to play it with me on my quarter, they always seemed skeptical that two people could play at the same time, and seemed to think I was trying to sucker them somehow.

Space Wars included a 8 by 2 pad for entering the game setup, and it had a big list of options collected from versions that evolved at the universities. For instance you could turn on or off momentum on the ship, change the sun into a black hole, or reverse gravity.

They added a few nice touches of their own as well. The ships were updated, one looks like the ship from Asteriods, and the other is a good rendition of the Enterprise. The explosions were also greatly improved, they showed the ship blowing apart (into little lines) as opposed to the original’s “fuzzy block”. The game also included an amazing sound system which thumped and bumped like you wouldn’t believe.

Another nice touch was an asteroid that would sometimes float about the playfield. It’s pretty clear that after seeing Space Wars in the arcade, Atari engineers quickly ran to the whiteboard and sketched out what would become Asteriods. At the time Atari was introducing it’s own vectorbeam game, a conversion of another university classic, Lunar Lander. Asteriods was so successful that Lunar Lander machines were pulled off the production line and converted into Asteriods machines as fast as possible. It went on to be one of the most successful arcade games in history.

Vectex console, playing Minestorm

Ah the Vectex – intended to bring home the vector games and then tried porting raster ones. It didn’t work.

Vectorbeam games were popular in the arcades, so it was only a matter of time before someone tried to bring them into the home during the gaming craze in the ’80’s. This came to be in the form of the Vectrex, a clever little machine that has the honor of being the only game console that came with it’s own monitor – after all, that’s what it was all about. Pretty much every vectorbeam game was ported to the Vextrex, or was available in some cloned form. Spacewar was no exception: the machine had an excellent port of the Cinematronics version. They even took the time to add a single-player mode to the game, although the AI of the computer ship left a lot to be desired.

Vectrex had the misfortune of shipping in late 1982, just before the great video game crash of 1984. They had recently been bought out by Milton Bradley who was hoping to cash in on the craze with huge sales, and when the market collapsed they pulled the plug after less than two years on the market. Today they’re valuable collectors items.

The Game

Type: Action
Viewpoint: First-person
Time: Real time
Comments: Two players shoot it out while avoiding falling into the sun.
Spacewar opening on a PDP-1

Opening positions in Spacewar on the PDP-1. The Needle is upper right and the Wedge is lower left. The sun doesn’t really stand out here.

By today’s standards Spacewar is a pretty simple game. Two spaceships start on either end of the screen, and are drawn towards the sun in the middle. Each ship is armed with torpedoes fired out of the front of the ship which eventually hit something or burn out. The players have to shoot the other ship while avoiding running into anything. That’s it!

Controls for the game were provided in the form of switches on the console called the “test word switches”. These switches read their “value” – on or off – directly into the computer’s memory. There were 18 of these switches in total, one word for the PDP-1, and four of the switches were dedicated to each user. They were used to turn right or left, fire, or run the engines.

The controls were far from optimal. For one thing the display was to one side of the console, so one player ended up with a better view. Other operating controls were located just below the switches, so it was possible to kill the game by mistake by hitting the wrong one in the heat of battle. And they tended to break down a lot too; they were designed to be flipped a few hundred times a month, not a few hundred times every five minutes!

To avoid these problems players quickly built their own control panels for the game, some of the first being various parts liberated from the stock room of the Tech Model Railroad Club. Later players created joysticks using Air Force pilot control sticks found at army surplus stores, and the first version of a trackball was used at one point.

The ships started on either end of the display and followed reasonable physics, requiring time to get moving, and using up fuel to do so. The torps were “proximity fused” which meant they blew up when they got close to anything else (likely a way of getting around too-fancy hit detection code) – including another torpedo. The speed of the torp was added to the speed of the ship, allowing for fancy effects like firing in the opposite direction of travel while at high speed, leaving an almost stationary “mine” in space. The ships could also collide and kill each other.

Martin Graetz added his hyperspace function to the game in March. This allowed you to make your ship disappear from the screen for a short period of time and then reappear, along with your original motion, in some random location. Because the location was random it was possible to reappear flying right into the sun or in front of a torpedo. It was still pretty powerful as it was, so they added a counter – on the third try you exploded.

Early on the random starfield was added by Steve. Without the background it was hard to judge relative movement of the ships at slow speeds. Adding the stars made motion more obvious, as well as making the display more attractive. But Pete Samson was so annoyed by the randomstars that he sat down and wrote a program called “Expensive Planetarium”. It drew a realistic starfield with all of the stars as seen from Earth down to magnitude 5.5. The code was quickly added to Spacewar, where the starfield slowly drifts across the screen, a 24 hour day passing in about an hour.

With the basic game there was no impetus to do anything, you could just sit in your corner and start blasting away. In order to get things flowing, Dan Edwards added a heavy star in the center of the screen that exerted a realistic force on the ships. Now if you did nothing you would be drawn into the star and destroyed. This made the game much more dynamic, you had to start moving to stay alive, and at high speeds it could be hard to avoid running into the star. At the same time you had to predict your motion based not only on your own moves, but the effects of the gravity as well. More than any other feature, this is the one made the game fun.

The force of the star was relatively high compared to your engines, so when the game starts players often fired their engines radially just enough to avoid hitting the star (limited fuel remember). This left them whipping around the star while attempting to draw a bead on the opposing player. Since both players did this the resulting paths of the ships on the screen formed an eye-like shape that was dubbed “the CBS opening”. Torpedoes were not effected by the gravity, there simply wasn’t enough CPU speed in the machine to do all the calculations needed, but this led to many interesting strategies.

That’s the basic version that was released in April 1962: two ships controlled by the console switches, the central sun with it’s flashing rays and strong gravity, a complete starmap in the background, and the basic “three strikes” hyperspace option.

The game was public. That meant the paper tape was sitting in the box of tapes inside the machine. It wasn’t long before all sorts of new additions were being added at MIT. Meanwhile DEC started shipping it inside the memory of their machines. At the time computers didn’t lose their memory when they were turned off, so you could tell if your shiny new computer was working right if it started playing Spacewar when you plugged it in.

And that let Spacewar loose on the world when DEC machines became a huge force in the 60’s. Additions at other sites came in fast and furious. These versions were typically named after the university where they were created, so the world ended up with “Utah Spacewar” and so on.

Some of these additions include:

  • more complex hyperspace that slowly increased the chance of exploding
  • running score keeping
  • setting the amount of fuel or torpedoes
  • whether “glancing” shots did only partial damage
    (I liked this one, you could shoot off an engine for instance)
  • how many shots could be on the screen at once
  • a cloaking device that made the ship invisible
    (but you could still see shots and the flame of the engine)
  • whether the sun was visible or was a black hole
  • whether or not the sun killed you if you hit it
  • the addition of space mines near the sun to make it more dangerous

At first these had to be completely different programs, because of the limited memory available. But as the computers grew in power, new versions of the game evolved that allowed the players to select the options from various lists.

When terminals started appearing in the late 1960’s, it was no longer necessary to use the console as a common input device. Although machines still tended to have only one graphical display (which was uncommon enough on its own), by having each player sit in front of the single display with their own keyboard, you could handle as many players as you could fit into the room.

Some people tried their hand at character based versions of the game, and DECUS distributed one for a while. As you might expect they were pale imitations. Of course when raster type displays started to become common a version of Spacewar quickly followed. There are plenty of versions for Mac’s and PC’s (some are listed below), and one of the more common ones came from the X-Windows world.

Notes

Spacewar is the first computer video game in history, but it’s not the very first video game. As far as I can tell it’s predated only by Willy Higinbotham’s “Tennis for Two” game in October 1958, which was played on an oscilloscope at Brookhaven National Laboratory. If you don’t recognize the name, Willy held an astonishing number of patents in the electronics industry. The Dot Eaters has a great page on the details for his Tennis for Two.

Another early game was a “golf” game from the UK that I don’t know much about. I don’t believe it predates Spacewar, but when I asked the staff of the London Science Museum where it now resides, I got answers back about Pong.

Links

Michael Stern has an excellent page on Spacewar, Sternlandia’s Spacewar Page. It has a number of historical articles and other information. One file in particular is a definite read, it’s a history of Spacewar written by one of its founders, Martin Graetz (scanned in by Eric Fischer). Michael’s also written a Mac version of the game.

In 1972 Stewart Brand, a Rolling Stone reporter and founder of the Whole Earth Catalog, wrote a seminal article on how computing was coming to the masses. One portion of the article was on Spacewar (now at Stanford, where Russell had moved by this time) and he funded the “First Intergalactic Spacewar Olympics”. This article is another must-read, he talks about video games, GUI’s and the internet way back in 1972.

Galaxy Game was pretty much unknown until Geo Wiederhold, a professor at Stanford, started a web page about their computer collection. On his pages are this article written by the game’s author, and here’s some pictures of the machines.

For information on the Nutting game, check out KLOV’s page on Computer Space, and they also have the original promotional flier. A picture of the funky cases can be found at Videotopia, and there’s some good pictures here too.

KLOV also has pages for the Cinematronics Space Wars version, and the Atari version, Orbit. There’s another good page on these versions here.

Some interesting history about the Cinematronics arcade version of Space War and the Cinematronics/Vectorbeam story in general can be found at Dagum Game’s Giant List of Classic Videogame Programmers. There’s a more complete history at Spies.

Want to try the original? Here it is in the form of a Java app you can run from your browser! This is a hand-typed recreation of the original printed source, typed into a compiler and running on a PDP-1 emulator.

There’s all sorts of versions out there:

Here’s another online version, but with updated graphics and such (but personally I find it kinda ugly).
A PC port of the Cinematronics version can be found here.
Here’s a Linux version.
Another Windows version of the game, but it seems to be way too fast.
There’s even a PlayStation version.
And just for fun, a version for the TI-85 graphing calculator!

Thanks to

Michael Stern for a lot of helpful info, the excellent Sternlandia web site, and a Mac version of the game. The picture of the original game above appears in an article on his site. It’s scanned in from Creative Computing – if you look close you can see the words on the back side of the page.

Notes on Galaxy Game and the pictures are thanks to Gio Wiederhold, who took the time to post this much needed information.

Pictures of Computer Space and Space Wars courtesy KLOV.
Vectrx picture from Spike’s Big Vectrex Page
Picture of the PDP-1 courtesy the ACM.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s