One afternoon last fall a Reddit user with the handle “FranktheShank1” was enjoying a new video game on his PlayStation 4. The game, Super Meat Boy, was considered a classic among gamers since its debut in 2010, and its release for Sony’s newest console had been highly anticipated. After playing Super Meat Boy for an hour FranktheShank1 reported that it seemed to be delivering the desired effect. “I’m already throwing tantrums and curling my toes,” he wrote on Reddit. “I forgot how rage-inducing this game was.” The post then devolved into a string of all-caps curse words.

Many popular video games are challenging. But why would players seek a game whose reputation seems largely built on frustration? The gaming press describes Super Meat Boy as “a definitive work in the subgenre of brutally difficult platformers,” but casual games like Flappy Bird and strategy games like the Dark Souls series are infamous and addictive for the same reason—they’re superhard. These games seem to defy the normal rules of motivation and engagement—but on closer examination, they’re not exceptional at all. Insights from psychology and computer science can illuminate the conditions that transform frustration into satisfaction (and vice versa)—which may help us design better ways to engage people in challenging tasks outside gaming.

Legendary computer scientist and educator Seymour Papert once quoted a student describing the experience of learning Logo, the educational programming language that Papert co-created: “It’s hard. It’s fun. It’s Logo.” The concept of “hard fun” neatly encapsulates the experience sought by many players of Super Meat Boyand other ultrahard games. Psychologists call it “intrinsic motivation”—the urge to make progress toward a goal without the promise of an externalized reward. In other words, if you find yourself doing something regardless of whether you’ll be paid, acknowledged or otherwise compensated in exchange for doing it, you are intrinsically motivated.

Flappy Bird, which went viral in early 2014, pushes the logic of intrinsic motivation to its limits. The goal is never in sight: the obstacles are randomly generated (so learning to anticipate their structure is impossible) and endless (there’s no way to “beat” or finish the game).

Credit: FlappyBird

Video games—which combine the opt-in interactivity of play with the programmatic constraints of a controlled lab experiment—have become a powerful tool for psychologists interested in understanding intrinsic motivation. University of Rochester psychologist Richard Ryan, who in 1985 co-created “self-determination theory,” one of the dominant frameworks for understanding intrinsic motivation in humans, has studied video games for decades. “Gaming became interesting to me when it burst forth in the 1970s and 1980s because a lot of people were becoming intrinsically motivated not just to play video games, but also design them,” Ryan explains. “In any good video game, the designers have intuitively picked up on important principles of motivation and found a way to apply them.”

According to self-determination theory, these principles boil down to three domains in which humans experience universal psychological needs: autonomy (the urge to be the cause of one’s own behavior or choices); relatedness (the urge to connect with others and identify with a group); and competence (the desire to control or influence the outcomes of one’s behavior). The basic interactivity of most video games confers significant autonomy on a player, and the modern integration of many video games with social media easily satisfies the need for relatedness.

Instilling competence, however, can be tricky. Hold the player’s hand too much and she disengages out of boredom. Ask too much of her too soon and she quits in frustration. Most hit games, from Candy Crush Saga to Call of Duty, find a balance by easing players up the learning curve with early levels that act as self-guided tutorials for mastering basic moves and controls.

A potentially “rage-inducing” game like Super Meat Boy—intended by its creators as a rebellion against mainstream game design’s tendency to “replace [difficulty] with accessibility over all else”—actually follows the same playbook but compensates for its punishing learning curve by magnifying other competence-building features. These include providing positive feedback (even grisly deaths become “fun” via an instant replay feature), quick restarts after failure and keeping the goal in the player’s sight at all times. According to psychologist Jamie Madigan, author of Getting Gamers: The Psychology of Video Games, such tactics help players maintain an engaged “flow state” despite their setbacks.

The Sword-in-the-Stone effect

Other legendarily difficult games, like the 2014 viral hit Flappy Bird and its countless imitators, leverage what game designer Jesse Schell calls “The Sword in the Stone effect.” “Everybody wants to be able to pull it out. Nobody can, but they try anyway,” he says. “That notoriety goes a long way.” This effect of invoking players’ needs for competence and relatedness also drives the appeal of niche console games like the Dark Souls series, whose sophisticated play controls appeal only to expert gamers. Last month a player made news in the online gaming world for completing Dark Souls without taking a single hit from an enemy—the video-game equivalent of pitching a perfect game in baseball.

