Meet Clumsy Ninja: A Lovable iPhone Hero Powered by Brilliant AI

This clumsy ninja might just be the richest character we've seen on the iPhone yet. Image: NaturalMotion

Clumsy Ninja is a little bit like Seinfeld in that it’s great even though nothing really happens. The game, which was downloaded a staggering 10 million times in its first week in the App Store, puts you in charge of training an adorable animated ninja in a quaint virtual backyard. That’s it. You don’t fight any bad guys and you don’t rescue any damsels. You just train, slowly developing your ninja’s poise as you bounce on virtual trampolines and practice karate against hanging bags of rice. Basically, you get less clumsy.

It sounds boring, and it would be, if not for the fact that your little ninja acts and reacts with a degree of realism arguably unmatched by any other iPhone game we’ve seen thus far. Pick him up by one hand and he’ll swing in the air, glancing first up at his wrist and then back at you, like, what the hell is going on here? After a while he might kick his legs up in a feeble effort to free himself. When you let him go, he could collapse in a heap on the ground, or catch himself and stagger to his feet, or perfectly stick the landing, depending on the height from which you dropped him and how long you’ve spent honing his chops.

The ninja in all his clumsy glory. Image: NaturalMotion No matter what you do to the little guy–poking, prodding, tossing or teasing him–he responds in some satisfying and often unexpected way. It wouldn’t be a stretch to say that that he’s the richest videogame character yet to grace the iPhone screen.

But the game’s simple pleasures belie an incredible amount of complexity. Clumsy Ninja is the product of NaturalMotion, a British gaming house, recently acquired by Zynga for a reported $500 million, that’s been methodically refining its alternative approach to videogame development for over a decade. Instead of relying on playback animations, where certain controls trigger certain pre-rendered responses, Clumsy Ninja is instead one big simulation, with multiple bits of artificial intelligence overlapping and intersecting to generate unique responses in real time. That paired the immediacy of a touchscreen makes for a uniquely engrossing experience.

That simulation engine is what makes the character feel so real. Getting there was a 12-year journey that included a few interesting detours.

From Tolkien to the Top of the App Store

The decade-plus effort that resulted in the believable joys of Clumsy Ninja started, curiously, in a land of pure fantasy. In January 2004, WIRED covered an ambitious startup that was using AI to create digital stunt doubles for Peter Jackson’s The Return of the King. That young company was NaturalMotion, recently founded by former Oxford researchers Torsten Reil and Colm Massey.

These dudes aren’t programmed to squabble; they’re each just simulations protecting their space. Image: Natural Motion

Today, Reil says the plan was always to apply the technology to games, but at that point, the videogame world wasn’t quite ready. “The consoles back then weren’t fast enough,” he explained in a visit to the WIRED office last month. “We always wanted to do all of this in real time.”

The chance came shortly thereafter, when Rockstar Games tapped NaturalMotion to build a simulation engine for Grand Theft Auto IV. The millions of players who couldn’t help but enjoy the unpredictable results of piloting their cars into innocent bystanders have Reil and company to thank for the pleasure.

NaturalMotion’s contribution, the Euphoria engine, went on to help power games like Red Dead Redemption, Max Payne 3, and GTA V. In large part, its engine is what makes these games feel truly interactive. Instead of walking up to a random character and getting one of five pre-scripted encounters, with Euphoria, each agent is built around a number of parameters and left free to behave accordingly.

What that gives you is a degree of unpredictability. “The reason we think this is so cool is because once a thing is simulated, you get emergent properties,” Reil says. “You don’t just get in what you put out.”

By 2010, smartphones had advanced to the point that they could handle a version of NaturalMotion’s game engine, and early that year the company released Backbreaker Football, a title that stripped the sport down to its barbaric essence: running and getting tackled. Five other titles followed. After that, NaturalMotion released a game where players were put in charge of a highly realistic horse. It was the company’s first free-to-play game; users paid for in-app purchases like tack and saddles. “However silly it sounded, this ended up doing better than all the other games together,” Reil says. It was a clear indication that rich graphics and realistic behavior could get people invested in just about anything.

