This site will soon contain at least 50 deep dive articles that explain how The Sentinel weaves its magic (I am currently writing them - see below for details). If you want to learn how The Sentinel 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 The Sentinel, so if you're wondering where to start, I recommend simply working your way down the list.
Memory maps
-----------
- The Sentinel memory map - Interleaving code and data to make the most of the BBC Micro's 32K of RAM
- Entry and setup code - Exploring how The Sentinel unravels itself after loading
Main loops
----------
- Program flow of the main title loop - The convoluted loop that displays the title and landscape preview screens
- Program flow of the main game loop - The sequence of events in the main game loop
- Program flow of the gameplay loop - Processing key presses and enemy tactics with the gameplay loop
- The interrupt handler - The key processes that run in the background, 50 times a second
The following deep dives are currently being written and will be published in the next few weeks. I will post details to Mastodon and Bluesky as soon as new ones are ready.
There's a lot to say about The Sentinel, and it's going to take a while to say it, but I hope it will be worth the wait...
3D geometry
-----------
- Pitch and yaw angles - Pitch and yaw angles are fundamental to the way The Sentinel works
- Cartesian coordinates - The tile landscape uses Cartesian coordinates to define its shape
- Converting angles to coordinates - Using two-triangle maths to convert between angles and Cartesian coordinates
- Converting coordinates to angles - How to get angles from coordinates using an arctangent lookup table
- Calculating the hypotenuse - Working out the longest side with just one lookup and one multiplication
- Trigonometry in 8-bit assembly - A look at the various ways in which The Sentinel implements trigonometry
- Reusing the geometry routines from Revs - Discovering Revs at the core of The Sentinel's maths routines
Generating the landscape
------------------------
- Tile data - The fundamental data structure at the heart of The Sentinel's tile landscape
- Tile shapes - How The Sentinel describes the shape of each tile
- Seed number generation - The maths behind each landscape's unique sequence of seed numbers
- Generating the landscape - Using procedural generation to create the 10,000 landscapes in The Sentinel
- The landscape secret code - Generating the eight-digit secret code for each landscape
- Adding enemies and trees to the landscape - How the game adds objects to the tile landscape
3D objects
----------
- Object spawning - Creating, deleting and managing up to 64 objects on the landscape
- Stacking objects - How the game manages multiple objects all stacked on the same tile
- 3D object definitions - Details of all the 3D objects, from trees and boulders to the Sentinel itself
- Drawing objects - Converting objects from 3D definitions into colourful on-screen polygons
Drawing the screen
------------------
- The custom screen mode - Squeezing a landscape view into a custom-sized letterbox screen mode
- The projection system - The plate carrée equirectangular projection used in The Sentinel
- The drawing tables - How the game stores projected 3D data without taking up too much memory
- Drawing filled polygons - Drawing colourfully filled triangles and quadrilaterals on-screen
- Colours and palettes - How the game manages different colour schemes and palettes
Screen buffers
--------------
- Screen buffers - Creating beautifully smooth and fully filled 3D graphics using buffers
- Panning and hardware scrolling - How the landscape view scrolls when the player pans around
- Dithering to the screen - Creating and absorbing objects on-screen with a dithered effect
Drawing the landscape
---------------------
- The visibility table - The pre-populated visibility table helps speed up landscape drawing
- Calculating angles for the landscape view - The trigonometry that converts the landscape into a landscape view
- Drawing the landscape view - Drawing a partial view of the landscape from back to front
- Drawing the landscape preview - How the landscape preview is created at the start of each level
The title screens
-----------------
- Drawing the title screens - The main title screen, landscape preview and game over screen
- 3D text using blocks - How the title screens use the landscape routines to draw blocky 3D text
The energy icon and scanner row
-------------------------------
- The energy icons - Representing energy levels with robot, tree and boulder icons
- The scanner - Displaying exposure levels with a static-filled scanner
Tactics and gameplay
--------------------
- The crosshair sights - Aiming the player's gaze through the crosshair sights
- Calculating gaze - How the game traces line-of-sight by tracing the gaze vector
- Enemy tactics - An analysis of exactly how the Sentinel, sentries and meanies act and think
- Game timings - How the interrupt handler manages game timings and controls enemy tactics
Sound and music
---------------
- Sound effects - Making the silences feel eerie with carefully sparse sound effects
- Music - The iconic chords that add so much atmosphere to this unique robotic world
Miscellaneous
-------------
- Random number generation - How random numbers are generated for gameplay and the dithered screen
- Anti-cracker checks - The Sentinel is crammed full of traps and obfuscations for would-be crackers
- The key logger - How the game reads the keyboard and logs activity during gameplay
- Text tokens - How the game text in The Sentinel is tokenised to save space
- Source code clues hidden in the game binary - Snippets of original source code and what they can tell us