Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make cave liquids biome-determined #2358

Merged
merged 1 commit into from May 18, 2019
Merged

Make cave liquids biome-determined #2358

merged 1 commit into from May 18, 2019

Conversation

paramat
Copy link
Contributor

@paramat paramat commented Apr 19, 2019

Attends to part of #2339
Reasons for the distribution are discussed there.

Previously, cave liquids were determined by the engine hardcoding which is:
Biome-independent.
50% of caves are flooded. Chosen randomly per-cave.
Of those, 66% have lava, the rest water. Chosen according to 3D noise with spread 150 nodes.
The engine mapgens also have a default mapgen setting which keeps lava below y = -256.

Now, cave liquids are determined by biome, using the new 'biome defined cave liquids' feature of MT 5.0.0.
As before, 50% of caves are flooded, this part of engine hardcoding is still applied.
Consistent with the engine mapgen setting, lava is kept below y = -256 by only being present in the "_under" biomes. This prevents lava being too easy to find and keeps it suitably deep.

@Ezhh
Copy link
Contributor

Ezhh commented Apr 19, 2019

I agree with no lava in the upper biomes, but I'm not sure I like having a fixed liquid per biome in this manner. I feel the default behaviour is preferred for _under biomes unless there is a specific special reason to limit it to one type (for example, an underground fire cave biome should obviously choose lava and you might not want any water in it, but why would grassland only ever have lava under it, or savanna only ever have water?).

@paramat
Copy link
Contributor Author

paramat commented Apr 19, 2019

Yes these are things i have thought too, as i mentioned in the issue. The main reason for biome-determined cave liquids is because biome-defined features are so much more preferential to engine hardcoding, which gives me the creeps.

So how about this: I could add an engine feature where, if multiple cave liquid nodes are defined in a biome, each cave randomly chooses from the list? Then we can have water and lava everywhere underground but this time not hardcoded.

@paramat
Copy link
Contributor Author

paramat commented Apr 20, 2019

minetest/minetest#8481
On it already.

@Ezhh
Copy link
Contributor

Ezhh commented Apr 22, 2019

Okay, I'd support that on the game side so long as the mixing between liquids doesn't get stranger as a result.

@paramat
Copy link
Contributor Author

paramat commented Apr 22, 2019

The distribution of multiple biome-defined liquids will be slightly different from the engine hardcoded behaviour, this is unavoidable as 'random choice from list' has to be used instead of distribution by 3D noise (which can only cope with up to 2 liquids).

Each entire cave will randomly choose a liquid from the biome-specified list. The current hardcoded 3D noise distribution has a spread of 150 nodes, which is similar to the distance between caves, so behaves similar to random choice.

No longer use the hardcoded engine cave liquids.
Water only in '_ocean' biomes, water and lava in '_under' biomes.
@paramat paramat removed the WIP label Apr 28, 2019
@paramat
Copy link
Contributor Author

paramat commented Apr 28, 2019

PR updated to specify water and lava in deeper biomes.
Can be merged once minetest/minetest#8481 is merged.
EDIT: Merged.
Adding Ezhh's approval given in #2358 (comment)
Approved by SmallJoker in IRC http://irc.minetest.net/minetest-dev/2019-05-18#i_5545702

@paramat paramat merged commit aee5ba6 into minetest:master May 18, 2019
@paramat paramat deleted the biomecaveliq branch July 19, 2019 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants