News: 1637144113

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

In the '80s, spaceflight sim Elite was nothing short of magic. The annotated source code shows how it was done

(2021/11/17)


Just a fortnight under 40 years ago, [1]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 [2]released a few years ago, but your correspondent just discovered a lavishly described and documented [3]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 [4]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 [5]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.

[6]

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' [7]original 2 48 , or 281,474,976,710,656, planets.

[8]Sir Clive Sinclair inspired me and 'whole load of others' at Arm, says CEO Simon Segars

[9]Chiptune to brighten your afternoon: Winning 8-bit throwback music revealed

[10]Elite name on Brit scene sponsors retro video games preservation project at the Centre for Computing History

[11]Rebel Galaxy Outlaw : Well, lookie here! For once a space game that doesn't promise the universe

[12]UK's National Museum of Computing asks tunesmiths to recreate bleeps, bloops, and parps of retro game music

The answer was that the game [13]generated the list of galaxies and planets on the fly, using a [14]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 [15]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 [16]Elite Wiki and then study the source code to see how [17]David Braben and Ian Bell achieved it.

[18]

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 . ®

Get our [19]Tech Resources



[1] https://www.theregister.com/2011/11/30/bbc_micro_model_b_30th_anniversary/

[2] http://www.iancgbell.clara.net/elite/index.htm

[3] https://www.bbcelite.com/

[4] https://www.bbcelite.com/deep_dives/bresenhams_line_algorithm.html

[5] https://www.bbcelite.com/deep_dives/the_split-screen_mode.html

[6] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2YZTg1jV2JxdjgzD24tqxSwAAAEs&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[7] https://www.theguardian.com/books/2003/oct/18/features.weekend

[8] https://www.theregister.com/2021/10/20/arm_ceo_sinclair/

[9] https://www.theregister.com/2021/10/07/8_bit_awesome/

[10] https://www.theregister.com/2020/07/31/frontier_games_preservation_sponsorhip/

[11] https://www.theregister.com/2019/08/30/rebel_galaxy_outlaw_space_game_for_once_doesnt_promise_the_universe/

[12] https://www.theregister.com/2021/07/27/tnmoc_music/

[13] https://www.bbcelite.com/deep_dives/twisting_the_system_seeds.html

[14] https://www.bbcelite.com/deep_dives/generating_random_numbers.html

[15] https://www.theregister.com/2012/10/16/mike_singleton_dies/

[16] http://wiki.alioth.net/index.php/Main_Page

[17] https://www.theregister.com/2013/10/10/elite_dangerous_to_support_oculus_rift/

[18] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YZTg1jV2JxdjgzD24tqxSwAAAEs&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[19] https://whitepapers.theregister.com/



Hans Neeson-Bumpsadese

Francis Spufford's excellent book "Backroom Boys - The secret return of the British boffin" (which I bough after seeing it recommended by another commentard on an El Reg story about RAF Spadeadam) dedicates a chapter to Elite. Well worth a read.

Definitely never ever sat up...

Anonymous Coward

...all night with a debugger removing the profit protection. Actually I was making coffee for the guys doing the work, but I was there, man, I was there!

Non trivial hack to say the least.

End result was a floppy copy which didn't need a manual.

fun times.

AC cos, well you know... that sort of activity is frowned upon by people...

Right on Commander!

A Non e-mouse

See icon --->

Horrible memories

Paul Smith

That code brings back horrible memories, not of Elite which I loved, but of a job I had in the 80's in Nuneaton programming a stock management system on a Wang CS mini-computer using interpretive basic with two character variables. Oh I was glad when I got out of there.

281,474,976,710,656 planets?

Anonymous Coward

Is that all?

*Explodes in sarcasm*

Re: 281,474,976,710,656 planets?

wolfetone

Are any of them flat though?

Anonymous Coward

Read somewhere that they had to scrap a whole galaxy because there was a planet called "Arse"!

Love Elite, felt like you had your own spaceship and could do anything you wanted. You weren't in some space navy fighting off aliens for example.

Now looking back, it does look rather simple. All the star systems look the same and you did the same thing when you arrived there, but it was fun!

Good news is just life's way of keeping you off balance.