THE izakaya has a name, but it cannot be published. Its location is a closely guarded secret. Entry is restricted to members—celebrities, media types and otaku, a particularly devoted kind of pop-culture geek. They do not come for the food, though it is excellent, nor for the drinks, which are well mixed. They come for Toru “Chokan” Hashimoto, the Nintendo alumnus who runs the place, and for his friends and their memories. On one wall is a sketch of Pikachu, a popular character in Pokémon games, drawn by its creators when they dropped by. On another is the original sheet music from a classic Nintendo game, a gift from the composer. Front and centre is a drawing of Mario signed by Shigeru Miyamoto.

Mario, an extravagantly mustachioed Italian-American plumber from Brooklyn, is Mr Miyamoto’s most famous creation. He is also the foundation of Nintendo’s fortunes; David Gibson, an analyst at Macquarie Securities, a broker, reckons that his antics account for a third of the company’s software sales over the past ten years. Games in which he features have sold over 500m copies worldwide. His image appears on everything: not just T-shirts and mugs, but solid gold pendants.

At the closing ceremony of the Rio Olympic games, Shinzo Abe, the prime minister of Japan, made his grand entrance dressed as the chubby plumber. Some of the worldwide audience was doubtless bemused. But most, surely, smiled the way that one must when something is both unexpected and utterly fitting. In what better guise could Japan have welcomed the world to Tokyo, venue of the next summer games, than as the world’s most recognised everyman? Eating at a Singapore restaurant soon after, Mr Abe was recognised by fellow diners. Look, they whispered to each other, it’s Mario.

“Donkey Kong”, the game in which Mario first appeared, was born of failure. In 1980 Nintendo, a toy company, was trying to break into America’s $8bn arcade-game market. But “Radar Scope”, the “Space Invaders” knock-off on which the company had pinned its hopes, was a flop. Hiroshi Yamauchi, Nintendo’s patriarch, gave Mr Miyamoto the job of making it into something better.

Yamauchi had hired Mr Miyamoto as the company’s first staff artist three years before. Mr Miyamoto had not been terribly keen on a corporate job. Nintendo had had no need for a staff artist. But Mr Miyamoto’s father arranged a meeting between them, and Yamauchi took a liking to the shaggy-haired young man with a taste for cartoons and bluegrass music.

The first idea for the “Radar Scope” makeover was to draw in the audience by licensing Popeye, a sailor man, to act as the game’s main character. But the licensing deal fell through, and Mr Miyamoto had to invent a new character from scratch. In doing so he had a pretty free rein. The game’s plot—hero rescues girl from gorilla—did not require back story or motivation from its protagonist. Mostly, he just jumped.

Mr Miyamoto wanted his character to be a regular guy in a regular job, so he made him a chubby, middle-aged manual worker—originally, a carpenter. Some design decisions were dictated by the technical limitations of low-resolution displays: the hero got a bushy moustache so that there would be something separating his nose from his chin; he got a hat because hair presents problems when your character has to fit in a grid just 16 pixels on a side; he got bright clothes so they would stand out against the black background.

His name was an afterthought. Top billing on the game was always going to go to the gorilla. (“Kong”, in the context, was more or less a given; “Donkey” was found by consulting a Japanese-English dictionary for a word meaning silly or stupid.) The protagonist was simply called “Jumpman” for the one thing he was good at. But Minoru Arakawa, the boss of Nintendo in America, wanted a more marketable name. Around that time, writes David Sheff in “Game Over”, an authoritative account of Nintendo’s rise, Mr Arakawa was visited at Nintendo’s warehouse outside Seattle by an irate landlord demanding prompt payment. He was called Mario Segale, and he had a moustache. Thus does destiny call.

“Donkey Kong” was a colossal hit. Nintendo had shifted just 1,000 “Radar Scope” arcade cabinets in America; in its first two years “Donkey Kong” sold more than 60,000. Sequels followed, including, in 1983, “Mario Bros.”, in which the game moved to the sewers of New York. Mario traded in his notional hammer for a figurative wrench and became a plumber; he also gained a brother, Luigi.

