# Voxel Dynasties: an old dream, block by block

> Devlog on my real-time strategy game. Why an RTS is so hard for a solo developer, and what a game teaches business software.

As a child I spent countless hours with Age of Empires. At some point the question came up that has never let go of me since: how do you actually make something like that? That is exactly where programming got hold of me. And ever since there has been a quiet dream: a real-time strategy game of my own. A proper one, with multiplayer, real units, opponents that fight back, ages, navy and air force.

The problem: a strategy game of this kind is among the most complex tasks a software developer can take on. So for a long time it stayed a dream.

## Why this is so hard for a solo developer

A few of the construction sites such a game brings with it:

- **Deterministic multiplayer.** All players run the same simulation in parallel; only the commands are transmitted. If a single intermediate result differs, say through a rounding difference, the match drifts apart.
- **Pathfinding** for land, water and air, for thousands of units at once, without the simulation stalling.
- **A procedurally generated world** with continents, coasts, rivers and highlands, different every time and still playable.
- **An entity component system** that manages thousands of units without the code turning into a knot.
- **Opponent AI** that does not just build, but answers the player's strategy with a counter-strategy.
- **Ten ages** from the Stone Age to the Atomic Age, each with its own units, buildings and technologies.

Each of these tasks is a project in its own right. Together they are the reason such games are normally built by teams over years.

## What came of it

Voxel Dynasties is by now a playable game. An engine of my own in Java, a world made of blocks in which every fortress can fall stone by stone, lockstep multiplayer, navy and air force, and a mode in which you take over a single unit in the middle of the battle and control it from its point of view. The implementation went much faster than I would have trusted myself to manage earlier, partly because I work with AI support on the implementation and can concentrate on architecture and decisions.

The moment a match first ran against an opponent AI that really countered was one of the most satisfying in my career as a developer. The game is still in development; a free demo is available on Steam.

## What a game teaches business software

You might think a strategy game and an order management system have nothing to do with each other. Technically, though, they demand the same things:

- **Clean architecture.** If simulation, rendering and networking are not clearly separated, none of them can be changed without damaging everything else. The same applies to an application with users, receipts and interfaces.
- **Automated tests.** Deterministic multiplayer can only be kept reliable with tests. So can an accounting system or a receipt workflow.
- **Reproducible builds.** The version on Steam has to be exactly the one that was tested. The same goes for the application running at a client's.

The experience from complex real-time software therefore flows directly into the business applications I build: clear system boundaries, tests and a delivery that runs the same way every time. More on the game, with pictures and the link to the demo, is in the portfolio under [Voxel Dynasties](/en/portfolio/voxel-dynasties/).
