Biomes and their generation within?

Well hello there, JGO!

This month I am doing stuff and experimenting on level generation. I am currently using Perlin Noise as generation for the landscape and it just looks like Perlin Noise (obviously)… So I am searching all about a biomes on the internet. On JGO there are no “good” posts about Biomes and generation, you are only able to find to-do lists like:

[quote]To-Do list:
-Biomes added.
[/quote]
So I started to search on google, but every topic about Biomes are modding-topics for MineCraft… After some time I found some good posts: How do MineCraft biomes work? and Voronoi diagram.

But the first link is more like how to do it right without a tutorial on how to do it.
And the second link is about the Voronoi Diagram. I can’t see, how I can generate rivers (small/streched) and oceans (big/not streched). Because If you use this methode you can only make biomes from the same length?

So my question is: What would be a good methode for Biomes (and their generation in the biomes)?
As you can see my English isn’t that good, so I do not understand the Voronoi Diagram fully.

I already thank you for reading this post!
-RoseSlayer

My way of generation of 2d map:

  1. generate heightmap using simplex noise
  2. place basic, height-based biomes (sea, mountains and null - the last one for all future biomes)
  3. generate lakes (check random points, “fill” them with water, if lake is big enough and not too big apply changes to map)
  4. generate rivers (check random points, use A* alghoritm without end point - first reached tile with sea/lake will generate river - use height as heuristics)
  5. generate temperature and rainfall
  6. generate another biomes to replace null biome

A* can generate really good rivers very fast. :slight_smile:

Oops, forgot to say that it was 2d. Thanks for the answer It really help me (and maybe others that are using the searchbar on JGO). Thanks for helping me. I know what to do and now can do some work again!~

-RoseSlayer

I recommend this library for simplex noise: https://github.com/matheus23/Utils. :wink:

How is it possible to generate lakes? I can generate a single point good, but how can I make multiple points? They are also made “on the fly”, so I can’t edit them because that will give an error if I try to edit a tile with a higher x, y… and because I am making them “on the fly”, I can’t generate with: generation = new Random(this.seed);, because if I visit other chunks first, they have the generation.nextInt(1000) <= 1… So it will only work If I walk 1 direction. :confused: any suggestions? generation = new Random(this.seed + x16 + y16) works fine…

-RoseSlayer

Just generate a few points around the center of the “lake”. You could use the radius to generate a smooth lake shore, or you could you use radius and a random number to add/subtract to the radius to generate rough shores. Personally, I would create a temporary list of these point and assign an idea according to when they were generated, so like “p1, p2” etc… So then you could just use the Pythagorean theorem and connect the point in order. “p1” to “p2”… Then delete the points and fill in the lake by using two for loops for the x and z axis. The water should then fall and fill the z axis. That’s how I would do it, I don’t know if it wouldn’t work for you however.

In my generators I often use rule “fill everything around selected point if altitude of this points is lower than the starting one”.

Great idea, I will implement some pieces of this, probably I am now going to make somesort of this…

The only problem in my generation script is that the flat land is always on the side of a hill… So evrything will flood entirely if I am making a lake on the top of a mountain? the height is always “climbing”… (still using Perlin Noise, because I am lazy :P)

-RoseSlayer

I made a perlin Noise to generate the temperature and rainfall, but there is a low chance it reaches 100%, my code for perlin Noise is:

int temperatureNoise = (int)(noises.get(1).noise(x/(biomelength*3), y/(biomelength*3)) * 100) + 50;
int rainfallNoise = (int)(noises.get(2).noise(x/(biomelength*3), y/(biomelength*3)) * 100) + 50;

What is a better way to make a biome better (And I want to have a feature where u can change to times u will come across this biome. Lets say: I want 20% chance to get a desert and 1% to get a swamp. Is there a good way I can implement this in the rainfall and temperature generator?