Following that was CSR Racing, which applied the highly realistic, free-to-play formula to drag racing. Built around a principle that Reil refers to as the “Starbucks line test”–basically that you need to be able to complete one full game session in the time it takes for your latte to arrive–it went on to become the top-grossing game in App Store history, with some 80 million downloads to date. To give you some sense of reach, that’s just about equal to the number of Xbox 360s in existence worldwide.

Clumsy Ninja and the Perils of “Too Realistic”

Clumsy Ninja was, in a way, a return to the NaturalMotion’s roots. It takes over a decade of expertise around simulating physics and behavior and applies it to a single character, instead of just spreading it out among all the little virtual people in the background. It was, as Reil puts it, an attempt to build a mobile game with a star “as rich as a Pixar character.”

One of the reasons the time was right was simply because today’s phones were up to the job. “We thought, there’s so much power under there, we can create much richer experiences–and much more believable characters,” Reil says.

Sculpting the Clumsy Ninja character. Image: NaturalMotion

In developing the game, however, they came to understand that the most realistic behavior isn’t always the best solution.

It’s something NaturalMotion first ran into several years back when they were refining their engine for games like Grand Theft Auto. When we slam into a pedestrian with our car in one of those games, our expectations are shaped by what we’ve seen in the movies. When Euphoria was tuned for realism, and people just crumpled under cars instead of twisting up onto the hood like they do in the movies, it didn’t look especially good. “The same is true for falling down stairs,” Reil says. “If you make it very realistic, which we can do, it doesn’t look realistic. It looks weird.”

In the case of Clumsy Ninja, the problem wasn’t one of physical but rather emotional realism. While your ninja might give you a look of confusion when you hoist him up in the air for no reason, he never gets angry or sad or scared. That was a very deliberate choice.

Torsten Reil. Image: NaturalMotion Early versions of the game that did incorporate some of those negative emotions yielded problematic responses from test users. “We found two types of people, straight away: People who felt sorry for the ninja and people who just wanted to torture him,” Reil says. In the case of the latter group, the more realistic emotional response effectively broke the game mechanic. Instead of helping the ninja improve his skills, some couldn’t resist the urge to pick on him.

Still, even with a preternaturally cheerful disposition, Reil believes the connection players form with the ninja is fundamentally different from what you find in other games. There is some evidence to back him up. On social media sites, amidst a variety of fan art, you can find people posting “selfies” of their ninja, either in-game snapshots of the character or real photographs with the player beaming next to their smartphone’s screen. “It’s been amazing to see the reaction to this,” Reil says. “People think that he’s real.”

That comes down to the way the character is made–not as a grab bag of canned animations but rather a dynamic, evolving entity unto itself. “If you don’t make it simulated, it can never be surprising,” Reil explains. “It’s harder to make it funny. When people play Clumsy Ninja, a lot of people giggle. Because it’s not clear anymore what you’re going to get out of it.” Indeed, when Reil showed off a demo of Clumsy Ninja at an Apple event in 2012, he introduced it not as a game but rather a “next-generation interactive toy.”

Reil hopes to push this concept of simulated, character-driven mobile gaming further. The next step, he says, could include future installments of Clumsy Ninja that let you take your little dude out into a greater game world to put his skills to use. In many ways, this first game was just about testing the reaction players would have to these more unpredictable characters. “We’ve only kind of scratched the surface,” he says, “but you have to take people by the hand to get there.”

It remains to be seen if Zynga’s acquisition of NaturalMotion will scuttle these plans. But as our phones get even more powerful and these simulation engines become even more complex, the possibilities for rich new types of mobile games is wide open. “Sure, we’re still somewhat constrained by performance,” Reil says, “but right now we’re mostly constrained by imagination.”