CIVILIZATION VII

From the Devs: Improved Map Generation

Est. Read Time6 minutes, 30 seconds

Hello Civ fans! Ken Pruiksma, Senior Graphics Engineer at Firaxis Games, here to share some behind-the-scenes updates on map generation.

When Civilization VII first shipped, the map generation technique we used focused on ensuring balanced play while following some new gameplay rules around things like Deep Ocean and Distant Lands. This technique, which has its roots in previous Civ games, created fair maps, but also made them predictable. This caused the exploration phase of the game to be potentially less rewarding (which is a problem when the first X in 4X is Explore!) We heard from you that maps felt too repetitive, and we agreed. 

Something else we heard loud and clear from the community is that the straight-edged coastlines that could occur between the two major halves was hindering the play experience. Part of the fantasy of Civ is that you're playing an alternative history of Earth, and when the maps don't feel plausibly Earth-like, it detracts from the experience (outside some exceptions like perfectly balanced multiplayer where you're opting into a mirrored game).

So, we've made some big updates with 1.2.5. We wanted map generation that felt more natural and less repetitive, while still keeping balance in mind where it matters. Out of that work came two brand new map types to choose from: Continents and Islands (two large continents, with islands) and Pangea and Islands (one large continent, with islands). Both are built on an entirely new technique: Voronoi map generation.

VORONOI MAPS

I'm a graphics engineer, which means I spend most of my time making beautiful pixels, but I've always had a soft spot for procedural generation and the algorithms that drive it. When the chance came up to help the gameplay team with map generation, I couldn't resist.

I had an idea about using Voronoi diagrams to dynamically grow landmasses using some rules. After throwing a quick test together, the idea showed promise.

Without getting too technical, the Voronoi technique completely changes how we approach map generation. Previously, fractal noise had been used to create maps, and it works really well when it can be applied uniformly to the whole map. That said, it can be hard to steer towards specific gameplay needs. Voronoi diagrams, on the other hand, give us structure we can build rules on top of, so maps can stay organic while still meeting the gameplay requirements of Civ VII.

Let's walk through how this works.

  1. Randomly spray a bunch of points onto the map. The more points we spray, the higher the resolution. We'll start low res.
  2. Draw lines around each point dividing them into "cells." You end up with something that looks a bit like cracked glass.
  3. Select some starting cells. These are the seeds of tectonic plates in the game map, similar to the tectonic plates that form our Earth.
  4. Each plate grows, one cell at a time, following some configurable rules, until the whole map is filled. Each plate gets a rotation and movement direction. This is your map's crust, and will be used to help influence the growth of continents later.
  5. Now spray many more dots for a higher resolution version! Draw those lines again to get another shattered-glass look sitting on top of your tectonic plates.
  6. Choose some new starting points for the primary landmasses, and grow them once again following a custom set of configurable rules. These rules can do things like influence landmasses to grow along plate boundaries (especially if they're colliding), avoid the poles, and prefer certain latitudes, just to name a few. This is also where we can apply gameplay-based restrictions, like ensuring Homelands and Distant Lands are separated by a Deep Ocean.
  7. Based on the map's settings, we then grow islands, erode the coastline, add mountains and volcanoes, and perform other finishing touches. Many of these steps involve the same set of generic rules used earlier to determine where features are placed.
  8. Once finished, we overlay the hex grid and then hand the map off to the gameplay layer to determine tile types, Yields, Resources, starting location, and more.

The result is that the maps are far more varied and look much more natural. Things that were impossible before can now appear regularly. For example, Homelands and Distant Lands might be North and South of each other. Continents may share a large border, be connected by a small isthmus, or be separated by a sea. There may be a chain of islands between Homelands and Distant Lands – or maybe there won't! The islands could all be clustered in a corner or scattered around, and they're even allowed to merge, possibly causing a continent-sized super-island!

One thing to keep in mind is that we intentionally tuned the settings to generate "normal" maps (i.e. natural-feeling maps with standard gameplay) about 95% of the time. This means there is a small chance for super weird layouts. Part of the fun of Civ is sometimes landing on a bizarre start or weird map thanks to the RNG gods. If you land on an odd map, please share those!

Most importantly, this all means that while you're exploring your starting location and surrounding area, you can't make any assumptions about the shape of the world. When playing on these new maps, I've felt the mystery and excitement again as I explore in the early game and have no idea what's going to appear in the next hex!

JUST THE BEGINNING

With the release of 1.2.5, you'll find new maps named "Continents and Islands" and "Pangea and Islands" that use this new approach, with the former being the new default in singleplayer games. If you'd like to play with the old maps, they are still there under their original names. These older maps may be preferred in a multiplayer setting where the lower variance helps keep the balance among players. 

This is just the beginning for our revamped work on maps! This technique was built with customization, expansion, and modding in mind from the beginning. As a result, you can expect more map options, future improvements to existing map types, and more exposed settings over time as we continue to develop this system. And yes, modders, Voronoi maps are available to you, too! You'll find the scripts and configuration settings used to generate them within the game files along with the specific settings we used for our official maps. We'd love to see how you use this new approach to make new map types.

Finally, we'd love to see the maps you're all getting, so please keep posting them on social media or in the official Civ Discord. We're excited about these changes and we hope you are too. Stay tuned for more map updates. Until then, have fun exploring!