TL;DR: I wrote a game, try it.
Play in the browser · Downloads and source
What the game is
I wrote Aurelia - a 3D 4X strategy game in Rust, on a Civ 5 inspired / Unciv rule set. You can play it all the way to the end, all of the Unciv content and even more is there - diplomacy, wars, development, 43 nations.
It is in alpha: I spent much more time looking at charts and optimization than actually playing the game, so what it lacks is exactly players. In fact, for me this game is more of a test bench for RL-based AI and other experiments.
It runs on Linux, macOS, Windows, Android and in the browser.
The game is built on a kernel that doesn't know which game it runs. A second game, Lands & Laws, already runs on it, and a turn of eight AI players in the late game takes about 25 ms. This post is about that kernel.
How I got here
I discovered turn-based strategy games when I was at school, and the first one was Civilization. Since then I have made many attempts to build something similar.
Oh, how much time have I spent on them! None of the attempts got further than a simple AI, the first era and simple meshing, but I gained valuable experience with all of these building blocks, and in the background I kept thinking about how an ideal game could be built in theory.
So recently I had the pleasure of coming back to my 4X. But this time I was not alone, I had agents with me :) Now I can do it all together without much strain for the price of a subscription, working on the project only in the evenings.
I am a programmer, so my idea of the ideal game may differ from a player's 🙂 My approach here was rather specific: these days I enjoy building games more than playing them. For me it is first of all about performance and the overall coherence of the model.
But however much I would like to talk about the AI, the meshing or anything else, there is no getting away from the platform it all stands on, especially since it is exactly what makes it possible to run as fast as possible in different environments.
It seems quite important to explain the choice of the language and of the development principles.
FAQ
Why Rust?
Rust is known for producing very compact and fast code, if at least some effort went into how to structure the program at the start.
You would think machines have tens or even hundreds of gigabytes of RAM these days, but in agentic development resources are extremely limited. When the most you have is a few hours in the evenings, the only way out is 10 parallel agents. And if they check the balance and score hundreds of simulated games on different metrics, this becomes critical. Without testers this is especially important. In future posts I will show how this speed can be used to build a really good AI.
Besides, in Rust the type system simply keeps many mistakes out of the program, which is very convenient. For example, you can forget about a whole class of bugs like data races. Just as important, by design everything has a single owner. That is one of the main sources of my code review comments at work.
With Rust it is very easy to run performance experiments. Compared with JMH, Criterion benchmarks are tens of times faster, because Java has compilation and warm-up, and you have to reach a steady state.
And transient behavior is very hard to benchmark on the JVM at all.
Besides, in theory the final program could run even on a Pentium 4, which is one more plus.
Why not Godot, Bevy or Unity?
Because they offer almost nothing to speed up the development of a 4X strategy game: without them everything is described much more simply and reliably. At the same time their design decisions make it much harder to optimize for memory and speed.
Why performance first?
People often argue that this is premature optimization, but I don't think so: the run time of the program is a significant part of development time for a 4X, and a slow program holds back progress as a whole.
Right now there are just a lot of subagents doing something on the machine. So the run time becomes an important part of development.
This matters especially when you can work on the project only in the evenings and at weekends: in the same evening you get to make three times as many decisions.
When the program runs very fast, statistical methods become available in routine development. For example, since a simulation of a whole game takes only a few seconds or a dozen seconds on one core, you can simply collect 30 to 40 samples, compute the metrics and then optimize them reliably. And these can be completely different aggregates: how fast the world gets explored, the number of wars, turns to victory, players destroyed, the number of turns between unlocking a technology and building what it unlocked. This makes it very easy to experiment with the balance and the AI.
And of course, all players are very happy when a game is well optimized. In a 4X this is especially noticeable in the late game: the map is full, there are hundreds of units, and the AI players' turn starts to drag noticeably. In Aurelia a turn of eight AI players in the late game takes about 25 ms.
Why a Civ 5 inspired / Unciv rule set?
Right now I am in the middle of building my own 4X strategy game, Lands & Laws, but to check the quality of the AI and of the implementation I wanted some point of comparison. With the Unciv rules this was easy to set up and to see whether something is going wrong or the game rules are completely broken. Most of all I wanted to check how far the late game can be optimized.
The problem of judging how well something is implemented is especially acute when there are so few resources for checking the product by hand. We already see the consequences of this in software, when service availability drops to 98 percent and software has a lot of problems that would obviously be caught if a person looked at it even once.
But overall I plan to move away from the original rule set and substantially rework the balance once the AI is done. I think many parameters should be changed from their current form.
Did I use AI for development?
Yes! Of course, it is the standard in 2026. Without it this speed of development is simply unthinkable. At the same time, in the early phase I reviewed the whole kernel with my own eyes.
Composability and determinism
In today's world of agents it is crucial to set constraints for the code to keep the program consistent as a whole. I have already talked about performance first, but I have two more main principles: determinism and composability.
Determinism is the property that the same seed and the same sequence of user commands are guaranteed to give the same result.
Determinism has a lot of advantages. You could list them for quite a while. For example, the record of a whole game is just your serialized actions, tens of kilobytes compressed. It seems like nothing until you start training a neural network with RL and the games number in the tens of thousands.
There is also the ability to make sure nothing changed after an optimization, and it costs nothing, just a hash of the state. You can bisect by behavior.
As a rule of thumb I suggest holding on to determinism in any system for as long as possible, until time constraints force you to break it. It is an extremely convenient property of a system.
However, the most important property for large systems, and this game is definitely one of them, is composability.
Agents are very good at solving specific tasks. But once the files no longer fit into the context, the codebase usually starts to degrade: duplicate implementations, conflicting approaches, edge cases not handled at the right level of abstraction and so on. In fact this applies not only to agentic projects but to ordinary human systems too.
The only thing that helps here is composability, as a way to manage complexity. Composability lets you assemble the whole from pieces without knowing their implementation details, and this is critical for games this big. They have an incredible number of states and transformations. And they have to be reduced to a minimal kernel and modifiers on top of it. Then you get a system that can be analyzed and extended. Lately I have seen a lot of systems where a small change in semantics requires changing code in hundreds of places. That is exactly what the lack of composition looks like.

