The Mysterious Origins of an Uncrackable Video Game
By Chris Baraniuk
(originally published in September 22nd, 2019 - LINK)
With the digital equivalent of trowels and shovels, archaeologists are digging into the code of early video games to uncover long forgotten secrets that could have relevance today.
“You and your team of archaeologists have fallen into the ‘catacombs of the
zombies’.” A miserable situation, to be sure. But this was the
chilling trial that faced players of Entombed, an Atari 2600 game,
according to the instruction manual.
The catacombs were an unforgiving place. A downward-scrolling,
two-dimensional maze that players had to navigate expertly in order to evade the
“clammy, deadly grip” of their zombie foes. An archaeologist’s nightmare.
Released in 1982, Entombed was far from a best-seller and today it’s largely
forgotten. But recently, a computer scientist and a digital archaeologist
decided to pull apart the game’s source code to investigate how it was made.
There was always something intriguing about Entombed, recalls John Aycock at the
University of Calgary, in Alberta, Canada. And because it had fallen into
obscurity, it hadn’t been pulled apart and analyzed in depth before – one the
main reasons Aycock and his co-author Tara Copplestone at the University of
York, UK, were drawn to Entombed as a subject to study over the other 500 games
made for the Atari 2600 console.
The pair are among a growing number of “video game archaeologists” who are
unearthing long forgotten pieces of software and pulling them apart.
Inside they are finding clues to how the early days of video gaming came about,
but also secrets that can help modern programmers with some of the problems they
are facing today.
Like intrepid explorers of catacombs, Aycock and Copplestone sought curious
relics inside Entombed. But they got more than they bargained for: they
found a mystery bit of code they couldn’t explain. It seems the logic
behind it has been lost forever.
Into the labyrinth
Maze-navigating games were very common back in the late 1970s and early 1980s,
but the method used to generate a maze varied, depending on the programmer.
In the age of Atari, games had to be designed with incredible skill because the
computer systems that ran them were so limited.
Although the blocky, two dimensional mazes from Entombed might look simple by
the standards of today’s computer graphics, in 1982 you couldn’t just design a
set of mazes, store them in the game and later display them on-screen – there
wasn’t enough memory on the game cartridges for something like that. In
many cases, mazes were generated “procedurally” – in other words, the game
created them randomly on the fly, so players never actually traversed the same
maze twice.
But how do you do get a computer program to avoid churning out a useless maze
with too many walls, or an otherwise impenetrable floorplan?
Aycock understood the trickiness of the problem. He thought there was a
good chance he’d find some clever process at work in the depths of Entombed.
“It was a very deep rabbit hole,” he recalls.“ As I dug into this maze
algorithm, it became clear that this was something that seemed to be fairly
unique to this maze game.”
It turned out that the maze is generated in a sequence. The game needs to
decide, as it draws each new square of the maze, whether it should draw a wall
or a space for the game characters to move around in. Each square should
therefore be “wall” or “no wall” – “1” or “0” in computer bits The game’s
algorithm decides this automatically by analyzing a section of the maze.
It uses a five-square tile that looks a little like a Tetris piece.
This tile determines the nature of the next square in each row.
How? That’s the fascinating part. The fundamental logic that
determines the next square is locked in a table of possible values written into
the game’s code. Depending on the values of the five-square tile, the
table tells the game to deposit either wall, no wall or a random choice between
the two.
Lost origins
It seems straightforward, but the thing is, no-one can work out how the table
was made.
Aycock and Copplestone have tried retro-engineering the table. They looked
for patterns in the values to try and reveal how it was designed, but this was
to no avail. Whatever the programmer did, it was a stroke of mild genius.
Every time the game is played, a reliably navigable maze is pumped out.
Were the table’s values random or even slightly different, the maze would likely
fail to be drawn with a playable path through it. It just seems impossible
to explain.
The abnormality of the table was
just quite striking,” says Copplestone. She says this is an example of a
classic conundrum in archaeology.“ I think there’s this assumption that
when we find things, we know what they are – if we pull a spearhead out of the
ground, we know what it is,” she says. “[But] more often than not, we have no
idea what’s happening.”
For Aycock, the as-yet
unsolved mystery of the table lingers uncomfortably. “The struggle I have
as a scientist is, I think that there should be some logical way that this will
all make sense and there really doesn’t seem to be.” The best guess the
pair have is that the programmer behind the maze algorithm must have manually
fine-tuned the table values until the game worked as desired, but that still
doesn’t really explain the logic behind it.
During their research, Aycock and Copplestone were able to interview one of the
people involved in the game’s production, Steve Sidley.
He too remembered being confused by the table at the time. “I couldn’t
unscramble it,” he told the researchers. And he claimed it had been the
work of a programmer who developed it while not entirely sober: “He told me it
came upon him when he was drunk and whacked out of his brain.” (Ed.: Paul Allen Newell was contacted by Alex Barron of The New Yorker Radio Hour to help
set the record straight LINK). Aycock
tried to contact the programmer in question but got no response.
Maybe no-one ever really understood the logic of the algorithm. But there
it is, in a 1982 Atari game, posing a seemingly unanswerable question.
Digital dig
Andrew Reinhard, also at the University of York, writes about and practices
video game archaeology. He says Aycock and Copplestone’s work on Entombed
is another hint that there are many gems just waiting to be found in old games
and old software, generally.
“I have a feeling that what has happened in Entombed has happened more
frequently than not, it’s just we haven’t learned what games have this stuff,”
he says.
The idea that archaeologists would be intrigued by video games from just a few
decades ago may sound strange to some. We’re rather more used to seeing
avid excavators dust off beautiful vases buried in mud for millennia, or similar
treasures. But Reinhard points out that video games have become a major
commercial enterprise and an important part of our culture. Game artifacts
store up their own record of human history.
Digital archaeologists can dig for clues about the evolution of programming,
unravel the workings of old technology and gain insights to the fading culture
of the 20th Century – by excavating video games. Another programmer, Alexei
Pepers, at Improbable Canada, even refers to retro games as archaeology “sites”. She says it was heartening to hear
that some early 1980s programmer may have inexplicably tweaked their code just
to get Entombed running – that sort of trial-and-error fiddling is a well-known
process in programming. “I found that so relatable, certainly in my own
work,” says Pepers.
And uncovering the methods by which early game programmers overcame the
technical constraints of the systems they worked with is not just academically
interesting. It has relevance today.
Take the programming of virtual reality games and experiences, for example.
You couldn’t imagine something more visually different from a two-dimensional
Atari maze game. But the demands on the programmer are similar in nature.
“You’re very constrained technically because [a VR game] has to run at very high
frame rates,” explains Pepers. “And you’re constrained in how the player
can move and what they can do.”
By researching tricks and work-arounds from a former era, perhaps 21st Century
programmers, pushing today’s technology to its limits, might learn something
genuinely useful.
With Entombed, Aycock believes the maze algorithm they uncovered is a good
example of how creative game programmers can get.
“From a modern perspective, I think it's also an interesting case study looking
at how to solve a problem in extremely constrained time and (memory) space," he
adds.
Buried treasure
It is not just code that digital archaeologists comb through. In 1983,
Atari buried 700,000 cartridges of video games at a landfill site in Alamogordo,
New Mexico. It was a historic event in video game history – widely rumored
and discredited by some as an urban myth.
The titles the firm chose to bury had been widely panned and were proving
impossible to sell. One, E.T. - the Extra-Terrestrial, has been
lampooned as the worst video game ever.
For more than three decades, the cartridges lay there, degrading. But in
2014, Andrew Reinhard and colleagues went on a dig at the site. The burial
was not, in fact, an urban myth – Reinhard dug up 1,300 cartridges.
Hundreds of the ET games were sold on Ebay, for a total of about $108,000
(£83,500). While none of the games initially seemed to be playable, one
gamer bought a copy of Asteroids and, by cleaning up
and reconnecting some of the electronics, was able to get it working again.
It may only have taken a few more decades in the New Mexico dust to make the
cartridge completely unsalvageable. There’s a challenge, then, awaiting
archaeologists who treat electronics as artifacts in the near future: time may
be rapidly running out.
Video game archaeology is possibly quite urgent, in fact, because the actual
physical form of mass-produced games is ephemeral. And the logic and
know-how that went into programming those games can so easily be lost.
That’s partly why computer archiving projects seek to store the digital form of
old games, in an effort to preserve them long term.
But the preservation of video games is only the first step. The mystery
maze table in Entombed reminds us that, even with a good record, fully
understanding a game is another thing entirely. Maybe we’ll never quite
grasp it. Entombed presents us – somewhat ironically – with a dead-end.
The instruction manual, to be fair, did warn us. “Before you know it,” it
read, “you’ll be entombed!”
An interview with U.S. Games programmer Paul Allen Newell can be found HERE.
Related materials:
"An Archaeological Examination of an Atari 2600 Game" by John Aycock and Tara Copplestone (LINK).
"Unearthing Entombed" podcast by Alex Barron of The New Yorker Radio Hour (LINK).
"Still Entombed After All These Years: The Continuing Twists and Turns of a Maze Game" by Paul Allen Newell, John Aycock, and Katie M. Biittner (LINK).