About Sub Biomes

In the last @Allie stream, she talked and guided us through some early concepts of sub biomes, small pieces of land that stand out from the rest of the biome, like the below example of an oasis for a desert.

I want to talk about this from a implementation point of view. Consider this more of a suggestion than anything else.

One way I imagined this is using noise maps.
The biome generation file would have a section where noise parameters are set, and a link to another biome generation file.
Something like this for its json:

	"sub_biome":{
		"noise_map_settings": {
			"octaves": 3,
			"persistence_ratio": 0.1,
			"bandlimit": 2,
			"aspect_ratio": 1
		},
		"generation_file": "file(oasis_generation_data.json)"
	}

When the game loads the files and starts creating the world, it will do only in the portion of the world not affected by the noise, and when it finishes, it will load the second biome that was linked in it and fill the gaps with it.

For a visualization of the above:
The main biome is generated as usual, using its main generation file:
screenshot 2017_09_26__16_54_24

Then, the biome gets the noise set for the sub biome. A noise map can be visualized as a black and white “cloud” image, where dark areas has a meaning and white has another. Lakes, trees, plants, are all generated this way. For trees, it will place trees one the areas that are dark and not on white areas.
Here we force it to pure black and white with no gray between for easier use and visualization:

The sub biome is loaded and generated from the linked generation file:
screenshot 2017_09_26__16_56_32

But only for the black areas of the noise:
noise3 > sub

Resulting in this:
screenshot 2017_09_26__16_54_24 > complete

Of course, a temperate biome inside the desert doesn’t make sense, it was just so I had a visual representation to show the example working. It should be a proper “oasis” biome with the correct features of such a biome.

This would be extremely powerful, specially if there is some recursion in it. Like a biome call another as a sub-biome which could call another as its own sub-biome. Such as A containing B that contains C

10 Likes

Hmm…temperate right into desert doesn’t make sense, but if there was a transition area like Desert Transition Temperate (Multi biome map) in between the desert and temperate areas that would work.

See you were already ahead of the game with that one. :jubilant: That should net ya some sorta “Visionary” title lol.

BrunoSupremo Visionary Worldbuilder

Good post! :slight_smile:

Throw some more image processing on that pure black and white noise (like this) to give each black spot it’s own color (or one of a few available) and you can use it to add more than one type of sub biome without the risk of overlap.

You should probably blur the edges of the spots a bit afterwards to make a smoother transition. Especially if the sub biome needs it’s own height map. Only blur them inside the edge of each spot though. If you blur them so that the spot expands then spots of different colors might interfere with each other and… at least right now I can’t think of an easy way to handle the transition from one color to another in a good way. If you just round the color to the nearest biome color then you will still get a sharp transition between them.

Cheers! :beers:

This idea makes a lot of sense; and as you say Bruno it’s a pretty robust system. One of the really nice things about it is that the frequency of the noise can be easily adjusted for different needs – e.g. for oases in the desert the frequency would be pretty low; but in the forest biome there might be a high frequency of swamp areas.

It would also be a great lead-in to dungeons – certain dungeons can only generate within certain sub-biomes, so instead of there being dungeons scattered randomly around the map there would be a little bit more inherent narrative to them. For example, varanus nesting caves can only appear in the rock formations sub-biome of the desert, so we know where to go looking for them and also where to avoid if we don’t want to deal with them.

2 Likes