Today I Learned - Rocky Kev

TIL how Atari's Pitfall generates over 255 unique rooms

POSTED ON:

TAGS:

Games for the Atari 2600 were quite constrained.

It was quite an innovation to have multiple rooms, and the fact that Adventure managed to have 30 was revolutionary. But Pitfall!, made by David Crane and released in 1983, had 255, all of which were much more elaborate (graphically speaking) than anything in Adventure. In this article we'll talk about how this was done.

The console itself had only 128 bytes of RAM. That's 1024 bits. For comparison, this sentence alone takes up more space if encoded in ASCII, let alone the UTF format in which it’s actually encoded*. Suffice it to say there was not much space on the Atari.

How it was done was by allowing code to generate the room, rather than mapping the room out and saving the data.

A room layout was broken into 4 parts:

  1. Objects (bits 0, 1, 2)
  2. Pit Type (bits 3, 4, 5)
  3. Trees (bit 6, 7)
  4. Underground wall (bit 7)

It then uses maths to shift the bits around (LFSR), so the rooms are connected when you go back and forth, and yet still feels different.

Absolutely elegant feat!

REF:
https://evoniuk.github.io/posts/pitfall.html


Related TILs

Tagged:

TIL Korok seed puzzle pattern

Why I love this is that the designers thought up a few puzzle categories, and sprinkled the open world with these. It creates a very effective piece of optional game play.

TIL Morrowind would reboot the XBox if it ran out of memory and hide it behind a loading screen

One of my favorite tricks for Morrowind is that if you are running out of memory [on Xbox], you can reboot the Xbox without the user knowing. So if you had a really long loading time, that was us rebooting the Xbox.

TIL about AutoHotKey

When you're getting annoyed at running the same commands over and over again.