Devlog: Procedural Generation Progress
United States
Breaking News:
Washington DC
Saturday, Nov 28, 2026
I’ve been spending a lot of time working on mission generation recently, and there’s still a huge amount to do, but I thought now would be a nice time to stop and write a little bit about what I’ve been up to.
If this is the first time you’re seeing Terminal Reign, then go check it out on Itch or Steam (and possibly wishlist if it piques your interest).
My previous game, DSE, featured only handcrafted levels. This was good for controlling the flow of what was quite a short game, but ultimately meant that any players wanting to keep playing after the end of the story were forced to just restart (and with the same set of levels!).
I would like Terminal Reign to have more replayability in that sense, so procedurally generated missions are definitely the way to go. There’s also much more scope for the proc-gen in TR than there is in DSE, so there’s more opportunity for generating satisfying missions.
The current design is that generation will be split up into map building and mission building. The map phase will deal with generating the level’s geometry and defining specific zones within that (rooms, corridors, etc.). The mission phase will then use that geometry and those zones to place game elements for a specific type of mission. Decoupling these two phases will allow for greater flexibility and variety in the types of missions that can be generated, but mostly makes the coding simpler as different map builders and mission builders can be used together without either of them having to worry what the other is.

At the moment I’ve been working on a map builder which uses a hex grid and cellular automata to produce natural-ish looking caverns, with distinct zones and passageways identified. I then have a simple mission builder which places the player and enemies within these zones, and creates an objective for the player to destroy all enemies. It’s all working quite nicely, so next I want to work on some mission builders for some story-appropriate missions with a bit of flavour.
What I’m effectively doing when generating missions is creating a rogue-like dungeon with some extra objectives thrown in, so generating the maps is actually super close to what traditional rogue-likes are doing. The difference is that I want the ultimate output to be vector-based geometry instead of a grid-based set of tiles, which complicates things somewhat (which zones neighbour others isn’t so clear cut) but also means I can use whatever approach I like as long as I output it as well defined zones and their vectors.
I want to have some missions take place in natural or organic looking surroundings, so I thought I’d try my hand at generating some kind of cavern system. RoguelikeDevResources by Marukrap has links to some fantastic map generation articles focussing on cellular automata, which can produce fairly natural looking formations. I also thought that using a hex grid instead of a square grid would help to produce more of a natural, less grid-like effect, so I finally got to use some of the amazing advice in this article on hex grids by Red Blob Games (I really recommend scrolling through it at least for the interactive diagrams).
If you haven’t come across cellular automata before, then the approach is quite simple; start with a grid of empty tiles and randomly set tiles as walls (around 40% chance is standard). Then check each tile and set it as empty if it has 3 or fewer wall neighbours, or as a wall if it has 5 or more wall neighbours. Repeat this step a number of times and you’ll see the shapes become smoother and a little less chaotic. Playing with these simple parameters (seed chance, wall/empty weights, and iteration count) can produce quite a range of results with interesting features for gameplay.
Once the raw shape of the map has been generated it’s time to clean it up so that there are no unconnected areas, and then process it and organise it into distinct zones that can be easily used by the mission builder phase. The steps that my hex grid generator goes through are:
1. Mark border cells for desired grid size.
2. Seed grid with random wall cells.
3. Run cellular automata iterations.
4. Group cells into zones and passages.
5. Remove zones that are too small.
6. Remove passages that are unused.
7. Connect any unconnected zones.
Most steps can be parametrised, and there’s an optional step between steps 1 and 2 where a starting room can be placed that won’t be affected by the rest of the generation (helpful to give control over the player’s starting conditions). Once all of this is done the map’s metadata can be populated with info such as zone neighbour connections, and the actual geometry can be mutated to give the walls a more cavern-like shape instead of just pure hexes.

Above you can see my debug/testing view of the hex map generator and some of its outputs. Standard zones are outlined in yellow, passages in blue (a little hard to see), and borders between zones are green. The red outlines show where a physical wall will be.
My plan is to create other map builders that use different underlying algorithms. A simple one would be a much more traditional rogue-like map generator that outputs square grid-based rooms and corridors, which in this game could pass as the interior of a space ship or some kind of megastructure. There’s also the possibility of map builders that process predefined data, so I could design a map by hand for a special kind of mission (most likely tutorial or training) and have that seamlessly processed by other components.
There’s not a lot to be said about the mission builders yet, as that’s what I’ll be working on next, but I’m hoping to give them interesting features such as being able to process a map’s geometry and figure out which areas are ideal for certain types of enemies or traps. Most likely what I’ll end up with is many different mission builders for each type of mission I want, but they’ll all have access to a common set of tools and features for picking the best places for different game elements.

Above is what the game looks like at the moment when choosing a mission and loading into it. You can see a randomised selection of missions, then selecting and loading into a mission. This is all very early stages stuff so no guarantee it’ll look like this in the near future.
I want to devote a devlog to this in the future when there’s more to show for it, but I thought I’d show a little of the pathfinding I’ve got going at the moment. The base is a simplified version of what I made for DSE since now I don’t have to worry about a pathfinding graph that wraps around the world.

The above gif shows the debug output for an enemy creating a path to the player’s weakspot (blue segment) while avoiding the area directly in front of the player (red segment). This is all running as part of the heuristic in an A* search. I’m interested to see how much behaviour I get out of A* heuristics and whether it’s actually a viable approach, given performance and complexity.
That’s all for now! If you’ve enjoyed this then check out and possibly wishlist the game on Steam.
Cheers!