20. The Digger Emerging

I love this part of the development process. You’ve done your pre-prod, created the pipelines, implemented the basic design and the core gameplay loop has taken shape. Now you’re playing the actual game and discovering that hey, this is a thing and this is really fun! After months and months of preparation, arguments, failed test sessions, stress and self-doubt I find this insanely rewarding. And it is only going to get better.


The most pleasant surprises so far have been combat, the lighting system and the emergent, emerging multiplayer dynamics. I wasn’t sure how combat would gel with our core hack&loot gameplay but it does provide the needed extra spice. And by Jove we accidentally created a monster on par with the Alien in A:Isolation: the dreaded Nautiloid. It utilises mimic mechanics – so yeah, those jump scares are going to scare the living bejezus out of you – but the thing that makes it extra scary is the ranged tentacle attack and the fact that it creeps up on you in the darkness.

Speaking of darkness – the fact is that we got so much mood and content from having the lights off by default. Before commencing your digging, it is strongly advised to find and light up the torch, lest you become nautiloid food. But there might be some hints in the dark that the enfolding light will conceal.

Then there is the run generation, which is online for the first time in today’s weekly build. It’s role is to be a shepherd to our Random Number Generator, also known as RNGeesus. Our mining runs are made of premade chambers, some containing monsters, some are natural and others man-mined. There’s chambers filled with geoides and secrets and others full of gold veins and digging spots. A single chamber can also contain different things depending on the run being generated.


You cannot write a poem just by stringing words in a sequence. Neither can you create a mining run by just randomizing the chambers you will get. No, we will need an overarching idea or a theme for each run, something to make it stand out and stick to the player. This is what the Run Generator does: it basically selects adjectives from a list and uses only the rooms matching those adjectives for a given run.


Instead of a hodge-podge of mismatching rooms, this experiential design enables us to have themed, memorable runs and gives us a mine-load of replayability. I think you will love it.



That’s it for this week. Next sprint we’ll have the second of our EA biomes, the Coral Biome testable in the game for the first time. Exciting times!


-Kharan (Jaakko Asikainen)


Random development quote: Chompystähän me ei olla puhuttu muuta kuin seksuaalisessa mielessä.


Join Cave Digger Discord!


Submit a Comment

Your email address will not be published. Required fields are marked *

MeKiwi Oy

Njetwork Inn
Isokatu 56
90100 OULU

VRkiwi is a trademark owned by MeKiwi Oy

MeKiwi Oy

Njetwork Inn
Isokatu 56
90100 OULU

VRkiwi is a trademark owned by MeKiwi Oy

This week our guest writer is Justus, our code guru and shader wizard. Take it away Justus!

Why bother making cool shaders? Why don’t you just go crazy with post-processing like everyone else?

Because we can’t. With Cave Digger 2 our first target platform is Oculus Quest. Quest is a standalone mobile device, and as such, it uses a rendering type called Tiled Rendering, which is really efficient for most rendering, but causes full screen effects like post-processing to be really slow. These effects will add significant fill-rate overhead and should almost always be avoided. Find out more about how Quest does Tiled Rendering here.

So in order to make fancy looking effects like custom fog, color grading or bloom, while maintaining stable 72 fps on Oculus Quest, we have to make the effects with shaders and particle effects.

But shaders are hard to make 🙁


It’s true that writing shaders can be annoying even if you’re an experience programmer. Cg/HLSL syntax is different from most programming languages. However there is a easier way. The trick is to use a node based editor like Amplify Shader or Shader Graph. You can find plenty of helpful guides and tutorials online. Also Amplify Shader has lots of good example shaders for you to learn from. This allows you to make shaders much faster, however the catch is that the shaders might not be as optimized as they would be if programmed by an experienced graphics programmer

Amplify Shader view of CD2 Gem shader. Cel Shaded lighting and Custom Fog are is done in a custom functions, which makes them more easy to reuse.

So what does it do?

*Slaps the roof of Cave Digger 2 Lit shader*

This bad boy has a custom fog that uses a cubemap for color. It uses a cell shaded lighting that’s similar to Breath of the Wild. It can do triplanar texturing and stochastic texturing.

Also we have a custom Gem Shader for making those loots look shiny and tasty.


How to make it work

To handle controlling the shader settings I created a scriptable object called Atmosphere and also created Atmosphere Manager to manage them

A scriptable object helps to quickly make different atmospheres for different areas. It currently controls the ambient lighting color and fog density.