Let’s-a go!

In the same year Nintendo released the Family Computer, or Famicom, in Japan. The maroon-and-white console, which allowed gamers to play arcade titles in their own homes, was a massive hit. Mr Hashimoto, who joined the company in 1984 (and now runs that secret Tokyo bar) says demand was so intense that engineers from Nintendo’s Kyoto headquarters were sent to stores to help with sales. By 1985 two in every five households in Japan had one.

“He doesn’t do much plumbing, or talk about his heritage”

In 1985 Famicom was released in America as the Nintendo Entertainment System, with “Super Mario Bros.” included in the price. The new game revolved around Mario’s quest to rescue Princess Peach from Bowser, a giant evil turtle. But if the set-up of damsel distressed by unfeasibly large animal seemed familiar, very little else did. The game took place under a clear blue sky at a time when most games were played on a space-y black background. Mario ate magic mushrooms that made him bigger, or “Super”, and jaunted from place to place through green pipes. “Super Mario Bros.” offered an entire world to explore, replete with mushroom traitors (“Goombas”), turtle soldiers (“Koopa Troopas”) and man-eating flora (“Piranha Plants”). It was full of hidden tricks and levels. It was like nothing anybody had ever seen.

Mr Miyamoto called it “a grand culmination”, taking the best elements of gameplay from Nintendo’s other titles to produce something that invited hours of immersion and lots of return visits. Children—and their parents—lost days of their lives inside Mr Miyamoto’s kingdom. “Super Mario Bros.” sold 40m copies and the Mario franchise never looked back; it went on to produce more than 200 games, several television shows and one memorably lousy movie. By 1990 American children were more familiar with Mario than with Mickey Mouse.

In the 1990s and 2000s Nintendo continued to be a profitable maker of games, home consoles and hand-held gaming systems. To begin with, it was highly admired as such. In 1991, the president of Apple Computer, when asked which computer company he feared the most, replied “Nintendo”.

The two companies were in some ways similar. Just as Apple’s operating systems are made available only on phones and laptops that it designs and sells, Mario and his extended family could be found only on Nintendo’s hardware. That strategy, combined with the company’s policy of appealing to the mass market of families and casual gamers—rather than the smaller niche of “hard-core” gamers targeted by its rivals—made Nintendo a big success through the 2000s. But where Apple kept innovating, creating whole new categories of product, Nintendo brought out only one big innovation; its Wii console, released in 2006, which liberated living-room game players from the couch and let them use more than just their thumbs.

The original Wii was a hit. But soon one of Apple’s new categories of product cut the Japanese company’s world out from under it. The iPhone and its successors saw casual gamers abandon dedicated devices for mobile phones. By 2012—five years after the launch of the iPhone and, not coincidentally, the first year in its history as a public company that Nintendo posted a loss—the market for games on mobiles was already worth $13.3bn, about half as much as the market for home consoles and hand-held gaming systems. By 2018, reckons Macquarie’s Mr Gibson, it could be worth half as much again as the market for dedicated gaming consoles.

Nintendo has released only one new console in the iPhone era, the Wii U. It flopped. It has made some wonderful new games, such as “Splatoon”, a critical and commercial success, which came out in 2015. But with console sales sluggish, few new gamers ever encounter them. “Switch”, a hardware offering Nintendo will release in spring 2017, does double duty as a home console and a hand-held device, letting gamers take their games with them on the go. But a glance around the Tokyo metro confirms that the Switch is solving a problem that does not exist: carriages are crammed with men and women staring into their phones, playing “Candy Crush” or “Puzzles and Dragons”.

So Nintendo is changing its strategy. Under Satoru Iwata, who took over from Yamauchi in 2002, the company avoided mobile games on the basis that they were low-quality and their pay-as-you-go model was exploitative of children. But in the summer of 2016 the surprise success of “Pokémon Go”, a mobile game developed by Niantic, an American company spun off from Google, confirmed Nintendo’s previously rather tentative decision to change tack. In a PR master stroke Nintendo sent Mr Miyamoto to Apple’s annual autumn press event to announce “Super Mario Run”, a new game for the iPhone.

