Spacewar! 4.4

Spacewar! 4.4 (May 1963) ·
Main (Player 2) Secondary (Player 1)
Controls: WASD — Left: A, Right: D, Thrust: S, Fire: W
Hyperspace: Left + Right or Q
Alternate Fire (avoids keyboard ghosting): 4
Controls: IJKL (or num-pad 8 4 5 6) — Left: J, Right: L, Thrust: K, Fire: I
Hyperspace: Left + Right or U
Alternate Fire (avoids keyboard ghosting): 0 (zero)
Note on scores: To exit the score display, both players press FIRE simultaneously.
To clear the scores, uncheck the scores-checkbox before leaving the score display.

This is a virtual DEC PDP-1 emulated in HTML5/JavaScript running the code of "Spacewar! 4.4", the earliest known attempt at a multiplayer first-person shooter. (Even if the perspective is not pseudo-3D, the game still provides individual perspectives relative to the players as it would be seen on an onboard radar screen.)

Spacewar! 4.4 is a somewhat arcane version of Spacewar!, the earliest know digital video game. While the original source doesn't provide a flawless game, the program can be fixed with just a few modifications. The game was intended to display the game in two distinctive Ptolemaic ego views (relative to a player's spaceship) on two separate displays that were connected to the same machine.
See below for credits and a more detailed description.

The original Spacewar! was conceived in 1961 by Martin Graetz, Stephen Russell, and Wayne Wiitanen. It was first realized on the PDP-1 in 1962 by Stephen Russell, Peter Samson, Dan Edwards, and Martin Graetz, together with Alan Kotok, Steve Piner, and Robert A Saunders. – Spacewar! is in the public domain, but this credit paragraph must accompany all distributed versions of the program.

Emulation, assembly, and fixes by Norbert Landsteiner, www.masswerk.at, 2015.
The emulator is based on emulation code by Barry Silverman, Brian Silverman, and Vadim Gerasimov. The emulation code was extended to support additional instructions and some auxilary hardware. This page features a special dual display version, adopted to run Spacewar! 4.4.

Usage

Visit the "Sense Switches / Setup" dialog to select a national or non-standard keyboard layout.
Some keyboards may not read all keys at once, please resort to the alternate fire keys ("4" and "0") in this case.
You may disable the original LEFT+RIGHT hyperspace action in favor for using single-key commands in the options menu, see below.

Additional options are availble by the options menu options menu icon floating at the top right of the screen.

Touch-Controls: Special controls featuring arcade-style buttons are displayed for touch-enabled devices (use landscape orientation; drag the controls by their ship icons to move them to a convenient screen location).

Gamepads/Joysticks: The game was originally played using custom "control boxes." Some browsers (as of writing this Chrome and Firefox only) support gamepads for input. This is still quite experimental technology, support may depend on the make of the OS, the browser, and the specific pad. Switching a pad to "direct mode" may help. Some pads require to have a connection button pressed, when plugged in. For a close to original experience use one of the analog sticks for turn (left/right) and the other for thrust (down) and hyperspace (up). Digital sticks are supported as well. Any major button should work for fire. Left shoulder buttons are hyperspace, right shoulder is fire. Hit the tab-key of the keyboard to swap the assignment of pads and ships.

Screenshots: A combined screenshot of the two screens may be exported by the key combination alt/option + P.

Hint on Gameplay: Do not fight gravity, use it as a friend.
For a convenient opening, turn your ship orthogonally to the direction to the gravitational star and thrust for about 3 seconds or longer to enter an orbit.

Spacewar 4.4, a planar multiplayer FPS for the PDP-1 (montage)

Spacewar! 4.4 for the PDP-1, May 1963, the first multiplayer game to feature subjective views.
Montage and screen-shots: Norbert Landsteiner, 2015; PDP-1 images via CHM;
Reconstructed control boxes by Tom Tilley, 2015.

Notes & Descriptions

Important Update: Some years after the writing this, Monty Preonas, the main author of this very special version of Spacewar, provided further insight into this program and how it came to be. Notably, Monty Preonas here refers to the game as "version 4.3", while the assorted listings, this reconstruction is based on, has an intermediate version dubbed "4.3", which optionally displayed a single ship at a subjective, central perspective on the a single screen, and the more elaborate version "4.4", as the game is here referred to in this very context. Anyway, here's Monty Preonas' description:

Version 4.3 was developed when for about a period of 3 or 4 months a new oscilloscope compatible with the PDP-1 was available in the computer lab. At first, we used this scope as the second pilots console so combatants weren't bumping into each other even though they had separate hand-held consoles. Then I decided to start Version 4.3 to provide a pilots view from each cockpit. This was accomplished by having every other frame go to the opposing console so that both the "thin" and "fat" pilot"s ships were stationary in the center of the frame. It worked very well, except we wound up with a double "twin" star because of the every other frame issue. We ran out of time and had too much fun learning how to play this more difficult version to correct the twin-star problem before we no longer had access to the oscilloscope.

The annotated listing of this game was eventually donated to the New Mexico Museum of Natural History & Science in Albuquerque and nothing more is known about this. But it is important to note that this was, apart from the rather cosmetic "twin star" problem (see below), a fully functional game.

Therefore, the listing referred to here reflects rather a work in progress, which sadly lacks any of those annotations. Having said that, here's the unaltered description, as of when this reconstruction had been made.

***

The code of Spacewar! 4.4 is found in a collection of assorted listings, available at bitsavers.org, at the Computer History Museum's web site, or at archive.org.

