

This will compute some kind of low energy triangulation of the space, with each point “linked” with the closest ones. From these points, we can compute the Delaunay triangulation. For it to be random, we first need to create a number of random points. This is where polygonal maps shine in my opinion: instead of a regular division, you obtain a random polygonal division of space.Īs explained above, polygonal maps start with a polygonal space division. While this fits Civilization gameplay very well, it does not make for very realistic maps. All this is good and well, but hexes and squares are regular polygons, and so whatever you do, no matter how much noise you put into the boundaries, the underlying tile will remain, and you will guess where the hexes or squares are: even if you take a look at Civilization 6, the hexes are apparent. The idea is similar to what one would do with hexagonal maps or tile map: you divide the space in a number of polygonal regions, hexes for the first, squares for the second. In order to build a polygonal map, we need first need polygons. Feel free to check the entire web site, he has got lot’s of great information on game development! Dealing with polygons I will try to sum up what I understood from Amit on each step, however I would suggest you to go check on Amit’s page first if you feel lost. In the following, I will describe how I implemented each steps of the algorithm. The second part deals with the map part of it. Of the above steps, the first 4 are actually linked: this is actually the beef of the polygonal part of the algorithm.

Generate map features (land, water, elevations, biomes, …) based on an island generation function.Extract a graph from the Voronoi diagram and the Delaunay Triangulation.The idea behind Amit’s algorithm is quite simple: I will try in this series of post to make it happen in Unity. The quality of the rendering and the apparent simplicity of the method got me thinking: what if we could make it happen on Unity? So I decided to start on a quest to do so.įurthermore, why make a simple 2D map with biomes, roads and all, when you can use this information to build a full fledge 3D map ? Some time ago I stumbled upon a post from Amit Patel on random polygonal maps generation.
