Dig, Cubby, Dig!

← Blog

How the water came alive

A forest lake in cross-section: a wavy surface, slanting sunbeams in the water, seaweed on the sloping bank and a small school of fish

In October we took on the water. We wanted the lakes in the game to feel alive: to react to everything that falls into them, to look like water when you're under the surface, and for underground lakes to light up their caves instead of vanishing into the dark. It's all been in the game since October 20. Here's how it works, and no math, we promise.

Waves made of springs

Imagine the surface of a lake as a long row of tiny springs, one for every pixel. Each spring wants to get back to the calm water level, and it tugs on its two neighbors as it goes. Push one, and it pulls its neighbors, they pull theirs, and waves run off along the lake both ways. They reach the bank, bounce back, and slowly settle down: in about a second and a half, a wave drops to half its height.

And just about anything can push the water:

  • a fish leaping out and splashing back in;
  • raindrops;
  • drips from stalactites in the caves;
  • the stream of a waterfall;
  • and Cubby, of course. Dive in and a ring spreads across the water: the faster he was going, the bigger the splash. Swim along the surface and a little wave runs ahead of him.

So that a lake never turns into a storm, the waves have a ceiling: they never rise more than a few pixels. And if the camera looks away from a lake for a moment, the waves don't vanish: the lake remembers them for a little while longer.

Seeing through the water

Underwater, everything sways a little: the seaweed, the fish, Cubby swimming, the lake bed and the cave rock behind it. We don't wiggle every fish separately. Instead, one "lens" lies over the whole picture: wherever there's water, it nudges pixels sideways, always by a whole pixel, so the picture stays crisp. Right at the surface the swaying fades out, so the waterline stays exactly where the waves put it. The bank and everything above the water stay still: the lens only takes pixels from the water itself, so nothing gets smeared.

In the daytime, sunbeams break through the surface. They slant down and fade with depth, and each beam brightens and dims on its own, as if a wave were passing over it. At night there are no beams, and none in the caves either: where would the sun come from?

Seaweed

Seaweed grows on the lake beds and sways in the water. In the forest it's green, by the oases of the desert it's olive, and in dark underground lakes grows a pale seaweed strung with glowing beads.

Seaweed isn't kept in your save. Every time, the game looks at the world and decides where it grows: only in a lake the world started out with, only on the land's own ground (never on a block someone placed), and only where there's enough water over it. So if you drain a lake, the seaweed disappears, and when you fill it back up, it grows again.

And from the cave roof over underground lakes hang glowing vines, strung with beads of light too.

Underground water glows

In a dark cave, water could easily be the first thing you lose sight of. So underground water glows by itself: a sea-green haze fills it, and the edge of the surface shines as a bright line. That way the lake lights up the cave instead of hiding in it.

Where a lake sinks down into a flooded grotto, the glow doesn't switch on all at once: it fades in bit by bit as the rock roof closes in overhead.

An underground lake: a waterfall pours from a spring stone in the cave roof, the water foams at its foot, and glowing vines hang from the ceiling
A waterfall from a spring stone

Waterfalls from spring stones

The roofs of some caves hold Spring stones, which no drill can break. Waterfalls pour out of them: a see-through ribbon with bright edges and pale streaks running down it, faster and faster as they fall. At the bottom the water churns, lumps of foam heave up and melt away, and the waterfall keeps rocking the surface of the lake. Waterfalls glow a little too, so you can spot them from far away.

The bed of an underground lake: glowing seaweed with beads of light, the shadows of fish, and the foam of a waterfall up above
A glowing lake bed

Deeper caves

The back wall of a cave used to be one flat sheet. Now there are two more layers of rock in front of it: a near one with ledges and shelves, and a far one with great masses of stone and dark bays between them. They're drawn with the same pictures as the game's real blocks, bevels and chipped edges included, just darkened, and the farther back a layer is, the darker it gets. A cave now reads as a real hollow that stretches back into the dark.

The shape of these layers comes from the world's seed: in the same world, a cave always looks the same, however many times you come back.

Water is protected now

So that all this beauty can't drain away because of one careless drill, lakes, underground rivers and waterfalls are now protected. The water the world was made with, plus two tiles around it (the bank, the bed and the roof), can't be dug with a drill or with dynamite, and you can't build there either. The game will tell you: "We don't dig by the water — it would run out". You can still cut down trees on the shore, except the ones a quest needs.

Head to the nearest lake, dive in and watch the waves for yourself!

Play