The program listing is signed "5/17/63 ddp" (part 1, same as version 4.3) and "5/21/63 ddp" (part 2) by Monty Preonas (Diamantis Drakos Preonas) and has probably been edited by Joe Morris contemporarily, as can be inferred from this note apparently describing the assorted listings:

Late-breaking news: I found the listing binder in my office. The versions I've got are: (...) 4.4, dated 5/17/63 which still shows Monte's[sic] initials (ddp) but which vague memory says wasn't his update. It may have been my hack, but I hadn't yet learned the tao of marking changed lines in programs 8-( (Joe Morris, alt.sys.pdp10, Jannuary 6, 2005)

Spacewar! 4.4 is still the classic MIT Spacewar! by Steve Russell et al. But recently, on 17 May 1963, Monty Preonas — who had updated Spacewar! 4.0 for the upgraded multiply/divide option of MIT's PDP-1 in Jannuary 1963 — had added a Ptolemaic ego view to version 4.3 as an experimental option that would display the game in a special view relative to the first spaceship. While this option did have some issues (see the discussion here), Spacewar 4.4 iterates this to a new dimension: Not only is the ego perspective now the only mode of the game, alternating between the views of the both spaceships respectively, the game also switches display modes between frames.

What might seem like a not so useful superposition of these two views on a single display, proves to be a small sensation at closer inspection. Technically, the display instructions are switched each frame to display any dots at either the default intensity (brightness) of 0 (zero) or alternatingly at an intensity of 4. The PDP-1's Type 30 Visual CRT Display featured a range of 8 intensities (3, 2, 1, 0, 7, 6, 5, 4, or read as 3-bit 1's complement, +3, +2, +1, 0, -0, -1, -2, -3), where, according to DEC documentation, the dimmest intensity of 4 (or -3) wouldn't be visible to the human eye but to a photomultiplier only.

While this would render the frames displayed at the minimum intensity invisible and the whole endeavor quite questionable, intensity 4 also enjoyed another use, a use-case that draws the whole affair in yet a different light. There was an optional high-density display, the Ultra Precision CRT Display Type 31, rendering at 4096 x 4096 plotting positions and a raster size of 3 x 3 inches square, to be used for photographic recordings. If this display was connected to the PDP-1, a display command at intensity 4 became the new instruction "dpp" addressing this optional display. We may assume that this would have worked with any other compatible display (like a second Type 30) as long as this was a full display and not just an auxiliary slave display.

By this, the game may be now understood as displaying alternate frames on two individual displays connected to the PDP-1. The long sustain of the dual P7 phosphor used by this kind of displays would have helped to stabilize the image, even as the actual frame rate of any of the two displays would have dropped by 50%.
And — *fanfare* — what we are looking at is world's first attempt to create a multiplayer first-person shooter:
Each of the displays renders a view relative to the respective spaceship's location as if it were seen on a radar screen in the cockpit of the ship. — And, as the circular tubes of the DEC displays were originally designed for the use with scan radar PPI displays, it won't become more realistic than that.
(Therefor we may want to call this a "Radar-FPS", a "PPI-FPS", or, more generally, a "Planar FPS", because there is no perspective involved. — Spacewar! 4.4 is here a bit in a category of its own. Alternatively, since the scene happens to play in space, we could call this a "relative view-point Ptolemaic multiplayer game".)

"Attempt", because the program, while fixing most of the issues of the experimental ego view found in version 4.3, has a few issues of its own:

While Spacewar! 4.4 is not a perfectly playable game as-is, the issues are easily overcome and fixed as soon as the causes have been identified. There are still 3 completely unknown versions of Spacewar!, namely 4.5, 4.6, and 4.7, thus it is perfectly plausible that there had been eventually an issue-free version. (While at least one of these versions was presumably featuring dual speed/velocity controls, as may be inferred from a left-over comment in version 4.8, there are still two possible candidates.)

However, Spacewar! 4.4 illustrates well that there are still some discoveries to be made, in computer history, in the history of software, and in the history of video games. By its interactive realtime presentation of distinctive player perspectives to multiple users Spacewar! 4.4 predates any other known examples of the genre by 10 years.

Program Versions

The program is presented in three versions:

Emulation Notes

The score displays is shown in the emulation partly dimmed. This is specific to the emulation, due to there not being a perfect loop-point for the emulator to optimze frames on. BTW: Scores are shown optionally between games, activate them by the checkbox on the top of this page. (The checkbox is a shortcut to a specific setting of the test word switches.)

The option "Optimize Displays" updates the two emulated screens selectively at individual frames as needed (instead of simultaneously), thus providing a more stable visual impression in a frame-based emulation. (Since the decay of the phosphor was an analog process, the flicker perceived without this option wouldn't have been an issue with the real thing.) This option also helps reducing load on the process that handles the emulation of the P7 phosphor.

The standard (low) resolution of the emulated displays is the same as the visual resolution of the Type 30 CRT, while the high-resolution conforms with its technical resolution of 1024 x 1024 display locations. (Since dot sizes varied with intensities and overlapped adjacent display locations, we cannot speak of "pixels" in this context.)

Sources

The transcribed source code of the original program Spacewar! 4.4 is available here, as is the code of the fixed version, Spacewar! 4.4f.

Please refer to the main page on Spacewar! for further information on the standard game.

For an in-depth description of the program (code analysis) and a discussion of the term "planar FPS" see here.

Related Links

PDP-1 Sense Switches

The PDP-1's control console provided an array of switches, the “sense switches”, which were used to control some of the game's behavior (“off” = default settings):

(unknown)

(unknown)

(unknown)

(unknown)

(unknown)

(unknown)

Emulation:

(On: display each frame, Off: double frames, no flicker)