The Insightful Troll

Rants and ruminations.

World Building in 128 Bytes

| Comments

Pitfall was one of the most sophisticated games released for the Atari 2600. While it may seem a simplistic game in 2021 - in 1983 on a machine with 128 bytes of RAM and 4096 bytes of ROM - it was an amazing feat of engineering. Just how was David Crane able to do it in such a constrained environment?

The way you make a large world without storing much data is by having some code generate it for you.

The biggest problem with this, however, is that you generally need to save the data you generated. This is what games such as Rogue and Minecraft do. They randomly generate worlds in order to give variety to players, but save the data once it's generated. The limitations of the Atari do not afford this luxury.

Crane overcame this in two ways. The first was in the way he represented a room's layout in memory, and the second was the way in which he generated those representations. The way these representations are generated actually obviate the need to store anything but the current room in memory, but we'll get to that later. First we will look at how the current room is represented.

[...]

Crane used a single byte to represent the layout of the current room. That may seem incredible given all that's going on in any given room, but it's actually quite simple.

A single byte of memory. Read the details here.

Comments