Procedural Generation for Diplomacy Maps
- 1 minReturning to Maps
WebDiplomacy is a great open source gaming project. It basically creates an online platform for playing the Diplomacy board game, something that has been played by mail since the 1960s. It is a very simple and elegant game that provides a sometimes brutal introduction to the game theory concepts of cooperation and betrayal.
In the past I had my own server that I set up to play with coworkers during the pandemic. I even created my own Game of Thrones variant
I was recently on the road and had the idea to return to it, but with the question of what would be involved in generating fairly balanced random maps.
Diplomacy Random Map Editor
Compared to my last attempt at random map generation, I tried to keep things lightweight and relatively efficient.
The main steps were:
- Generate perlin noise
- Smooth/Modify with a gradient
- Set the water level dividing into water and land
- Place cities, using a minimum distance that they must be apart
- Calculate the actual territories off of the city placement, using the landscape to determine boundaries
- Create players, assign them territories
- Place supply centers
The most fun was coming up with the gradients, which are sort of the flavors for each map type.
Radial Map
Mediterranean Map
Spiral Map
“Flat” Map
And of course:
Custom Image Map
The silliest is probably the ability to build a random map off of an imported image. This allows the creation of some rather cursed variants.