clock menu more-arrow no yes mobile

Filed under:

How players teach designers about their own procedurally generated games

Video games are much like animated films; every item in every environment is created.

You design every room and every character or item in that room. It’s an act of creation that’s driven by the will of the artists working on the game, and it’s such a deliberate process that it can be rare for the game’s final form to surprise those who worked on it.

"Now, a game like Nuclear Throne is different," Vlambeer’s Rami Ismail told Polygon. "You don't craft the work itself, essentially you're creating something that crafts for you." This is the fun of games that feature procedurally generated levels or multiple overlapping systems: these games don’t just surprise the players, they surprise the people who create the games themselves.

Interaction as instruction

The key to designing a game that can surprise both the player and the game’s creator is to create objects that don't have one use, but a combination of possible interactions and variables. The game doesn’t have a "grenade," it has a physical object with a timer that triggers a "medium explosion" when it touches an enemy or the timer runs out.

There’s also the sledgehammer, which the game sees as a melee weapon which does two damage and adds force to enemies and physical objects. This means that, although these two items weren’t designed with each other in mind, the game already knows how they interact.

"That means, even though we didn’t define things that way, you can hit the grenade with the sledgehammer," Ismail explained. Combine that with a character that can dual wield weapons and you have a potent combination if the player picks up grenades and the sledgehammer. The range of those explosions is increased, and this can impact many other things in the game’s world. None of this was planned, they simply gave the game the vocabulary necessary to figure things out on its own.

After that, it's a measure of exploring everything that's possible, and seeing how it shakes out.

"The more of these things you create, the harder it is to oversee the results. In fact, we’re designing as many of those as we can," Ismail told Polygon.

This philosophy extends to the level creation itself. They use systems called "walkers" that create each level procedurally. The walker is set loose in an area that's made out of nothing but the wall sprite, and it then acts something like a sandworm from Dune. It eats walls, and places enemies, items, and different-sized rooms behind.

The behavior of each walker is decided with a series of these variables in fact, and they "live" for a certain number of steps before they self-destruct, leaving a powerful object or stronger enemy behind. Each level is the work of one of these walkers, but the process is invisible to the player.

This ability to create many different items that interact with each other in many different ways leads to unexpected consequences. A portal appears in each level when you kill the last enemy, sucking up the player and ending the round. It also vacuums up nearby items, and the game also includes a car as an item that blows up if it gets sucked into the portal. Ismail noticed that players were getting pulled into the portal along with the exploding car, killing them instantly.

The team may not have planned that, but they kept it in. After all, it’s your fault for killing what could have been the last enemy near a car. "So suddenly for the player the rule becomes 'don't shoot an enemy that MIGHT be the last one near a car' or 'destroy every car on sight," Ismail said. This wasn’t a planned mechanic, but now it’s a part of the game.

"We ended up defining 'unfair' as an unwinnable situation that isn't a result of choices by the player," he said. Everything else is, literally, fair game.

"The more of these things you create, the harder it is to oversee the results. In fact, we’re designing as many of those as we can"

Paul Morse is the co-founder of Hopoo Games, the creators of Risk of Rain. He also talked about the complexity of the game working in unexpected ways.

"There are 100 different items, and the most surprising things you get are the combinations of different items," he said. "When we programmed it, we didn't really know ‘this will work with this.’ There are so many combinations."

I pressed him for examples.

"There is an item in the game that increases your move speed. When you get this item, it’s a pretty common item, once you get that and another item that once you touch enemies it infects them, the quicker you move the more enemies you’re going to infect," Morse explained. "There’s another item that sets the ground on fire wherever you walk." If you put these items together you're able to run around the level, setting the enemies on fire. You become a font of fiery death.

That wasn't planned, and it wasn't designed. It's just another manifestation of the game's systems working together in unexpected ways. These games aren't the carefully planned rollercoasters you see in many scripted first-person games, but a tool that often allows creativity on the part of the audience. You don't just play the game, the game plays back. It can often feel more like a conversation than a lecture.

"As a software designer, the rule of thumb is anything the player can do, they will," Celia Pearce told Polygon. She’s an associate professor of digital media at Georgia Tech, with a focus on emergent behavior. "Whatever affordances you offer them during the design of your software, they will push it to whatever extreme it can be pushed to. That’s a factor of skill and creativity."

This is why things like speedruns and the fabled "eggplant run" in Spelunky are so interesting, and why the design philosophies of games like Nuclear Throne can be so fulfilling to players: you don’t just get to "beat" the game, you get to master it, and perhaps even show the people who created it something they didn’t think was possible.

<iframe width="853" height="480" src="//www.youtube.com/embed/LGrPeu5NWk0" frameborder="0" allowfullscreen></iframe>

"Once [players have] mastered the game, then they want to master the system," Pearce said. "Players learn the rules of the game as its presented to them, and then they try to figure out what’s going on with the underlying software." Finishing the game is only the first step. Mastering is much, much harder.

Derek Yu, the designer of Spelunky, is delighted by these perversions of what "should" be possible in the game.

"Really, it was a combined effort by the Spelunky livestreaming community to figure out how to make the impossible possible, making use of glitches and plain ol' creativity," he told Polygon. "I love that kind of stuff. Makes the game feel bigger than what we originally designed."

Sign up for the newsletter Sign up for Patch Notes

A weekly roundup of the best things from Polygon