This site contains over 80 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.
Memory maps
-----------
- BBC Micro cassette memory map - Memory usage in the classic version of Elite, where space is really tight
- BBC Micro disc memory map - Memory usage in the enhanced disc version
- 6502 Second Processor memory map - Memory usage in the colour version of Elite
- BBC Master memory map - Memory usage in the smoothest version of Elite
- Acorn Electron memory map - Memory usage in the smallest and most basic version of Elite
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
The split-screen mode
---------------------
- The split-screen mode - Elite's famous split-screen mode, dissected and explained in detail
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?
- 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
- 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
- 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
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
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 and text
-----------------------
- Drawing monochrome pixels in mode 4 - Poking screen memory to display monochrome pixels in the space view
- Drawing colour pixels in mode 5 - Poking screen memory to display colour pixels in the dashboard view
- Drawing pixels in the Electron version - Poking pixels into screen memory in the Acorn Electron version of Elite
- Extended screen coordinates - The extended 16-bit screen coordinate system behind the space view
- Drawing text - How Elite draws text on-screen by poking character bitmaps directly into screen memory
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 ships
-------------
- Drawing ships - The main routine for drawing 3D wiremesh 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
- Backporting the flicker-free algorithm - Applying the BBC Master's flicker-free ship-drawing algorithm to the other versions
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
- 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
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
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
- Extended system descriptions - The famous "goat soup" algorithm that generates those strange and wonderful system descriptions
- Printing decimal numbers - How to print big decimal numbers with decimal points and padding
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
- 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
6502 Second Processor Elite
---------------------------
- 6502 Second Processor Tube communication - How the 6502 Second Processor version of Elite talks over the Tube
- The 6502 Second Processor demo mode - All about the Star Wars-esque scroll text in the Tube-based version of Elite
- The TINA hook - Adding your own custom code to the 6502 Second Processor version using TINA
- Secrets of the Executive version - Infinite jumps, retro-futuristic fonts, speech support... and Pizzasoft?
Elite-A
-------
- Making room for the modifications - How Angus Duggan found enough spare memory for Elite-A's modifications
- Buying and flying ships in Elite-A - What it's like to save up for and fly your dream ship in Elite-A
- Ship blueprints in Elite-A - The enhanced logic behind Elite-A's sophisticated ship blueprints system
- The Encyclopedia Galactica - Inside the encyclopedia, Elite-A's most recognisable modification
- The I.F.F. system - Friend or foe? Adding ship information to the 3D scanner
- Fixing ship positions - Why Elite spawns certain ships in certain places, and how Elite-A fixes this
- Special cargo missions - Procedurally generating delivery missions and tracking progress
- Delta 14B joystick support - All the controls of Elite in one single handset - the future is here!
- Tube communication in Elite-A - How the 6502 Second Processor version of Elite-A talks over the Tube
- The original Elite-A source files - How the original Elite-A source was written, edited and compiled