Skip to main content

How Donut County's hole works

From ontology to physics fakery

Donut County is a physics puzzle game in which you are a hole and you make things fall into you. It’s a sort of reverse Katamari Damacy, in which you grow larger as you make things disappear rather than gather them up, and it was inspired by a 2012 Peter Molydeux joke.

“The idea was originally that you’d just play as a hole and I thought there’s probably some interesting problems there,” creator Ben Esposito tells me. “I also thought it’d be pretty easy. But I was kind of wrong.” As he found out, making a game about being a hole gives rise to all kinds of trouble, including game physics hijinks, human nature, and the surprisingly complex philosophy of what holes are.

To start with, Donut County was his entry to the Peter Molydeux game jam, What Would Molydeux? Made in a hurry, it was rough enough that Esposito didn’t really worry too much about little things like the way objects interacted with the edge of the hole and collided with each other as they fell in.

That would all come later, but the jam game set the fundamentals for the trick the game pulls to deal with the fact that physics engines are fundamentally not really supposed to make holes in the ground. (“It’s the last thing you should do if you’re a physics game,” Esposito says.)

The secret of the hole is that Donut County runs two physics universes at once, the hole’s world and the real one. When an object gets within range of the hole, it stops respecting the normal ground and starts respecting the hole’s physics.

The hole itself is a polygon cylinder with an area of ground all around it, so when the object switches, you won’t notice anything. “And then when you move the hole under it, now it falls off the rim into the hole. It feels like you’re moving this hole in the ground, but it’s actually switching back and forth between these two worlds.”

That’s the concept, anyway. As Esposito implemented it, he soon realised that his implementation was tied to the peculiarly inconstant nature of game physics. “So there’s a lot of duct tape wrapped around everything to try to seal it up.” Esposito laughs, maybe slightly too merrily. “It’s just how it ends up.”

So, for example, there was a time when if you quickly moved the hole away from an object that was teetering into it, the object would tend to explode up into the air or down through the ground. He therefore had to juggle the size of the area that the game considers part of the hole universe and to enforce all the usual bizarre physics safeguards that games need to make them credible.

There are therefore multiple planes of ground to prevent objects from ‘tunnelling’ through it, which is what happens when fast-moving objects move so far within the span of a frame that no part of their mesh technically hits the ground. This is why physics objects in games can sometimes break through solid walls.

Esposito had to stretch more physics rules when it came to creating Donut County’s breadth of scale. You usually start a level at the scale of grass and stones, and as your hole consumes objects it grows, taking you up to the scale of houses. But scale and game physics have an uneasy relationship.

”That was actually one of the big questions I had going into the serious development of this game,” he says. “I found that small objects behaved really nicely and they looked great and fell at the right rates and felt nice and snappy, but as I scaled up, because of the way physics works, every object gets the same amount of force applied to it by gravity, and gigantic objects seem to fall extremely slowly.”

This is the cause of the floaty feel big physics objects in games can have: it’s an issue of our expectation for how big things should fall, and Esposito sat on the choice of how to deal with it for a long time. “Should I fake it? Or should I stand my ground and say that this is how physics works, it’s supposed to fall slowly.” He chose to fake it, scaling up gravity with objects’ size and how large they appear on the screen, aiming for them to behave the same as a tiny object.

“Once I did that, I knew it was the right decision because people stopped making comments about it and started commenting that the physics feels really good, and so I was like, OK, I guess I have to fake more things in this game.”

So, what happens when something falls into the hole? “Well, OK.” Esposito laughs with an ever so slightly maniacal edge again. “There are so many funny things about this game,” he says. “In doing research for it I realised there isn’t a consensus on whether a hole is an object or an object has a condition that is holed. So, is the ground holed when I move to hole to it, or is the hole itself an object?”

He probably didn’t figure he’d get into the ontology of holes when he started the joke jam game. But again he had to make a choice, and he decided that his hole would be an object. It hovers an inch off the ground, because the actual-ground is never taken away when you move the hole over it. Instead, the hole has a portal stretched over it that lets you see through the ground and therefore into the hole. And because the game switches the physics for anything near the hole so it ignores the actual-ground, it falls into it.

So that’s how the hole works. But very quickly, Esposito realised that this solution came with its own problems. Namely, that he couldn’t have hills. Every piece of ground has to be level and at one single elevation. “Because my weird hole is an object.” And thus, Donut County is perfectly flat.

When an object falls into the hole, there are more layers of fixes and fakery to make it fall credibly. That’s because in some levels you get to catapult objects back out of the hole. If they hit objects falling in as they’re on the way out, they’d confusingly fail to launch. So, depending on the angle in which objects are falling into the hole, the collision for objects fall in and shooting out is turned off. The angle is important because you can part-way see into the hole, and it’d be odd to see objects overlapping each other as they’d fall into it.

Despite all this trickery, the hole looks like it behaves like, well, a hole. But another issue remains that’s outside the ontology and mathematics of holes. “The thing that’s still a problem to this day that I’m not going to solve is that people are very impatient,” says Esposito.

He says that in general, players only wait a quarter of a second or so for an object to fall into the hole. “They will move it under an object that’s almost too big and it won’t be tipping fast enough so they wiggle the hole and then it’ll stop falling in and they’re move on and say it’s impossible,” he says. His partial solution is for the hole to gently suck objects to its centre, helping them fall into it.

But that doesn’t help with a related issue, the Wood Plank problem, which relates to the way that you can’t get long and thin objects that are lying on their sides into the hole. “That causes me so much pain,” says Esposito.

If a level has a plank in it and the player manages to allow it to fall on its side before their hole is big enough for it to fall in, they’ll have to restart. Almost every object in Donut County, therefore, is as cube-like as possible. Palm trees, when they’re disturbed by the hole, fall into pieces, and when there are planks and other long objects, it’s only in situations Esposito can entirely predict and control so players can’t get themselves stuck.

“It turned out to be such a pain in the butt,” he says. “I had no idea it’d be such a problem.” And that experience seems to stand for most of what it took to implement the concept, “play as a hole”. Whodathought that a 121-character tweet could contain such complexities. Oh, wait.

Read this next