Jump to content

Tiered caves and a deeper underground


Recommended Posts

Caves are important in the identity of Vintage Story.
In the lore of Vintage Story, the people retreated into them when the surface became uninhabitable for them.
At the time the player arrives, only ruins and temporal instability are left, bringing with it drifters.
The caves are now a place of unbeknown dangers, becoming stranger the deeper you venture.

Well, that is at least what I gathered from the bits and pieces of lore I encountered and it clearly tries to build up a lovecraftian horror atmosphere.
For the gameplay component of it, there is this idea of stronger drifters spawning deeper down. This sounds like a fine concept,
but there is a fundamental flaw with it: Further down is really relative with how random the cave depth is caused by the cave generation.
So there is no clear tiering happening, as a cave might lead straight down to bedrock or might be limited to near surface.
So the player can't really choose to venture deeper, the tiering system kinda falls apart, as any cave could be anything.
Even if a cave goes through multiple depth layers with multiple drifter tiers, there is still the issue of the player not
knowing how deep he has gone, as judging vertical distance underground is really difficult and using the coordinates feels really unimmersive.

I therefore suggest the implementation if tiered cave generation. The idea is to have multiple layers of caves, which don't vary a lot vertically.
The upper layers are connected with lower layers by distinct vertical shafts, like they already exist in the current world generation.
A shaft never skips a layer, so it can't go from surface drifter caves straight to nightmare drifter caves, it has to connect two
adjacent layers/tiers, so only surface drifter to deep drifter, deep drifter to tainted drifter, etc.

Tiered cave generation, while being less realistic and more gamey, fits the tiered systems of VS much better in my opinion.
It provides a clear progression and makes caves more like dungeons, where the player clears a tier and then can decide to go deeper.
Not every cave system would encompass all tiers and therefore go down to the nightmare drifter level, but most cave
systems would go down at least three levels, so to the tainted drifter, only few to nightmare drifter depth.
Translocators would teleport the player into a different system and a layer deeper than where the original translocator was found.
They might even be the only way to access layers deeper than the nightmare drifter level.
cave systems that don't start on the surface level and are there very unlikely for the player to discover might be connected via translocator for example.

There is however one problem with this approach: The underground is not deep enough for five cave tiers.
Since 255 blocks is the recommended world height, the sea level is 110 blocks.
That leaves each cave tier with a width of 22 blocks. The average cave segment in VS right now seems to be five to six blocks high,
but even caverns and segments up to 20 blocks tall aren't unheard of nor uncommon.
This would leave very little room for vertical variation in  the cave tiers, which leads to very flat and boring caves.
Then there is the additional fact that there needs to be some space separating the different tiers,
I'd suggest at least 10 blocks to highlight the transition in tiers, but 20 blocks would probably be better.

So what is the solution to this problem? A higher default world height? That would mean much slower terrain generation,
much more RAM required and much higher data amounts servers have to transport.
Also much less detailed looking terrain generation and more noticeable terrain generation artifacts.

When looking for solutions, we first need to know how the chunk system in VS works. Chunks in VS are cubic, 32 by 32 by 32 blocks.
Does this mean we could easily have infinite world depth/height? Well yes, but actually no.
The world generation system heavily relies on generating chunk columns. Chunk columns are vertical stacks of chunks,
going from the bottom of the world to the top, like the chunks in another well known block building game.
Terrain is generated one chunk column at a time and changes to this basic concept would require a whole new terrain generator.
Furthermore, chunk columns are used as a convenient chunk storage format and for transferring chunk data between client and server.

The solution: Underground dimension(s)
So what did Minecraft do when it wanted "deeper caves"? It created the nether, a separate dimension with its own chunks.
Vintage Story could do the same, have the underground be essentially a differently generated world relying on the existing
chunk column infrastructure already in place. The main difference would be that there would be no magic portal,
the dimension would be seamlessly reached by just digging down or going through a cave.
Going near the underground would load a few chunk columns directly beneath the player, entering the underground
would load more underground chunk columns around the player and unload surface ones, except a few directly above the player.
Since the underground offers much lower visibility than the surface, the loading distance could be significantly smaller.
The "world height" for the underground dimension could also be reduced when there would be multiple underground dimensions,
allowing even greater performance and lower RAM usage.

Lets say we have three 128 block tall underground dimensions. That would easily allow for six cave tiers, two per dimension.
Furthermore, the generation on the surface doesn't have to provide much or any dedicated underground at all,
allowing for a lower sea level and much more terrain height variation.
When a seamless transition would proof to difficult to implement, using the translocator as a portal would alternatively also work.
This implementation of a deeper underground would also mix very well with the idea chunk column offsets (and a static sea level).

  • Like 3
Link to comment
Share on other sites


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.