I'm creating a little terraria-like 2D side-scroller game with TypeScript. Currently, I divide parts of the world into biomes, which each have their own properties (flat, mountainous terrain, etc.). I am using a one dimensional Perlin noise to generate the height of the terrain for each biome. Currently this is a problem for me because the borders between biomes are not at the same height. How could I make the transitions between biomes smoother?
Conceptually, to transition between the 2 biomes smoothly, you need 2 biomes and a transition weight. That is, you do not choose between just one of them, but generate both and interpolate between their features (such as height, temperature, savagery, etc). The weight used to interpolate is also generated (preferably with a (relatively) smooth function), therefore you'll need to sample 3 different noises at once and do some math over the values.
Notice a smooth transition, despite the biomes' differences in maximum height and height variability.
For properties that can't be interpolated, a value may be selected based on a threshold. For example, in many games a biome type is a categorical value, it has to be either one or another, not something in between. In that case, a simplest approach is to choose a biome with a biggest weight.