Add biome-specific ocean height and relative ocean height - #3427
Add biome-specific ocean height and relative ocean height#3427MrPiedPiper wants to merge 7 commits into
Conversation
|
Known issue: if an ocean is 128+ blocks above a surface block the ocean can be cut-off by a cave biome (e.g. sky). I figure I can/should make that a separate change. |
|
Should close #570 |
…he z position and the surface block
|
Apparently that did not in-fact fix walls not forming right... I'll get that fixed up. |
Yes. Ideally all points on the map, instead of indexing the biome directly should index a palette of biomes, which could contain the base height of the biome and its biome seed (#431). If you want to go for this, I'd suggest to make a separate PR for this. |
…mit relative oceans to 32 height.
|
I've updated performance info in the original post 👍 |






Changes:
oceanHeight,liquidBlock,isOceanRelative,relativeOceanGap, andrelativeOceanOffset.Ocean features:
relativeOceanGap, with offsets available usingrelativeOceanOffset. This is best used for small pools, as happening to aligning with biome height for deeper oceans is not likely.isOceanRelativePerformance:
I tested performance on master vs this update in 5 different newly generated worlds.
I started each world, waiting until generation finished, and noted the average time.
Most recent implementation
Featuring 6 test seeds instead of 5!
Master:
Seeds 0, 1, 2, 3, 4, and 5 average time: 479196.862656112
This update:
Seeds 0, 1, 2, 3, 4, and 5 average time: 479150.0882511663
-0.01% added time to generation (probably just randomness at work, honestly.)
This update with more extreme settings applied to all biomes for a stress-test (
oceanHeight20,isOceanRelativetrue,relativeOceanGap3,relativeOceanOffset7)Seeds 0, 1, 2, 3, 4, and 5 average time: 876749.7865698625
82.97% added time to generation
This update with more tame settings applied to all biomes as a comparison point (I forgot to note the settings, I'll run tests again and update this post. I think it was 3 ocean height applied to all biomes, forgot the other settings 😕)
Seeds 0, 1, 2, 3, 4, and 5 average time: 651547.8004061362
35.97% added time to generation
Original implementation
Master:
Seeds 0, 1, 2, 3, and 4 average time: 468451.1438742311
This update:
Seeds 0, 1, 2, 3 and 4 average time: 472425.7381765770
0.85% added time to generation
This update with more extreme settings applied to all biomes for a stress-test (
oceanHeight20,isOceanRelativetrue,relativeOceanGap3,relativeOceanOffset7)Seeds 0, 1, 2, 3 and 4 average time: 542972.4462500415
15.91% added time to generation
Code used for benchmarks copied from BoringOrng here:
This was placed into the top of
TerrainGenerator.zig'sgeneratefunction.