Starfield’s Giant Pile of 20,000 Potatoes, Explained by Game Developers
Starfield’s Giant Pile of 20,000 Potatoes, Explained by Game Developers

Last week, a Starfield player stuffed 20,000 potatoes into their ship’s cockpit, then attempted to close the door. The clip went viral, with awe-struck reactions from players and game developers alike.

But we weren’t just impressed at the audacity of someone going through all the trouble of gathering that many potatoes. Digital Foundry’s John Linneman called the clip “mind-blowing” because all of the potatoes “have physics.” But what does it mean for something to “have physics”? Why is everyone fussing so much about a pile of 20,000 tumbling potatoes in a game about being a cool space explorer?

We spoke to a number of game developers to get their insight on what’s really going on in the potato clip, why more games don’t let players do this kind of thing, and whether or not 20,000 tumbling potatoes really is as impressive as it seems.

20,000 Potatoes Under the Engine

Nikita Luzhanskyi, an Unreal Engine developer at Pingle Studio, gave me a detailed rundown of what happens when two objects collide with one another in a game. Here’s the super duper basic version of it: In real life, where physics are simply happening at all times. But in virtual spaces, computers take time to calculate all the physics happening to all objects at any given second. So the more potatoes (or whatever else) you throw into the mix, the more calculations need to be done, and the more complex things get.

“When they say that a game has 60fps, this means that in one second the game engine must process input data from the player, apply it to the game world, calculate the interaction of objects and systems in the game, and render the image on the screen,” Luzhanskyi explains. “And it must do all this sixty times in a second. When we talk about the physical interaction of objects in the game world, we must always remember that the more objects there are, the more checks the engine must do to get the result of the interaction. But this is a double-edged sword. On the one hand, we want to get the most realistic result, which will require a lot of calculations, but on the other hand, we are limited by the frame rate because if we go beyond the upper limit, the game will start to slow down and players don’t like that.”

Luzhanskyi goes on to explain that because computers operate with time intervals, or processor ticks, it’s necessary to use multiple algorithms to calculate the movement of an object between those ticks, with each object moving a small distance at each interval depending on factors like acceleration, speed, and possible collisions.

“For thousands of objects in one tick, you need to calculate the position of all of them, for each pair of objects, check whether they intersect, and if they do, push one out of the other. However, if one object was pushed out of another, then there is no guarantee that when pushed out it did not end up in another object, so you need to check the intersection between objects several times. Because of this, it turns out that in order to achieve a realistic collision of hundreds and thousands of objects, it is necessary to write code that would work quickly enough and produce a realistic picture in one frame.”

Luzhanskyi’s explanation to me was even more complex than that, and I tried to simplify it for this piece, but if you need an even simpler one, here you go: More potatoes = more math per second = more engine and computer power needed. And it does need both. Luzhanskyi notes that while much does come down to the computational power of an individual’s PC or a console, modern game engines are doing a lot of work on their own end to drive realistic physics simulations. And he adds that it takes a lot of developer work to fine-tune those engines to get the desired result, especially in a situation like this where very few players are likely to encounter the exact situation.

What Could Possibly Go Wrong?

So, we’ve got 20,000 individual potatoes in a big pile all crashing into one another, the floor, and a moving door. Meaning that if any of the calculations Luzhanskyi describes are too slow, or off in some way, then suddenly the 20,000 potatoes are doing weird, funny physics glitches. But that’s where the brilliance of the Starfield clip lies. The potatoes could be exploding, or flying off into space, or rapidly vibrating, or doing some other non-potato-like behavior. But instead they’re tumbling gently around like, well, potatoes.

“It’s impressive because whilst a lot of those potatoes look stationary, they will all actually be simulating physics at all times,” says Liam Tart, lead artist at Unknown Worlds. “Traditionally, lots of physics objects being very close together like that should cause a lot of ‘bouncing’ as each potato collides with the potato next to it, so I’d expect all of the potatoes to be jumping around and wobbling slightly. However, they seem to be very still, and only move when the door opens. It’s also pretty impressive to have 20k+ potatoes all being simulated at once, and not have the framerate drop substantially.”

Megan Fox, founder of Glass Bottom Games, was especially blown away by the giant potato pile and helped me understand all the different things that could have gone wrong here. Speaking to IGN, Fox starts by walking me through the difference between CPU physics and GPU; in short, CPU physics run on your computer and are generally better for more interactive simulations where the player is involved. GPU physics, on the other hand, run on the graphics card and tend to be better for self-contained things that just need to look cool, like fancy particle physics, or raindrops. It’s easier to have lots and lots of GPU physics going on at once, because they (mostly) don’t need to interact with other things. But CPU physics are harder to pull off on a large scale.

This is why 20,000 piled-up potatoes in a Bethesda game could easily go wrong: all 20,000 potatoes need to use CPU physics, because Bethesda “actually cares about potatoes,” Fox says.

