Worlds and their geography

An important way to make an imaginary world believable, is to present its geography with maps. The context of the game — national and international politics — demands believable geometry and necessitates good looking maps. In this article, I will explain a little more on how the underlying geometry of a Particracy world map is created. This article gets a little technical in the second half, so don’t say you weren’t warned.

Geography blended with time equals destiny.Joseph Brodsky

Particracy is being designed with a subtle balance between gameplay and realism in mind. Where other games may prioritize gameplay and use their settings mostly as a backdrop, Particracy is as much a simulator as it is a game. This has important implications on maps and geometry.

A plausible virtual world, where prominent politicians are supposed to know most other countries in the world, you can’t have more than a few dozen up to maybe a hundred nations in the world. Anything higher than that, and big portions of the world start feeling anonymous, and immersion is lost. On the other hand, you can’t really have more than eight, maybe ten political parties in a nation before the politics become meaningless and nobody has any real power. These constraints imply a practical limit of, say, five hundred players. Of course, the ambition is to grow the game far beyond that, to many thousands of players. The only natural conclusion out of this, is that the game engine must be multi-world at heart.

This isn’t just a matter of increased capacity through splitting the player communities though, it’s an opportunity for embracing diversity in the literal game space of Particracy. That’s why the different worlds can’t just be carbon copies of the same map. Some players might enjoy to play in a world made up of small archipelago. Others may find an interesting enironment in a hundred-year old Cold War between two continental alliances. Another world could have a quicker tick rate, for those players who have the time and energy to commit to a faster-paced game. In a later stage, even different thematic settings, like young democracies in an 18th century-inspired world, or a science-fiction universe maturing colonies on an alien planet. What’s clear is that with potentially dozens of worlds required to host the player population, manual creation of world geography is not an option. Automatic procedural generation of world maps offers a solution to this problem.

The maps in Particracy won’t just be colored pictures though, as they will be based on data with correct, plausible coordinates that map on a sphere, like the real world[1]. This allows rendering the map using real mapping projecions, and permits accurate calculation of surface areas and geodesic distances. To support arbitrary zooming and those accurate calculations, the maps are generated as vector shapes, rather than pixel rasters.

To start off, a basic vector cell structure is needed on top of the sphere. One can slice up a spherical surface in many ways, but one of the most appropriate for this use case is to calculate a random-point Voronoi partitioning directly on the sphere’s surface. A spherical Voronoi partitioning is generated by first seeding a set of random center points on the sphere’s surface, and then determining the regions around these points, such that each region contains all the points that are closest to the same center point. The image below illustrates this graphically, for 300 Voronoi faces, but for the actual Particracy world geometries, partitionings with at least 100,000 faces will be used.

Voronoi mesh generated on 3D sphere

In the next step, a height map with a spherical coordinate system is be mapped on top of the sphere, and will be sampled for each face in the Voronoi graph. This height map is procedurally generated, using Perlin Noise and Fractal Brownian Motion, typical techniques used in most procedural map generators, including Minecraft. This height map has a single, very important purpose: determining which of the Voronoi faces is land, and which is part of the oceans (or seas or lakes, for that matter).

Random height map imposed on spherical mesh

The fundamental geographical element of a Particracy world is called a Territory. These territories are the level at which population numbers, political views, economic models and eventually warfare will based, in the sense that territories are indivisible. Since the territories will involve quite a lot of information and processing, it’s impractical (both technically and in terms of gameplay) to have tens of thousands of them, as even naming them would be problematic. For a typical world, around 500 different land territories seems to be an acceptable quantity. So, to build up these territories we need to squash a whole bunch of those Voronoi faces together. This is done with a simple but effective algorithm of my own design that (for each landmass) seeds some initial starting points for territories, and then gobbles up neighboring faces in a concentric manner with an ever-increasing range.

Growing territories one step at a time

Once the faces have been logically grouped in territories, some detail is added to their geometry by randomly perturbing the borders. Random noise, used in a controlled fashion, is an excellent tool for adding the appearance of detail where none originally was. This algorithm is still in the works and it doesn’t work quite as well as it has to, so there’s no pretty pictures about that for now.

Since the geometry of the world is true to a spherical coordinate system, with realistic proportions, areas and distances, the data can be projected just like conventional real-world geographical data is treated by a Geographic Information System. This includes making use of web-based map viewing software libraries like Leaflet.

Example of a web-based map view

Just as interesting is that it also permits rendering the world using an Orthographic projection on a 3D world sphere. This is the kind of visualization used to show the world globe maps you see in countries’ Wikipedia pages. Future development could even include a 3D world viewer, but I’m not sure it will work well enough with the volume of data involved.

Example map using an orthographic projection

There are some ideas floating around in my head for adding more actual physical detail to maps, such as rivers or topographical indications, but so far this is limited to ideas, not working algorithms.

Footnotes   [ + ]

1. Actually the Earth is not a sphere, but a shape known as a geoid, flatter on the meridians than on the equator. That’s not a level of detail we’re concerned about, however.

Wouter Lievens

I'm the designer and developer of Particracy, an online political strategy game. I came up with the first incarnation of the game, now called Particracy Classic, in 2005. After several attempted sequel or remake projects over the years, I've finally committed to building the ultimate version of Particracy, and I'm going at it full time to make it happen.


2 thoughts on “Worlds and their geography

  1. hi, I’m a African teenager who has been amazed by the work you have done with particracy classic. I’m super willing to get involve in helping you create the game!! even though I cant financially contribute…, i’m still willing to help you.
    Your work with Particracy Classic was one of the main factors which rose my apathy for politics and I hope that the new Particracy could help much more teen understand the real importance of politics and the need to make responsible choices! Hope that I can be part of your work

Leave a Reply

Your email address will not be published. Required fields are marked *