skip to Main Content

Devlog Map Generation Part 1

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.

Current Final Output

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.

Every white cell will be a starting basis for land in a distance generation algorithm

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.

https://www.reddit.com/r/proceduralgeneration/comments/ifgvc4/thought_you_guys_might_like_my_map_creation_in/

I originally got the idea from reddit user bcrooks234 at this link

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.

On the left is the blended noise that is on the land. On the right is just the part that is over the threshold.

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.

the output image of the Substance Material

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.

left is the output biome Image. Right is the input biome image.

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.

This is the final output of the Substance Material

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
https://discord.gg/z8UXHKS

Shane – Zorlock Studios LLC

This Post Has 0 Comments

Leave a Reply

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

Back To Top