miuradio
How It SpawnsThe tricks inside famous games, shown running.›

How It Spawns

How did Elite fit 2,048 planets into 32 kilobytes? It never wrote one down.

Story

Elite (Acornsoft, BBC Micro, 1984) has eight galaxies of 256 star systems, each with a name, a place, a government and an economy. Written out, the names and numbers alone come to about 25 kilobytes, and with a line of description each about 160: five times the 32 KB of the bigger BBC Micro. That's our own count, from Ian Bell's code.

So the game keeps six bytes. In Ian Bell's own C version of the original 6502 code, the seed is a "six byte random number used as seed for planets": three 16-bit numbers. A planet is read straight off them (a byte for its place across, a byte for up, three bits of government, three of economy), then the numbers are stirred: the three are added, the sum goes on the end, the first drops off, and five bits pick two letters of the name. Four stirs, the next planet. Lave, where every pilot starts, is LA and VE. Roll every byte one bit and you get the next galaxy; the eighth roll brings you back to galaxy one. Bell's code: the "original game generated from scratch each time info needed."

Six bytes could start 281 trillion galaxies (2 to the 48th, our arithmetic). David Braben told Edge: "Ridiculous numbers of galaxies." Elite kept eight. Galaxy generation was Braben's part, per Ian Bell's own FAQ, and Braben told The Next Web in 2012 about "beauty-parades of galaxies and throwing away the ones that didn't look right or were a bit lopsided, or had evolved with rude planet names."

Our boards, planets and memory card are built in code from Bell's routines; the lopsided galaxy is another seed from our own run.

Which old game's tiny trick should we cut open next?

Sources: Ian Bell, Text Elite 1.5 (txtelite.c, his C version of the 6502 algorithms) and his Elite FAQ. David Braben, interview, The Next Web, 2012. "The making of Elite", Edge, reprinted in Electron User Group. Elite manual, Acornsoft, 1984. Acorn, BBC Microcomputer brochure.
Unofficial. Not affiliated with or endorsed by Frontier Developments, David Braben or Ian Bell.
Sounds and music: our own, made in code.

Follow

TikTok@howitspawns›Instagram@howitspawns›YouTube@howitspawns›X@howitspawns›
Link copied