Still, The Sword in the Stone effect has its limits. “If you bang your head against a wall too many times, you’ll quit,” Ryan says. “So there’s got to be some kind of expectation that you can break through, that it’s possible if you work or think or practice hard enough.” Sure enough, the Dark Souls series has earned praise among gamers not for simply being hard but for “build[ing] an experience that delivers tribulation and triumph in equal, gratuitous measures,” as the gaming journalism site Polygon.com effuses. And while promoting the latest iteration of the series, Dark Souls 3 (slated for worldwide release in April), creator Hidetaka Miyazaki told a U.K. fan site that he “want[s] to keep both the possibility of accomplishment and the difficulty itself…. I think seasoned players will feel refreshed and enjoy new strategies. And for new players, I want to make it difficult, of course, but accomplishable and enjoyable.”

Ryan says this unique kind of intrinsic motivation registers in two parts of the brain at once: Activity in the lateral prefrontal cortex designates “cognitive engagement”—the mental stimulation that accompanies problem solving—while activity in the bilateral striatum shows that “reward circuits are firing,” he explains. To paraphrase Seymour Papert: It’s hard. It’s fun. It’s Dark Souls 3.

Hidetaka Miyazaki, creator of the forthcoming title Dark Souls 3, told play-mag.co.uk that he wanted the next installment in the notoriously difficult series to be "possible to accomplish." Above, a screen shot from Dark Souls II.

DARK SOULS™II & ©2015 BANDAI NAMCO

Constraint satisfaction

Meanwhile, Paul Schrater, a computer scientist who studies intrinsic motivation and learning in the psychology department at the University of Minnesota, has a different theory—and fun has nothing to do with it. “Our brains are designed to be very complex constraint-satisfaction machines,” he says. “We’re goal seeking, and having a goal means defining a constraint on an outcome. Satisfying that constraint can involve a whole path toward the goal that’s unenjoyable, like climbing a mountain to reach food or safety. Achieving the goal involves releasing the goal, which is satisfying—but it’s a peculiar kind of nonhedonic kind of satisfaction.”

To Schrater, a person playing Dark Souls or Super Meat Boy is not motivated by the pleasure associated with competence. Instead, it has more to do with autonomy: the mere act of setting and releasing constraints in a specific behavioral context is inherently motivating. Dopamine, he says, acts as a “monitoring molecule” for “maintaining competence” in a goal-seeking behavior. So whereas a Super Meat Boy player may experience a dopamine-driven sense of mastery on satisfying the constraint of completing a difficult level, “if he screws up, dopamine signals that, too,” Schrater explains. “In that case, the intrinsic motivation might be to switch out one learned behavior for another” in order to maintain competence in pursuit of the goal.

This motivation theory could explain some peculiar aspects of sustained engagement with frustrating or unpleasant game experiences. For example, NYU Game Center professor Bennett Foddy--whose own intentionally maddening game, QWOP, has inspired a cult following--describes how players of the game The Legend of Zelda: Ocarina of Time often repeatedly execute a move called a “roll” in order to transport their character across tediously long distances. Rolling is no faster than walking but “it’s an expression of agency, and that’s a reward in and of itself,” Foddy says. “Why do people push the button on the end of their ballpoint pen over and over again? Because you hear that little click sound. Just the fact that you made something happen is a motivating thing for human beings.”

The future of hard fun

All of these findings may help video game designers develop more engaging products, but the implications for understanding intrinsic motivation extend beyond gaming. “I wish we would take this seriously in schools,” Ryan says. Much like Super Meat Boy offsets its challenging game play with unlimited lives and instant replays, Ryan believes that lowering the penalty for making mistakes in the classroom could spark more intrinsic engagement from students. “It’s a motivating device because you’re more willing to try again,” he says.

Schrater is aiming his research efforts at “quantifying curiosity” as a factor in motivation. “I think it’ll help us understand people who really like to solve puzzles or engage in natural information-seeking behavior that’s not task oriented,” he says. “It’s highly predictive of the sort of people who become Wikipedia editors or scientists.”

Meanwhile the steady progression of technology offers new opportunities for learning about motivation. Virtual-reality game systems like Oculus Rift, for example, are already challenging game makers’ assumptions about how to engineer “hard fun.” “We’re finding that in virtual reality, people don’t like that slow ramp” of tutorial-like challenges to build competence, says Schell. “They seem to much prefer a very difficult ‘cliff’ that they have to confront and deal with. They love that it’s so hard. And I have to say, right now I don’t understand why that is.”

That hasn’t stopped Schell from trying: His latest virtual-reality game is called, appropriately enough, I Expect You To Die. “Doing game design is much more like cooking than it is like chemistry,” he says. “Long story short: human psychology is complicated.”