demon_boy wrote:I've been working on adding volcanoes.
Cool. Ideally you want this to be based on Noise 11 and 12, which determine the occurrence of underground lava. I'm not comfortable with the details of noise functions, but I'm guessing that increasing the scale of 12 (or just decreasing the lava_depth and increasing lava_max_height settings) would bring it closer to the surface. Then you use something like the current lava placement code to locate each volcano.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
if v11 + v12 > 2 ^ (y / lava_depth) and y <= lava_max_height then
Normally, mapgen.lua doesn't even check for lava except in caves, so it won't break out anywhere else, regardless of the noise function. (And if a cave's under a volcano, you want lava there.) Leaving lava_max_height in will let people tune out vulcanism if they don't want any, though we might consider making any change to noise 12's scale based on a setting too (and/or any possibility of volcanoes, but that might be redundant).
I guess after that, we need to decide how closely to monitor the volcanoes. Do we want them to potentially devastate an area (which a player might spawn in) or not?