This is not the only way that Nintendo is exploiting the value its intellectual property can realise when allowed off the company’s own hardware. Universal will invest $350m in a Nintendo-themed attraction at its amusement park in Japan. Nintendo is once again considering Mario movies.

Not before time. Recognisable characters are one of the most sought-after resources in the entertainment industry: from Hollywood’s superhero franchises to theme parks to video games, a name the public knows is perceived as the best way to reduce the risk of expensive failure. This is especially true of smartphone games. Early on it was possible to introduce novelties, such as “Angry Birds”, an early runaway hit. But competition has got very intense. In 2008, a year before those Angry Birds were hatched, some 250 games were submitted to Apple’s app store every month. Now more than 700 games are submitted every day.

Today the business thinks that success is contingent on familiarity. “Pokémon Go” was a moderately successful game, called “Ingress”, before its creators rebranded it with Pokémon, cute little monsters part-owned by Nintendo. It was subsequently downloaded onto half a billion devices. “Stardom: Hollywood” was a mediocre game about going from wannabe to celebrity until it signed on Kim Kardashian and morphed into “Kim Kardashian: Hollywood”, an instant blockbuster.

Okey Dokey!

In this climate the success of “Super Mario Run” is hardly up for debate. But will it introduce a new generation to the Mario franchise, or simply delight those already familiar with it? Early indications suggest the latter. The game, released on December 15th, is a delightful rendering of the essence of Mario—which is to say, jumping—tailored to the small screen. But at $10, it is comparatively expensive (though there are no hidden extras in the form of in-game purchases). And for now it is also available only on iPhones. Both decisions rule out big emerging markets.

In the 1990s Nintendo’s nugatory presence outside developed countries was no obstacle to Mario’s global charm offensive. Cheap knock-offs of Nintendo consoles made in Hong Kong and Taiwan flooded poor countries, and Mario went with them—often quite literally the only game in town. Now no one with a phone who wants games lacks them; and those who have only ever gamed on phones feel no burning need for Mario. In China, the world’s biggest gaming market, Mario is practically unheard of, says Serkan Toto, a Tokyo-based games consultant.

Phone-based follow-ups to “Super Mario Run” may yet take off; Mario’s charm is not to be sniffed at. But it is of a peculiar sort. “On one level he is very specific: an Italian-American plumber from Brooklyn, America”, says Jeff Ryan, the author of “Super Mario”, a history of the character. “On the other hand he doesn’t do much plumbing or talk about his heritage. He’s just an avatar.” That does not mean you can replace him with any other avatar. He is particular, and distinct. It’s just that there’s nothing to being Mario other than being Mario.

Ray Hatoyama, who led the global expansion of Hello Kitty, a cute, mute cat-like character whose image rakes in several billion yen every year, likens the global success of characters such as Mario and Hello Kitty to the export of rice. It is easier to sell an ingredient to a foreign culture; they can add the spices and herbs to their taste, he says. By contrast fully cooked stories with a specific setting, such as “Doraemon”, set in a Japanese school, are a harder sell abroad. The contexts are too different. If Mario’s plumbing and heritage mattered, he would be a lot less successful. There is one aspect of his context, though, that matters: fun. Mr Abe turned up in Rio dressed as Mario not just because Mario is instantly recognisable around the world. He embodies the delight of play. Talking to the New York Times in 2008 the reclusive Mr Miyamoto explained that people like Mario and his ilk “not for the characters themselves, but because the games they appear in are fun. And because people enjoy playing those games first, they come to love the characters as well.” When “Super Mario Bros.” came out, it was the game that children and adults fell in love with. Mario’s cheerful face on the packaging of its sequels and spin-offs guaranteed further high-quality fun. His success became self-reinforcing. If “Super Mario Run” takes off among phone gamers for whom Mario is a vaguely recognised but arbitrary pop-culture emblem, it will be because it is a really good game.