Tectonic

Tectonic

10M Downloads

Mountians being unfun in gameplay.

HeartOfChains opened this issue · 6 comments

commented

Mountains as is provide an incredibly boring gameplay experience as they currently stand. The way that they generate is very clearly standard perlin noise, climbing them is quite painful and building anything cool on them is near impossible requiring massive landscaping endeavors to build on a slope.

The solution to the issue of gameplay unfriendly mountains is to have it so regions of the mountain are flat. This is to allow players to build bases. It would also make the process of climbing a mountain more streamlined, as they'd just be able to make a stair case from one layer to the next. In contrast to this, when you have to climb a mountain in the mod you've got 2 options, awkwardly carve a staircase into the slope. Or awkwardly stack stack blocks under you across the entire face of the mountian.

Now I'm using krita to make this so the math i use to describe it won't be exact to the image shown.
I'm also assuming the function being used to generate terrain looks like the code below. (I've taken out the multiple layers of noise for convince)

-- noise will be assumed to start at 0 and end at 1 for ease of reading.
Height = Noise(X,Z,Seed) 
if Height > NoMountiansAllowedBelowThisHeight then
 Height = Height+((Height-NoMountiansBelowThisHeight)^3) 
end
if Voxel Y< Height then
 Voxel.Full = true
end

This code should end up looking something like this, tall, exponential mountains, with a gradual slope at the base.
image

Generating flat area's.
Now in order to produce flat area's a simple solution would be to round the height value to, whatever multiple you'd like. Which would produce a banding effect across the mountain, meaning as you make your way up it it would take place in steps. However this banding would be quite ugly if left on its own.
So after that would be making it so that the layering doesn't occur everywhere equally, and also across a spectrum of different heights so that you can't obviously see bands circling around mountains.
In order to achieve this you'd could use 2 layers of noise. (May be able to use a pre generated noise map to speed things up. like how some games render clouds.)
The first layer of noise is used to determine if the area should be rounded or not
This layer of noise would be mostly either 1 or 0 with some area in between for smoothing.
image
The second layer is for figuring out what the offset is.
image

In code so it's hopefully more understandable then my yapping.

Round(NumberToRound,ToPlace)
Height = Noise(X,Z,Seed) 
RoundingMap = Noise(X*20,Z*20,Seed) 
OffSetMap = Noise(X,Z,Seed) 

RoundingMap = Clamp(RoundingMap*Stepness,0,1)
OffSetMap = Round(OffSetMap , 0.25)

if Height > NoMountiansAllowedBelowThisHeight then
 Height = Height+((Height-NoMountiansBelowThisHeight)^3) 
 if RoundingMap > 0 then
  RoundedHeight = Round(Height+OffSetMap,)-OffSetMap)
  Height = Lerp(Height, RoundedHeight, RoundingMap-0.2) -- Minus 0.2 so that some of the mountain's original slope remains. 
 end
end
if Voxel Y< Height then
 Voxel.Full = true
end

Which would end up looking like this
image

As you can see it's got some issues around the tops of mountians where the strong rounding ends up cutting off peaks. In order to avoid this you can get the slop of the voxel to determin if it's on a peak and if it is then you'd decrease the amount the hight is lerped by.

Height = Lerp(Height, RoundedHeight, RoundingMap-0.2-(1-Slope)) -- if it's got an extreme slope then it'll be more impacted 

compared to if it had a less steep slope, ie at the top of a mountian. (This implimentation MAY not work because I AM dumb)

The final result should look like this
image
Which would have plenty of places to build on and would be less painful to climb up as you'd be able to make a staircase from layer to layer, instead of a staircase up the ENTIRE mountain.

Oh on another note for making your mountains not look like straight perlin noise. I'd recommend this video, it's great for making mountains look more natural.
https://www.youtube.com/watch?v=gsJHzBTPG0Y

At the end of the day it's whatever floats your boat since it's your mod and if you'd rather it be pretty then having a good gameplay experience then pretty, but useless mountians is how it will go.

commented

I looked through the source code and it should be possible. If you'd be able to to give a quick rundown of how to test the source I might be able to work on the issue myself. Then you can merge if you see fit.

commented

I've been aware of the gameplay issue for awhile now but have been rather hesitant to act upon it given there are thousands upon thousands of worlds that rely on the terrain shaping.

I have my own separate solution to this issue I hope to roll out in a beta soon: reintroducing vanilla's staircasing/"lerping". It creates smaller flat areas but still mostly keeps the shaping intact, leading to minimal chunk borders.

Current version (2.4.2):
2025-01-03_15 53 42

Beta version (will probably be 2.5??):
2025-01-03_15 53 54

commented

Looks amazing!
If you need someone to play test the new update I'm willing to sink a few hours in to get a feel of the terrain

Imo having plains be more smoothed out is aesthetically nicer then having them be "lerped" as you put it. Also with the mountains the staircasing feels, too thin to be able to build on the flattened regions. They appear to be < 10 blocks wide making it which impractical to build there. (Maybe increase the amount of height between each stair so that each step is larger?)
I'm unfamiliar with the term lerp being to refer to stair casing, I guess minecraft's code just gets groovy like that.

commented

If this is implemented, will it be toggleable in the config file? I quite enjoy the current terrain and would like it if it was an option rather than a requirement

commented

I've been aware of the gameplay issue for awhile now but have been rather hesitant to act upon it given there are thousands upon thousands of worlds that rely on the terrain shaping.

I have my own separate solution to this issue I hope to roll out in a beta soon: reintroducing vanilla's staircasing/"lerping". It creates smaller flat areas but still mostly keeps the shaping intact, leading to minimal chunk borders.

Current version (2.4.2): ...

Beta version (will probably be 2.5??): ...

That looks great, personally I love this! Would be great to see lerping as a config option sometime soon, so I can have a look in-game myself :)

commented

I personally dislike the Vanilla "lerping" as well, it makes for something that looks far too stepped for my tastes. On mountains I don't mind it, but it makes terrain out of mountains very... blocky? rigid? in a way that I don't feel is flattering. A config option or some way to have it only apply to mountain "biome areas" would be truly lovely.

In terms of gameplay issues I also rather like that it makes mountains less buildable? It gives an incentive to tunnel in mountains rather than building as you would in other places that are flatter. The minimally-lerped 2.5 beta option shown also feels about the same way to me, like it makes mountains less reasonable to build in, in a way I like.