Crafting believable worlds in Chronicles: Medieval

The Art of Worldbuilding

In this blog, we’ll take a closer look at how our dev team approaches building settlements in our game. That means anything from small villages to big cities that you, as a player, will get to explore. We’re building a large, immersive world in Chronicles Medieval. And a world like that needs more than open fields and forests. It needs places that draw you in.

The goal was simple - we set out to handcraft beautiful, historically sourced assets and build a system that could take care of their layout and distribution. We leaned heavily on Unreal Engine’s Procedural Content Generation (PCG for short, which allows us to scatter assets that are distributed by a set of variables) and used it to feed our own, proprietary tools.

We knew early on that hand-placing every building across each and every town wouldn’t just slow us down, it would limit us (and deplete our budget quite quickly, too). We’re building a world with scale, variety, and enough ground to get lost in. That meant we needed tools that could support that scope without losing the detail and character that make each location worth visiting.

The procedural generation of villages also can’t be random. It has to follow certain rules to make everything look and feel believable. We also take great pride in creating state-of-the-art environment assets, and we needed everything to be highly art-directable. Putting the art and design teams in control over how the final result looks like.


Over time, our tech artists and tools engineers built a toolkit that’s grown into a full set of internal tools called Skapa, Borg, and Ymir. In short, Skapa allows us to create varied asset compositions that rely on PCG graphs. Ymir is a modular, data-driven tool designed to generate landscapes and biomes procedurally. And Borg is what we use to build settlement layouts. In this post, we’d like to shed some light on how those work together and how you, as a player (and modder!), will benefit from those.


BORG - PROTOTYPE

The development of Borg started years ago. From the very beginning, we knew it was going to be a challenge to populate our huge map with varied, interesting, and organically looking villages or towns.

First, we started researching how medieval villages actually looked like. After studying historical maps and books on the topic, we identified layouts that kept repeating the most. Towns that were settled along a main street. Ones that were more circular, with a marketplace in the center of the settlement. Or ones that were more dispersed and irregular.

Source: Dorftypen nach Robert Mielke, Siedlungskunde des dt. Volkes, München 1927

There’s plenty of historical data that we tried our best to base our generation on. And we wanted our tools to match this data as close as possible, while at the same time also being friendly from a game design point of view - i.e. most important places to visit, those that the player interacts with the most when playing the game (tavern, quartermaster, marketplace etc.), need to be fairly concentrated so that you don’t have to run around too much without any idea what’s where. But what’s really interesting is that this gameplay vision aligns with how medieval settlements were actually built. Historically, towns were built centralized around key institutions that formed the core of the communities day to day lives. That corresponds perfectly with our goals, and we’re able to create organic spaces without compromising core gameplay principles.

After some research and development in Side FX Houdini, our strike team of tech artists, designers and tools engineers ended up with a prototype that allowed them to quickly generate satisfying village layouts. It utilizes parameters like village size on the X and Y axis, plot number, plot density, road entry and exit points, and much more. It then places them using a mathematical diagram called Voronoi.

Additional features included multi-center options, border deletion, and wall addition for defenses. The tool aimed to provide user control over settlement creation without introducing complex setups. And one that we could adapt for our Unreal Engine pipeline once we started developing how settlements are generated in-game.

Below is a short video on how that prototype looked, and the examples of generation results we were able to achieve with it.

Watch YouTube Video


This was a great starting point from where we could move on to experimenting and testing ideas inside Unreal Engine. While it might have been easier to rely on the Houdini engine or roll out our tools in Side FX software, we want to embrace mod support. That means we want as much as possible of the game content to be authored inside Unreal Engine, without requiring any 3rd party tools, so that modders can build their creations freely and not care about any extra software licensing fees.

BORG - UNREAL ENGINE

Using the same principles we established while working in Houdini, we built Borg inside UE5. To not overcomplicate things - Borg is a procedural settlement generator for Chronicles: Medieval, built to support creation of villages, towns, cities, tournament grounds, etc. It integrates environment assets composed in Skapa (we’ll get back to that one a bit later), such as buildings, and interacts with Ymir (our landscape generation tool) for terrain processing, such as foliage and hills. Borg places the environment asset compositions into zones using a Voronoi diagram that divides space into regions based on distance, so each region contains all the points closest to one specific center point (it’s math, ok? And for those who really want to go deeper, click HERE). This diagram is composed of multiple Voronoi cells. Each of these cells is used as a settlement zone.

A lot of hard work and iteration went into the development of Borg. We had to find out how the systems are tied together and how to optimize them best for the creation of desirable results. Right now,  Borg is still in development, and we’re waiting for additional support for spawning rivers and other bodies of water.  But we are already in a position where we can replicate a lot of the desired layouts that we found during our historical research.

There is a lot of cool stuff happening inside Borg each time we define how we’d like a settlement to look like. The foundation of the system builds on parameters adapted from the original Houdini prototype. By adjusting how the Voronoi pattern is generated, we can shape both the size and distribution of the cells - giving us direct control over the overall structure of the settlement. We’re never letting the machine fully control the process. There’s a human touch behind each and every one of the towns we build.

Each settlement is composed of several zones, and each zone defines a unique configuration of buildings (represented as Skapa compositions). These configurations determine what types of structures appear and how they’re arranged within the settlement.

Placement is guided by a density setting and a placement algorithm, which together influence how many buildings are generated and where they appear. Depending on the setup, buildings can cluster near the center to form a radial layout, or line up along the main roads to create a more linear pattern.

To keep each settlement unique, seed values introduce a degree of controlled randomness - affecting everything from the Voronoi point distribution to how individual building variations are selected within each Skapa composition.

