mapgen2
mapgen2 copied to clipboard
How do I increase the number of lakes?
The library works flawlessly with the tips you told me, I managed to rasterize the polygons in C# without issues :) I think i'll use mapgen2 for now, i love the results it gives, but i feel like there are very few lakes How do I encrase the number of lakes generated?
The lakes and oceans are assigned in the same place: assign_r_water. Right now it uses a noise function (fbm_noise), and then when that value is < 0 then r_water[r] is set to true.
You can use anything you want here! :-) In my older version of mapgen2 (written in Flash) I had more options here, including one that formed islands in the shape of my blob logo (see example).
If you want some small lakes you can something like this:
for (let r = 0; r < mesh.numRegions; r++) {
if (Math.random() < 0.1) { r_water[r] = true; }
}
Larger lakes are a little trickier because you'll want to find the neighboring regions and also make them into water.