James Randall Musings on software development, business and technology.
Elite: Loading screen and game saves
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.

Been a bit of a spotty work for progress on fun projects due to being crazy busy at work. I crawled into this weekend.

However some progress has been made. First up I worked on getting saving and loading games in place - pretty simple, just serialize out the relavant bits of game state to JSON and pop them in local storage. Loading a game, reverse that.

The other thing I wanted to get in place was a loading screen somewhat similar to that in the original game. There were three reasons I wanted to do this:

  1. Its just kind of iconic and cool.
  2. There aren’t loads of hefty assets in the game but it still takes a few seconds to load on my rubbish rural broadband connection and I wanted to hide that (I could do some work to make the resource loading more efficient… maybe one day).
  3. You can’t play audio until the user has interacted with the web page and I really wanted to get the BBC boot up sound in as the game starts… so I needed something to catch a click.

Fortunately the maths behind the original loading screen have been documented by Mark Moxon so it was pretty trivial to implement. He’s done all the hard work - thank you!

You can see all this in the video below.

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