Tech

Annotated online source code shows how Elite worked


Just a fortnight under 40 years ago, the BBC Micro was released. Although it was never primarily a games machine – it was too expensive, for a start – nonetheless one of its defining programs was a video game: Elite.

Its source was released a few years ago, but your correspondent just discovered a lavishly described and documented online version if you want to see exactly how it was done.

Elite was famous for several things, including its very considerable difficulty and amazing – for 1984 – wireframe 3D graphics with hidden-line removal. This was displayed on a screen which combined high-resolution and multi-colour graphics in a way the BBC’s hardware couldn’t natively do: the game changed screen modes from Mode 4 (medium-resolution monochrome) to Mode 5 (low-resolution four-colour) two-thirds of the way though generating each screen. At 50Hz, on a 2MHz 6502.

Some of the remarkable features were not so obvious, though. For instance, the game contained eight galaxies with 256 planets. A database of 2,048 star systems would have filled the computer’s tiny 22kB of memory. (22kB? Yes: modes 4 and 5 both take up 10kB of the Beeb’s puny 32kB of RAM.) This would have been far more obvious with the programmers’ original 248, or 281,474,976,710,656, planets.

The answer was that the game generated the list of galaxies and planets on the fly, using a modified Fibonacci sequence, allowing for more places to explore than would fit into the program. A similar method was used to generate the 4,000 unique locations in Mike Singleton’s Lords of Midnight, released the same year.

The difference being that unlike Singleton’s ZX Spectrum game, you can read about what Elite did on the Elite Wiki and then study the source code to see how David Braben and Ian Bell achieved it.

The site covers the original cassette and floppy-disc versions, as well as those for the Electron, BBC Master, 6502 Second Processor, unreleased versions and even the third-party enhancement Elite-A. ®



Source link

Back to top button