“Potatoes can f*ck with player movement,” she explains. “Potatoes can block your movement. It is important that you always know exactly where every potato is, so you can point the camera at it, and throw up the little context UI that says ‘Potato <press A to pickup>,’ and all the stuff related to them each being logical entities tied to specific pieces of loot with specific properties and interactions. If you wanted to throw the potatoes into GPU physics, you’d need to be ok with just fire and forgetting 100,000 potatoes into a room that the player can’t directly interact with other than by walking through them and having them bounce out of the way like packing peanuts.”

Havok Physics – which Starfield uses for its physics engine – historically has been especially good at CPU physics simulations, and specifically good at something called “depenetration,” according to Fox. Depentration, she explains, is what happens when you take a potato, and then spawn another potato in the exact same spot. If depenetration is good, the second potato spawns neatly and stays in the right spot. But bad depenetration can result in collisions exploding, or when the potatoes “gain sudden instant infinite velocity and fling themselves around like poprocks.”

Good “stacking behavior,” Fox continues, requires many different elements to be working together within a powerful physics simulation to ensure that sim knows just what to do with 20,000 potatoes.

“The problem is that, all the time in a stack, everything is slightly sinking into each other. The box on top, every frame, will sink (very slightly) into the thing it’s sitting on, due to gravity. Each frame, you then correct the collision back up, so it remains sitting on top of the box, and nobody is the wiser,”Fox says. “But if your physics engine has sh*t depenetration, well, you’re probably not always going to get a perfectly smooth result there. It’ll add a bit of extra force. Now imagine you have 10,000 potatoes all crammed together, and you can imagine how the whole thing might start to look like a pile of popping popcorn kernels, right?”

Basically, Fox says, it seems like Havok is really, really good at making lots of objects interact like this. She adds that most CPU sims she’s used to working with would “melt down” if there were that many potatoes in one spot, meaning this is either a newer or better version of Havok than she’s used to, or…maybe there actually aren’t 20,000 potatoes there at all!

Wait, what?

Part of Fox and my discussion on the subject happened over on social media site Bluesky. While it was going on Dan Johnson, senior game designer at unrelated development studio Big Blue Sky Games, chimed in with an interesting observation: what are these big lumps?

“Is the engine consolidating potatoes below the surface?” he asks. “Did the player bulk up the pile with sacks or something so they didn’t need quite so many potatoes? We need an investigation.”

Fox doesn’t think it’s sacks, because the texture is identical to the potatoes, but doesn’t have a good answer for what the giant lumps are doing, either. “[It] makes me wonder if, yes, the engine is doing some kind of weird bulking-up of proximate objects. But why would you make your engine do that? It would only be relevant in cases where players dropped 3,000 of one specific thing. Which is rare? It would be very, very funny if Bethesda included a specific-case optimization for ‘the idiot baby-man who decides to drop 30,000 cheese wheels in one place’, though. I’d LOVE for that to be what happened here.”

Two-Minute Spheres

While Fox, Johnson, Tart, and Luzhanskyi were all at least duly impressed by Starfield’s potato physics, Alex Ward, Alex Veal, and Phil Maguire were a little less star-struck. All three of them work at Three Fields Entertainment Limited, the studio behind Dangerous Golf and upcoming open world driving sim Wreckreation. Their work history perhaps explains why a pile of 20,000 interacting physics potatoes is somewhat of an everyday phenomenon for the trio.

“What piqued my interest about this a bit – and it’s not that impressive really – is that that is exactly how all those amazing water simulations that you see online work but on a much more microscopic scale – so every single particle of water is simulated like that – that’s why it looks like such a fluid thing pouring out of the door. So in terms of impressive-ness – the water simulations you see, lots of them use the same sort of tech and they are a lot more impressive because there are MILLIONS of things in them whereas that’s a few hundred.

“And if we want to blow our own trumpet for a moment, we used some of that smoothed particle hydro-dynamic stuff in the PC version of Dangerous Golf to make the paint spills that sloshed onto the ground, walls and screen!”

As they chat, Maguire opens up Unreal Engine and starts trying to make something similar. In two minutes, he manages to make a pile of 378 spheres that tumble and fall realistically at between 40 and 60 fps. Not bad for a two-minute editor demo.

But Maguire also admits that he’s amazed by the “sheer number of things” in the Bethesda clip – 400 spheres in an editor is one thing, but 20,000 potatoes in-game with everything else in the ship? A slightly taller order, and one worth praising.

We’ve previously written about all the different elements of video games – working doors, moving platforms, teeth, and so forth – that seem simple from the outside but are really quite complex. While piles of 20,000 potatoes may not fit the bill of “seems simple,” the very fact that someone can pick up a potato in Starfield from one place and put it somewhere else automatically opens the game up to this much more complex possibility that developers have to account for.

Sure, Bethesda could have made potatoes despawn after a certain number of them were dropped, but given its community’s history with cheese wheels, the 20,000 potato outcome was probably inevitable. Hats off to the Starfield developers for literally making every single potato count.

Rebekah Valentine is a senior reporter for IGN. Got a story tip? Send it to [email protected].

About Post Author