This site contains over 100 deep dive articles that explain how Elite weaves its magic. If you want to learn how Elite works under the hood, then this is the place for you.
See the quick start guide for some recommended starting points, or check out the following index of all the deep dive articles and jump straight in. The articles are presented in an order that makes sense for those wanting to unravel the inner workings of Elite, so if you're wondering where to start, I recommend simply working your way down the list.
Most articles apply to all the 6502 versions of Elite, but where this isn't the case, the relevant versions are shown.
Memory maps
-----------
- BBC Micro cassette Elite memory map - Memory usage in the classic version of Elite, where space is really tight [Cassette]
- BBC Micro disc Elite memory map - Memory usage in the enhanced disc version [Disc, Elite-A]
- Acorn Electron Elite memory map - Memory usage in the smallest and most basic version of Elite [Electron]
- 6502 Second Processor Elite memory map - Memory usage in the colour version of Elite [6502SP]
- BBC Master Elite memory map - Memory usage in the smoothest version of Elite [Master]
- NES Elite memory map - Memory usage in the only console-based version of Elite [NES]
The main loop
-------------
- Program flow of the main game loop - The sequence of events in the main game loop and the main flight loop
- Scheduling tasks with the main loop counter - How the main loop counter controls what we do and when we do it
- Splitting the main loop in the NES version - How the main flight loop is split and shared with the combat demo [NES]
The split-screen mode
---------------------
- The split-screen mode in BBC Micro Elite - Elite's famous split-screen mode, dissected and explained in detail [Cassette, Disc, 6502SP, Master, Elite-A]
- The split-screen mode in NES Elite - How the NES version implements a split-screen mode without hardware timers [NES]
Simulating the local bubble
---------------------------
- The local bubble of universe - The data structures used to simulate the universe around our ship
- The elusive Cougar - Vanishingly rare... but just how rare is the mysterious Cougar? [6502SP, C64, Master, NES]
- The space station safe zone - Details of the calculations behind the space station safe zone
Ship data
---------
- Ship blueprints - Specifications for all the different types of ship in the universe
- Ship blueprints in the disc version - How the disc version loads its ship blueprints into memory [Disc]
- Ship data blocks - Storing data for each of the ships in the local bubble of universe
Simulating the universe
-----------------------
- Galaxy and system seeds - How system data is extracted from the galaxy and system seeds
- Generating system data - The algorithms behind the procedural generation of system data
- Generating system names - Producing system names from twisted seeds and two-letter tokens
- Twisting the system seeds - How the system seeds are twisted to produce entire galaxies of stars
- Market item prices and availability - The algorithms behind the generation of each system's cargo market
Moving and rotating in space
----------------------------
- Pitching and rolling - Applying our pitch and roll to another ship's orientation in space
- Pitching and rolling by a fixed angle - How other ships manage to pitch and roll in space
- Program flow of the ship-moving routine - A breakdown of the routine that moves the entire universe around us
- Rotating the universe - What happens to the rest of the universe when we rotate our ship?
- Orientation vectors - The three vectors that determine a ship's orientation in space
- Tidying orthonormal vectors - Making the orientation vectors orthonormal, and why this matters
Flying and flight controls
--------------------------
- Docking checks - The checks that determine whether we are docking... or just crashing
- The docking computer - How the docking computer steers us home in the enhanced versions of Elite [Disc, 6502SP, C64, Master, NES, Elite-A]
- Flipping axes between space views - Details of how the different space views are implemented
- The key logger - Supporting concurrent in-flight key presses using a key logger
- Bolting NES controllers onto the key logger - How the NES version simulates a joystick and keyboard [NES]
Tactics and combat
------------------
- Combat rank - The long, long road from Harmless to Elite
- In the crosshairs - How the game knows whether an enemy is being hit by our laser fire
- Program flow of the tactics routine - How ships and missiles work out attack patterns... or how to run away
- Advanced tactics with the NEWB flags - How the enhanced versions of Elite give their ships a bit more personality [Disc, 6502SP, C64, Master, NES, Elite-A]
The scanner and dashboard
-------------------------
- The 3D scanner - The maths behind Elite's famous 3D elliptical scanner
- The dashboard indicators - How the bar-based dashboard indicators display their data
Drawing pixels
--------------
- Drawing monochrome pixels in mode 4 - Poking screen memory to display monochrome pixels in the space view [Cassette, Disc, C64, Elite-A]
- Drawing colour pixels in mode 5 - Poking screen memory to display colour pixels in the dashboard view [6502SP, Master]
- Drawing pixels in the Electron version - Poking pixels into screen memory in the Acorn Electron version of Elite [Electron]
- Drawing pixels in the NES version - How the NES version pokes pixels into the console's tile-based screen [NES]
- Extended screen coordinates - The extended 16-bit screen coordinate system behind the space view
Drawing text
------------
- Drawing text - How Elite draws text on-screen by poking character bitmaps directly into screen memory [Cassette, Disc, Electron, 6502SP, C64, Master, Elite-A]
- Fonts in NES Elite - The three different fonts used in the Nintendo version of Elite [NES]
Drawing lines
-------------
- Bresenham's line algorithm - The main line-drawing algorithm used to draw non-horizontal lines
- Line-clipping - Efficiently clipping an extended line to the part that's on-screen
- Drawing lines in the NES version - Using tiles as stepping stones when drawing lines on the NES [NES]
Drawing ships
-------------
- Drawing ships - The main routine for drawing 3D wireframe ships in space
- Back-face culling - How Elite draws solid-looking 3D ships by only drawing visible faces
- Calculating vertex coordinates - Determining whether a ship's vertex is visible or hidden from us
- Flicker-free ship drawing - How the BBC Master version reduces the amount of flicker when drawing ships [Master]
- Backporting the flicker-free algorithm - Applying the BBC Master's flicker-free ship-drawing algorithm to the other versions [Cassette, Disc, Electron, 6502SP, C64, Elite-A]
Drawing circles and ellipses
----------------------------
- Drawing circles - The routines that draw planets and the hyperspace and docking tunnels
- The ball line heap - How we remember the lines used to draw circles so they can be redrawn [Cassette, Disc, Electron, 6502SP, C64, Master, Elite-A]
- Drawing ellipses - How Elite draws ellipses for the planet's crater, meridian and equator
Drawing planets
---------------
- Drawing craters - The algorithms behind the huge craters of planets like Diso
- Drawing meridians and equators - The algorithms behind the meridians and equators of planets like Lave
- Drawing Saturn on the loading screen - How the loader draws the dot-based Saturn in Elite's epic loading screen [Cassette, Disc, Electron, 6502SP, Master, Elite-A]
Drawing suns and explosions
---------------------------
- Drawing the sun - Drawing and storing the sun, and the systems on the Short-range Chart
- Drawing explosion clouds - Drawing and storing explosion clouds for ships whose luck runs out...
Stardust
--------
- Stardust in the front view - The algorithms behind the stardust particles in the front view
- Stardust in the side views - The algorithms behind the stardust particles in the side views
Missions
--------
- The Constrictor mission - Hunting high and low for the stolen Constrictor [Disc, 6502SP, C64, Master, NES, Elite-A]
- The Thargoid Plans mission - Evading the Thargoid threat in the depths of the third galaxy[Disc, 6502SP, C64, Master, NES, Elite-A]
- The Trumbles mission - Furry fun in the NES version of Elite [C64, NES]
Text
----
- Printing text tokens - Printing recursive text tokens, two-letter tokens and control codes
- Extended text tokens - The extended text token system in the enhanced versions of Elite [Disc, 6502SP, C64, Master, NES Elite-A]
- Extended system descriptions - The famous "goat soup" algorithm that generates those strange and wonderful system descriptions [Disc, 6502SP, C64, Master, NES Elite-A]
- Printing decimal numbers - How to print big decimal numbers with decimal points and padding
- Multi-language support in NES Elite - How the NES version supports English, German and French text [NES]
Maths
-----
- Adding sign-magnitude numbers - Doing basic arithmetic with sign-magnitude numbers
- Calculating square roots - The algorithm behind the square root routine
- Shift-and-add multiplication - The main algorithm behind Elite's many multiplication routines
- Multiplication and division using logarithms - Faster multiplication and division routines by using logarithm lookup tables [6502SP, C64, Master, NES]
- Shift-and-subtract division - The main algorithm behind Elite's many division routines
- The sine, cosine and arctan tables - The lookup tables used for the planet-drawing trigonometric functions
- Generating random numbers - The algorithm behind Elite's random number generation routines
Saving and loading
------------------
- Commander save files - A description of each and every byte in the saved commander file
- The competition code - All the information that's hidden in the Elite competition code [Cassette, Disc, Electron, 6502SP, C64]
6502 Second Processor Elite
---------------------------
- 6502 Second Processor Tube communication - How the 6502 Second Processor version of Elite talks over the Tube [6502SP]
- The 6502 Second Processor demo mode - All about the Star Wars-esque scroll text in the Tube-based version of Elite [6502SP]
- The TINA hook - Adding your own custom code to the 6502 Second Processor version using TINA [6502SP]
- Secrets of the Executive version - Infinite jumps, retro-futuristic fonts, speech support... and Pizzasoft? [6502SP]
NES Elite
---------
- Comparing NES Elite with the other versions - The features that make NES Elite so unique [NES]
- Understanding the NES for Elite - The NES architecture and how it applies to Elite [NES]
- Splitting NES Elite across multiple ROM banks - Details of the MMC1 controller and the 128K game ROM [NES]
- The pattern and nametable buffers - How the NES version achieves its beautifully smooth wireframe graphics [NES]
- Bitplanes in NES Elite - Squeezing two patterns into one tile using separate bitplanes [NES]
- Drawing vector graphics using NES tiles - The art of the impossible: vector graphics on the NES [NES]
- Views and view types in NES Elite - Configuring all the different views in the console version [NES]
- Image and data compression - How images and data are compressed in NES Elite [NES]
- Displaying two-layer images - The beautiful pixel art of the commander and system images [NES]
- Sprite usage in NES Elite - Stardust, scanners, images, crosshairs and more [NES]
- The NES combat demo - How the scroll text and combat practice works [NES]
- Auto-playing the combat demo - The magic of watching Elite playing itself [NES]
- Sound effects in NES Elite - The largest set of sound effects in all the 6502 Elites [NES]
- Music in NES Elite - How David Whittaker's music module plays The Blue Danube [NES]
Elite-A
-------
- Making room for the modifications in Elite-A - How Angus Duggan found enough spare memory for Elite-A's modifications [Elite-A]
- Buying and flying ships in Elite-A - What it's like to save up for and fly your dream ship in Elite-A [Elite-A]
- Ship blueprints in Elite-A - The enhanced logic behind Elite-A's sophisticated ship blueprints system [Elite-A]
- The Encyclopedia Galactica - Inside the encyclopedia, Elite-A's most recognisable modification [Elite-A]
- The I.F.F. system - Friend or foe? Adding ship information to the 3D scanner [Elite-A]
- Fixing ship positions - Why Elite spawns certain ships in certain places, and how Elite-A fixes this [Elite-A]
- Special cargo missions - Procedurally generating delivery missions and tracking progress [Elite-A]
- Delta 14B joystick support - All the controls of Elite in one single handset - the future is here! [Elite-A]
- Tube communication in Elite-A - How the 6502 Second Processor version of Elite-A talks over the Tube [Elite-A]
- The original Elite-A source files - How the original Elite-A source was written, edited and compiled [Elite-A]