What’s really interesting is what’s happening inside each and every one of these Voronoi cells that Borg is populating with assets.

SKAPA COMPOSITIONS

In Unreal Engine, PCG stands for Procedural Content Generation. Very important thing - it has nothing to do with generative AI. To quote Epic Games on it:

The Procedural Content Generation Framework (PCG) is a toolset for creating your own procedural content and tools inside Unreal Engine. PCG provides technical artists, designers, and programmers with the ability to build fast, iterative tools and content of any complexity, ranging from Asset utilities, such as buildings or biome generation, up to entire worlds.

Think of it as a way to quickly populate an open world map with a lot of trees in order to create a forest. In principle, when using PCG, first, you have to model the trees and then use a PCG graph to scatter them in the desired area, defining things such as the density and other variables.
We use the same principle when creating our Skapa Compositions - a set of combined assets that allow us to construct anything from simple, let’s say, fences, through village huts, and ending on entire plots of land that are populated with houses and other functional buildings.
Let’s break it down and see how we approach building a village house for example.
First, we create a modular building set. We think of all the components that might be needed to construct a variety of shapes of medieval houses. This is a pretty standard technique used to build architectural assets in game development. The modular kit would consist of walls, wall corners, roof elements, doors, window frames, etc. Anything that an artist might think of to fulfill their creative vision. It’s like building a set of modular toy bricks that they invented in Denmark a couple years back (They even had a cool medieval castle set!). And then, instead of making an instruction manual to build a specific construction, printing a document of all the possibilities that the blocks give you.

After the set is done, our artists use them to create different shaped houses. But, we do not only do it by hand. Using the Skapa Compositor, we can define rules on how to connect different pieces to create varied results. Then, by simply regenerating the seed, we can create virtually infinite variants of different looking houses.

After adding different attachments (which are also created using Skapa Compositions that have their own variants themselves), we can combine different Compositions together, adding even more variety to the look of the house. Additionally, introducing shader variety, like moss distribution on roofs driven by world position, allows for organic and distinctive results with very little effort.

We apply the same principle to every piece of procedurally generated content we make. Not only houses, but also all the marketplace stalls, functional buildings, fences, crop fields, etc. This allows us to populate the cities with great-looking, handcrafted assets, but composed in a way that has enough variety to look believable, both in detail and from the bird’s eye view. And it allows us to do it fast. Without the tedious work of placing things by hand. But with great control on the tools side of things, that empower artists to craft beautiful looking settlements.

What begins as a single model can quickly grow into a full village scene, with houses naturally lining the main street.

Watch YouTube Video

What’s great about this approach is that, since we’re building everything with modders in mind, you’ll be able to edit and replace every single asset within these compositions. So let’s say that you’d want to create a mod that would set the game world back a couple of hundred years to ancient Rome, you’d totally be able to do that by replacing the modular kit with appropriate looking assets. And leveraging the procedural workflow, you’ll be able to generate Roman villages in no time.

WHERE WE’RE AT NOW

In the end, after we click “generate” (Sometimes when we play around with the tool, we can’t believe how cool and effortless it is to spawn an entire settlement with just one click.), we get something like in the video below. Here’s a first look at one of our many generated towns. This is the kind of settlement you as a player will step into when Chronicles: Medieval enters Early Access next year.

Watch YouTube Video

Every composition you see here was distributed dynamically. By dedicating a lot of artists' attention to handcrafting individual Skapa Comps and putting a lot of effort into making those look as good as possible, and then combining them through the Borg system, we empowered ourselves to work efficiently at a bigger scale. Everything is driven by a procedural workflow that we’ve been refining for quite some time. It helps us build varied and dynamic environments faster, but it’s still a complex process that takes a lot of care and iteration. The result: worlds that feel handcrafted, full of detail and character in every corner.

We’re still a long way from the place we’d like the tools to be when it comes to the speed of each generation, the complexity of it, and how it interacts with landscape elevation for example. But still, as you can see in the video above, the layouts already look pretty nice and the assets hold up, both in close-up, and when looking at them from a distance. And of course, we’re working super hard on making them look even better as we speak.

And yes, we can scatter anything around the towns. Even some ridiculous details like horse dung. It’s all about making it feel believable, right?!

SUMMARY

Borg helps us generate diverse, grounded, and functional locations at scale. It gives us the flexibility to create believable layouts using handcrafted content, historical research, and rule-based placement.

Borg is one part of a much bigger effort to bring the world of Chronicles: Medieval to life. Combined with tools like Skapa and Ymir, and backed by a lot of hands-on design, it lets us build settlements that aren’t just technically functional, but feel like they belong in the world and are plausible enough to feel like a page from an old history book.

Have in mind that this is just the beginning. All the tools that are the backbone of Chronicles: Medieval are still in active development. We expect that each settlement that we spawn in the future will get much better over the course of the game’s development cycle. The huge upside of the entire toolset (and there’s more happening under the hood besides mentioned Borg, Skapa and Ymir) is that we retain absolute control at the low level of generation (Skapa compositions, seed values, layout templates, architectural styles), we delegate some control at the high level (settlement layouts) but we can quickly regenerate layouts until we are happy or set very specific outcomes by controlling the seed values exactly. Additionally, when our artists begin the polishing phase of the Skapa compositions, we can utilize nightly regeneration of all affected settlements to update every instance that uses said Skapa composition instead of doing it by hand. That way we have more time to spend on creative and fun aspects of the job instead of tedious tasks.

We hope that you enjoyed this look inside our proprietary toolset. Maybe there’s anything specific about the tools that you’d like to know more about? Or maybe you have an idea for a mod that would leverage the tools? Let us know!

Until next time!