How the kernel works
The diagram shows the architecture of the kernel. A large part of the code of 4X strategy games can be moved into a shared framework. That is exactly what I did (aurelia-platform). It handles storing and managing state, reliable incremental recomputation of state, managing subscriptions and so on.
On the left are the consumers of this API - Aurelia itself (this game), Lands & Laws (the working title of the new game) and a Sandbox for testing. They only use the kernel API and provide assets.
The whole map is a set of layers, and each layer is defined by data that the game provides. This data is stored in RON files and then converted into the internal format the kernel works with. For efficiency all references are resolved in advance, and the agent inside never works with hash tables, only direct lookups in arrays. The arrays are frozen: during a game the rules no longer change.
This has an extra side effect: the logic inside cannot refer to specific objects from the assets, for example, it cannot check if (type == "archer") {}. This forces properties to be separated from assets and keeps the logic independent of the game's assets.
Effects are data, one pipeline
Aurelia has many different entities, and they all affect each other. The food on a tile depends on the unlocked technologies, on the buildings on the tile, on the civilization and on many other things. Not to mention unit strength, where there are even more factors.
To avoid getting lost in these values and to get a predictable model, all entities are turned into elements of a simple pipeline. For example, a forge gives +15 % to the production of land units. That is just a row of data: it goes through the same stages as any other bonus, and the result does not depend on what was built before.

Incremental updates
Imagine you are writing the visibility calculation. Your map is 80x160 and you have 50 units and 6 cities. Visibility has to be recalculated on almost every move and even on some actions inside a city or on researching a technology. Without incrementality this will take a significant amount of time. This applies to many calculations, not only to map visibility.
So everything that can be computed incrementally should be. But this approach has limits. At the end, when almost the whole map is taken, a full recomputation often makes more sense than incrementality, because at some point the cost of maintaining incrementality starts to outweigh a full recomputation.
It is worth saying that if incrementality is added ad hoc in every place, it is extremely unreliable. Incrementality has to be isolated, because managing its state is hard. So you should aim for it to look as much as possible like ordinary non-incremental code to the consumer of the API. In the kernel this is done with a journal: every transaction records what exactly changed, and derived data is recomputed from that journal and only where needed.
What is still broken and what comes next
Many screens, for example trade and diplomacy, don't look their best.
The AI still has various problems, but by my measurements it already beats the AI from Unciv, which I ported to the kernel in full for comparison. There is no network play yet. And the game has only 3 music tracks so far.
I would really rather not hardcode heuristics for a particular game, so I decided to try the RL and neural network route. It turned into a whole saga - I'll tell the story in a separate post in the next 1-2 weeks.
Meanwhile, try playing right in the browser: aurelia.romanivanov.dev. I'd be glad of any feedback, and especially of bug reports.