James Randall Musings on software development, business and technology.
Exile
Annhexation gameplay — a hex-based 4X strategy map
Annhexation Early access

A turn-based 4X strategy game I built from scratch — custom WebGPU engine, eight civilisations, no install. Play it in your browser right now.

You can play the game, and read all about how it works, at bbcexile.com.

Exile has been with me for nearly 40 years. Written by Peter Irvin and Jeremy Smith and published by Superior Software for the BBC Micro in 1988, it was doing things an 8-bit machine had no business doing: a vast procedurally generated cave system, creatures with what seemed like intentions, real physics with gravity, momentum, wind and water - and all of it in 32K. It was an open world and a metroidvania before those terms were even coined, and it routinely tops lists of the greatest technical achievements on the platform. It seemed like wizardry then and, honestly, it still does.

The question of how it worked never really left me, and after my Thrust project - another Jeremy Smith game - I felt I’d learned enough to finally scratch the itch. So this project set out to do two things at once: understand Exile completely, and authentically recreate it running natively in a web page. Not through emulation - emulating Exile tells you nothing about it. Every system has been re-implemented as readable TypeScript: the landscape generator, the physics kernel, the creature behaviours, the renderer, the particle and sound engines, the main loop.

Working from the excellent enhanced disassembly I took the game apart one system at a time - nineteen layers in all - and for each one wrote an article explaining how it works, built an interactive demo you can play with in the browser, and recreated the system in TypeScript preserving the original’s exact arithmetic. The “feel” of these games often lives in the peculiarities of 8-bit arithmetic, and Exile is some of the densest code I’ve ever looked at: self-modifying opcodes, the carry flag used as a courier between subsystems, single zero-page bytes doing two unrelated jobs.

The part that makes it all trustworthy is the validation. The project includes a minimal 6502 emulator whose only job is to run routines from the original game side by side with my TypeScript and prove them bit-identical - right down to individual screen memory bytes for whole rendered frames. Every divergence the fuzzers ever caught is pinned as a regression test.

The result is at bbcexile.com: the full game playable in your browser, alongside the complete “How Exile Works” article series and its interactive demos.

Screenshot

Annhexation gameplay — a hex-based 4X strategy map
Annhexation Early access

Forty-two years after I first started programming, I built a browser-native 4X from scratch — a custom WebGPU engine, eight civilisations, and an AI opponent I'm still teaching to play. No install, no sign-up. Play it right now.

Built by James Randall — tool-maker, system builder, and occasional cyclist. Walking the hills with my four-legged friend when I'm not building worlds.
© 2025