This is our first write up of the Game that we are working on, in this log I am going to be walking through the process that I am using to make a procedural 2D tabletop RPG map. Our goal for this map generation is for it to pseudo procedurally output a map to be used in a 2D tabletop game, it will take in several user inputs during the generation process that will drive the final map.
All of the art right now is currently just placeholder art so that we can kind of get a feel for how it will look, while one of us works on the generation part the other is working on the final art pieces for the generation. So without further ado, I will discuss the techniques that I used to get this far.
My map generation starts out with a 16×16 pixel image, that allows the user to turn pixels on or off depending on where they would like the general shape of their landmasses to be.
These white cells get passed into a voronoi/distance generation where it is upscaled from a 16×16 image to a 2048×2048 image. this is done by filling an array of size 16×16 with random positions, then iterating through the x and y of an array of size 2048×2048. for each index it checks position that was randomly generated in the first array using the same index, and if the combined distance of the x and y it sets that index as land otherwise it ends up being ocean.
The next step is to use some blended noise to create land elevation( will use this for river generation at some point) specifically to generate where the mountains will be placed. I personally just used a compute shader I wrote that generates multi fractal noise and ridged multi fractal noise then multiplies them together then blends them with another instance of ridged multifractal. Then I check to see if it is on the land and if it is over a certain threshold. That gives me my Mountain map.
The mountain map is then passed into a substance material that I made and it outputs an image to show you what it will look like so far.
I then overlay a new Image to generate the biomes, I mostly do this the same way that I generated the continents to begin with except my input image will be 32×32 so that you have better control and placement. I give the user a few colors to designate biomes. Once they have laid out where they want each of their biomes it goes through the same voronoi/distance function to output a biome map.
I use this to generate a white and black map for each of the biomes where if it is that certain biome that pixel is white otherwise it is black. I pass each of the maps into a substance that I made that will generate the biomes into a nicer looking map.
As of right now that is as far as I have gotten, I plan to keep you guys updated as I progress through this project, so feel free to keep checking back. I will probably make a post at least once a week, but at the very least once I add in a new feature.
My goal for my next couple of additions currently is rivers and polishing up some of the rough edges.
Until that time if you are interested in following our progress or you would like to ask questions about anything we post feel free to join us on our discord
Shane – Zorlock Studios LLC