Holes are the simplest thing on WRECK's mountain to play and one of the hardest to draw. A hole has to read instantly as "don't go here" from 100 metres away, at speed, on a small screen. Here's how we draw them, and what we got wrong along the way.
How the game knows there's a hole
The mountain isn't a solid 3D model the snowball bumps along. Instead the game keeps a table of how high the ground is at every metre of the trail, and the snowball rolls on that table. A hole is simply a patch of it where the ground is infinitely far down. Roll onto it and there's nothing to hold you up.
What you see is drawn separately, as a ribbon of snow laid over that table. Most of the work on holes is about making the picture and the table agree exactly, so that the edge you see is the edge you fall off.
Three rules
Every hole, of every kind, has to follow three rules at the same time:
- A hard edge. The trail ends in a clean cut, with no fade and no soft edge. If the edge is soft you can't judge where it is, and judging where it is is the whole game.
- A strip of snow past the cut. Just past the edge there's a one-metre band of snow before the drop. It's there on purpose, and it's one of the details we protect whenever we change anything near a hole.
- No sky, ever. You should never see sky through a hole, around its rim or between the hole and the trail, from any angle or distance. A flash of sky where there should be snow breaks the picture instantly.
The tricky part is that fixing one rule can easily break another. Close up the snow strip to hide a sliver of sky and you've broken rule two. Soften the edge to hide a seam and you've broken rule one. Any change to holes has to keep all three.
Bottomless
A hole should look like it goes down forever. If you can see a floor, it looks like a shallow dip you could roll out of. So the inside of a hole isn't lit like the rest of the mountain. Each wall starts at the top in the same colour as the rim and fades down into a deep, dark colour. The floor is that same dark colour, so there's no line where the walls meet it, and your eye reads it as depth with no bottom.
The fade happens down the walls only, never across the trail. From above, the edge of the trail is still a hard cut; the darkness starts below it.
The fix that made it worse
At one point, thin slivers of sky were showing at the corners of some holes. The quick fix was to add extra pieces of snow over the gaps: small caps and strips placed exactly where the sky showed through. It hid the slivers, and then the extra pieces started overlapping each other and showing up as stacks of black rectangles around the holes. We removed all of it and fixed what was actually causing the gaps.
That became a rule for the whole game: when something looks wrong, find the cause and remove it. Don't cover it up with more pieces. Covered-up problems always come back.
Sky through the trail
The same approach fixed a bigger bug. On long runs, past about 4,000 metres, players could sometimes see sky through the trail itself. The cause was timing: the snow for a stretch of trail was sometimes drawn before the game had finished working out the ground height for all of it, so small pieces were left out with nothing under them. Making sure every 50-metre stretch has all its heights before its snow is drawn took the number of missing pieces from about a quarter of a million to zero.
Different holes, different sizes
The holes you steer around are all the same size for the whole run, so once you've learnt to judge one, you've learnt them all. Crevasses and jump gaps are different: they grow the further you go, because they're meant to get harder. See jumps, gaps and crumbling bridges for how to cross each kind.