- Home /
2d tilemap with biomes and perlin noise
Hello everyone, I am trying to generate a tilemap with biomes. There would be for example a snow region, dessert and forrest.
My first approach was using a Voronoi diagram. But the result looked weird and unnatural.
My second solution was the perlin noise, which had better results. But the problem is that perlin noise is normally used for height maps. For 2d tilemaps the results would look like the example below.
The problem here is, that the water would be always surrounded by sand, and the sand by grass, which would not make sense with biomes like snow and dessert.
Does anyone know how I can change my perlin noise implementation, so it fits my needs, or is there a different approach which works better?
Thank you all for your help :)
I try to do something similar, might you please share what you did to get that map? perlin noise? What library do you use or what code?
I think what you have there is akin to a height map with water low height sand a middle height and gras high? It is pretty normal that you have a middle height between low and high for a desert as example you can just change the values to have have the middle height to the same tile as the high.
Answer by DaSpikeyBoss · Nov 05, 2019 at 08:47 PM
Hey there, I was looking for pretty much the same biome generation effects you seem to need. I found that what you want to do is to generate two or more perlin noise map and use them to generate your biomes.
For example you might generate temperature and rainfall maps. Then you would test both to find your biomes. Say you want any temp below 0.1 to be a snow biome, maybe if temp is above 0.9 and rainfall is below 0.05 it's desert.
Check out this site I found for more info on generating biomes and just maps in general: https://www.redblobgames.com/maps/terrain-from-noise/
Hope this helps.