This site contains over 50 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
-----------
- The Elite memory map (cassette version) - A map of memory usage, details of unused memory locations, and notes on BBC Micro and Acorn Atom label names
- The Elite memory map (disc version) - Memory usage in the enhanced disc version
- The Elite memory map (6502 Second Processor version) - Memory usage in the colour 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
Drawing pixels and text
-----------------------
- The split-screen mode - Elite's famous split-screen mode, dissected and explained in detail
- 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
- 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
-------------
- 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
- 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
Drawing circles
---------------
- 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 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 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...
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
- The local bubble of universe - The data structures used to simulate the universe around our ship
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
Flight
------
- 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
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
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
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
- 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
Utility routines
----------------
- 6502 Second Processor Tube communication - How the 6502 Second Processor version of Elite talks over the Tube
- The key logger - Supporting concurrent in-flight key presses using a key logger