We’re making our next game, Tribes of Midgard, using procedural generation.

That’s a big statement that can mean a lot of different things, so in this blog post we’ll be talking about how and why we’re crafting our majestic Midgard in this particular way. Procedural generation allows game makers to program an entire world out of algorithms, patterns and predetermined probabilities. We’ll outline what we’ve discovered so far, what we’ve learned along the way, and what we’re looking to do next.

The Natural World
The world of Tribes is cut into different regions, which are further categorized into biomes. These are the various lands players can explore that each have a different look, array of attributes and stash of resources to harvest. We build each biome individually, then specify conditions and settings, such as the frequency of plants, minerals and enemy creatures. Or, sometimes the absence of props and collectable items is better at conveying the mood of that biome, and presents a more interesting challenge for the people playing the game. Furthermore, our biomes also change in relation to distance from the village; a forest close by will be less-threatening than one much further away, which could have more hidden dangers and higher-level enemies.

If we make each biome separately, how do players move from one to the next? In our case, we use a combination of blending borders and curated pathways to create transition zones between biomes. Tribes has rocky paths to get across rivers and terrain that blends from one type into the other, meaning that there is always a route to get you where you want to go. Our transition areas are quite small compared to some other games, as we don’t need a large area of mixed forest and beach, for example. Otherwise, these spots will become their own biomes and you’ll have to spend extra time on adjusting the settings in these low-impact areas.

A watery pathway bringing you from the forest to the black sand beach.

Having variety in biome transition is important, as it increases the legitimacy and ‘natural’ quality of Midgard. If you were in a real forest and wanted to cross a stream to go to a meadow on the other side, there would likely be many ways of doing so: going across the water, finding where the stream ends, etc. Realism can be a tricky thing to strive for in video games, but in order to make sure that biome transitions don’t stand out, we need to make them feel realistic.

Making it Special
Tribes of Midgard has a top-down point of view, meaning that you never see the horizon. This perspective changes how we build our world, as some factors suddenly become more or less important that others. For example, elevation becomes difficult to show when the camera is high above the world, yet a flat earth can get pretty dull for players to explore. How do we resolve this?

For Tribes, we decided to introduce extremely defined elevation in the form of plateaus and cliffs. There is a sharp separation between terrain and elevation, with ramps that allow the player to move from one height to another. Not only does this make exploration more interesting, it also opens up options for co-operative combat with enemies. If you can organize your tribe to have some players attacking from below while others attack from above, you can take a unique offensive strategy toward oncoming enemies.

You might be wondering: how do we procedurally generate cliffs and plateaus to fit together every time? Won’t they all be duplicates placed on top of the map? Luckily for us, our generation system extends to elevated attributes.

Our world is formed as a grid, with each piece like part of a puzzle that fits together. Some pieces only have one spot where they can go, while others are far more flexible and not only can have multiple partners, but can be turned around in many directions. These tiles are programmed with rules so that when the game begins to generate a map, it knows which pieces can go together in order to have a certain result. Early bugs will show cliffs with flat edges or trees growing through a rock wall, as we learn which rules have not yet been set! If you are continuously adding content into the game, which we plan to, you’ll especially need to keep an eye on the world and make sure everything is behaving as it should.

See how nicely those cliff tiles fit together??

An Interesting Point
Spawning cliffs and trees all over the place is fine, but sometimes procedurally generated worlds can start to feel a little repetitive, especially if you’ve been playing the game for awhile. Therefore, we knew the entirety of Midgard could not be randomized, and that some added handcrafted elements would help to make it feel more special.

Of course, there is the Viking village that all players will have as their home. It makes sense for this aspect of the game to be stationary: in the village is where you will find shops, craft weapons, receive news and instructions, and defend the sacred Seed of Yggdrasil. Plus, you can meet the other Vikings who live in your village and interact with them to hear more about the state of the world and the various threats that lurk in the wilderness.

One of our favourite fixed points of interest is the Dark Elf Camp. Aside from some interesting visual effects we’ve included, the camp offers an opportunity for cooperative gameplay and rewards for resisting an attack of Dark Elves. Because the mythology states that the Dark Elves live underground, we gave their camp nests that allow them refuge from the brightness of Midgard. Torches, smokers and spears are littered around the base, and a large pyre of the witch they now worship, Gullveig, stands above it all.

There is a lot going on the in Dark Elf Camps…

The whole camp acts as its own piece of the world grid, and is layered onto the map once the elevation has been created, but before props such as trees are placed. The rules of the system are programmed to know that many Dark Elves should exist near the camps, so that it feels populated when a player arrives there.

What’s great about these handcrafted sites of interaction is that we can share more detailed and specific environmental narrative here; about Midgard, about the Ragnarok, and about the characters that inhabit it. While procedurally generated storytelling can be very exciting and will be used in our game in some ways, we need reliable places where players can go for information and context about the world, especially since Tribes of Midgard is a multiplayer game.

Coming Attractions
We’ve learned a lot while building Midgard and from growing a game that has something new to offer each time you arrive in your village. We’re at a point in the development process now that our systems are becoming increasingly stable and soon we’ll be adding in more content, more animations, and more things to do. Both of these aspects are important, as both contribute to making a world that feels legitimate and also inviting to players, as procedural generation can sometimes feel empty, repetitive and glitchy.

Our main goal is to ensure that everyone has a unique experience when playing Tribes of Midgard, and procedural generation is just one part of that. Multiplayer games have the ability to allow players to determine outcomes and how to achieve certain objectives in ways that single-player games cannot. We’re interested further investigating how we can use our generation systems to affect the world, such as through narrative, combat, or player actions, and will be sure to keep you updated on what’s coming next!

Sign up for our newsletter, join us on Discord or keep an eye on our Facebook for more news about Tribes of Midgard.