The screenshot I presented yesterday was a visual representation of the galaxy map of the original Elite. I generated it myself from the game data.

The Classic Elite Galaxy.

So why wasn’t such a map actually available inside the game itself? Surely providing such a map would have been very helpful to the player.

The answer is because in order to draw such a map and make it interactive, you would have to have the entire dataset for the galaxy in memory at once, and Elite couldn’t do that.

The designers of Elite, Ian Bell and David Braben, had a problem. The machines they were designing Elite for had at most 16k of RAM. One of the premises of Elite was that you were exploring a large section of the galaxy, one 256×256 units in area. This galactic sector had 256 star systems in it. Each star system would have data for its own unique name, tech level, economic level, government type, population level, productivity level, price for each trade good, and even a couple lines of text describing the most interesting aspects of the system. Each star system required four 16-bit values for this data. Thus, storing the entire galactic map would have required 2048 bytes of data – 2k, or 1/8 the amount of total space usable by the game. And when you’ve also got ship data to store and a 3D engine to run that’s just not good enough.

But Bell and Braben didn’t need access to the entire galactic data set at once. They typically only needed the data for the current star system the player was visiting.

Realizing this allowed them to solve the problem through the use of procedurally generated content. They started with three sixteen-bit numbers, which could range from 0 to 65535. These were called seed0, seed1, and seed2, and the values for the original Elite galaxy were 23114, 584 and 46931. These were not generated but were stored in code.

They then created a function called “tweakseed” that would create new numbers based on the existing ones. This function would also push the existing values “up”, getting rid of the oldest one and putting the new one into seed2. Here’s the C version of tweakseed from Bell’s Text Elite sources:

void tweakseed(seedtype *s)
{
    uint16 temp;
    temp = ((*s).w0)+((*s).w1)+((*s).w2); /* 2 byte aritmetic */
    (*s).w0 = (*s).w1;
    (*s).w1 = (*s).w2;
    (*s).w2 = temp;
}

Thus, before the first run of tweakseed, the seeds would have their initial values:

seed1 == 23114
seed2 == 584
seed3 == 46931

Running tweakseed once would generate a new seed, 5093, and the values would then look like this:

seed1 == 584
seed2 == 46931
seed3 == 5093

Since these values were generated by a function, they were predictable. They were random but in a controlled fashion. The game would use four seed values for each planetary system; thus, if the game needed the data for star system 113, it could just run tweakseed 448 times and then use the next four seeds as its data. The data would always be the same; thus, star systems would stay put. “Jumping” to a new star system was simply a matter of clearing out the data for the previous star system and replacing it with the generated data for the star system the player was jumping to.

Thus, these three numbers and this one small function represented an entire galaxy inside Elite. And as as if that weren’t enough, it didn’t just represent one galaxy. By changing the three starting seeds you change the entire galaxy. Since the three starting seeds could range from 0 to 65535 each, this formula could generate 281,474,976,710,656 galaxies. And initially Bell and Braben were going to allow the user to input their own seeds so that each player could play in his own private galaxy. They were overridden by the publisher, who felt that it was a bad idea to emphasize the fact that the galaxies were random. So Bell and Braben chose eight seed sets to represent the eight galaxies of the classic Elite Universe.

Procedurally generated content is all the rage nowadays, but it’s a very old concept. (As is sandbox gameplay, something Elite also pioneered decades before Grand Theft Auto III.) The interesting thing is that nowadays we are looking to generated content for exactly the opposite reason Bell and Braben did. Bell and Braben used generated content in Elite because they didn’t have the space to store their entire dataset at once. We are looking to generated content because we’ve got so much storage space that we can’t possibly hand-create enough content to fill it.