This site will soon contain over 50 deep dive articles that will explain how The Sentinel weaves its magic. I am in the process of writing them, and there are already 40 finished articles for you to enjoy, starting from the top of the list below.
Click here to jump to the latest batch of new articles
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
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
- Adding enemies and trees to the landscape - How the game adds objects to the tile landscape
- The landscape secret code - Generating the eight-digit secret code for each landscape
3D objects
----------
- Object management - 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
- Calculating angles for drawing 3D objects - The trigonometry that converts objects from 3D definitions into on-screen polygons
- Drawing 3D objects - How complex 3D objects are drawn using different phases
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
---------------------
- Ray-casting for the tile visibility table - The pre-populated tile visibility table that helps speed up landscape drawing
- Calculating quadrants for the landscape view - How the drawing routines take a different perspective of the 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
Here's the latest batch of new articles... enjoy!
The title screens
-----------------
- Drawing the title screens - The main title screen, landscape preview and game over screen
- Drawing 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
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...
Tactics and gameplay
--------------------
- The crosshair sights - Aiming the player's gaze through the crosshair sights
- Following the gaze vector - How the game calculates line-of-sight by tracing the gaze vector
- Enemy timers and state variables - How interrupt-based timers and state variables control enemy tactics
- Enemy tactics - An analysis of exactly how the Sentinel, sentries and meanies act and think
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