Work

ColonySim

Godot
C#

A small project in which i explored AI and deep simulation, simlar to games like Dwarf Fortress.

Motivation

I really enjoyed playing games akin to RimWorld and Dwarf Fortress in the past, which are among the best-known deep-simulation or colony sim games out there. Sadly, most of those games had some sort of drawback or mechanic that I didn’t like. Although I have plenty of hubris, I certainly wasn’t willing to dive into a full-sized project right away.

For that reason, I decided to gather a subset of mechanics and systems that I wanted to test, to see if I had enough skill to realize them. I was also very interested in finding a good engine for myself, one that I could use to make games with in the future. I initially started out using Unity, but after about six months I switched the whole project to Godot. Since Unity lacked the features I needed in a sufficient way, I felt this was the best choice.

Features

Among others, these are the most finalized and relevant features:

Procedural World Generation

As the game world for this game was set to be in a tile-based 2D world i took the procedural world generation approach to ensure high replayability. To ensure easy use I split the generation into multiple sub steps. Each sub step is sequentially executed like this: Noise generation -> Biome Assignment -> Structure placement -> Foliage placement -> Tile assignment. With that the help of some gradients, math and so on its is pretty easy to create a decent looking procedural world.

Time System

One of the features I always wanted was a proper day-and-night cycle. To make that work, I needed a robust Time System. This system had to be independent of framerate and also capable of fast-forwarding time at a given speed.

Entity AI & Deep Simulation

This was the feature I feared the most. A solid enemy AI can make or break a game—especially if the world needs to feel alive. Simulating different parts of the ecosystem was another crucial step toward creating that sense of life.

I settled on a straightforward approach using a custom-built state machine, where entities switch states based on their current needs. Each entity can then select from a global set of “advertisements” that help fulfill those needs. For long-running tasks, entities rely on the simulation system to set up callbacks or schedule future actions. The simulation system itself is tightly coupled with the time system, since all tasks and entities must run at the defined “world speed”.

Weather & Day/Night Effects

This was another challenging feature for me, since all of the effects had to be implemented with shaders — a topic I never fully understood at first. The system logic itself was simple enough: it just required applying the correct material to a texture whenever a weather effect was active.

Technical Details

From a technical standpoint I’ve ended up using the Godot Engine v4.3 together with C# .NET 6.0 for this project. As for my IDE I started out using VSCode and ended up switching to JetBrains Rider, finally for version control I used GIT together with Azure DevOps. For this project I wasn’t much focused on using any particular external library or specific software design patterns.

Learnings

During this project I learned many things about Godot and Gamedev in general:

Godot maturity

Although Godot has had several revisions over the years and is continously improved there are still many small issues that need workarounds or hacky fixes. Some of those workarounds became eventually to annoying which is also a big part in why I decided to abandon this project.

Complexity

This was mostly expected as I had already heard that making simulation games is very difficult. Yet while trying the implement even just a simple Entity AI with some simulation concepts I understood how much more work it is to create a believable simulation.