Super Mario Bros. 2’s long, strange trip to the top of the charts in 1988 began with a prototype video game that failed miserably.

The 8-bit classic, which became a massive hit for the Nintendo Entertainment System, grew out of a mock-up of a vertically scrolling, two-player, cooperative-action game, Super Mario Bros. 2 director Kensuke Tanabe told Wired.com in an interview at this year’s Game Developers Conference.

The prototype, worked up by SRD, a company that programmed many of Nintendo’s early games, was intended to show how a Mario-style game might work if the players climbed up platforms vertically instead of walking horizontally, said Tanabe.

“The idea was that you would have people vertically ascending, and you would have items and blocks that you could pile up to go higher, or you could grab your friend that you were playing with and throw them to try and continue to ascend,” Tanabe said. Unfortunately, “the vertical-scrolling gimmick wasn’t enough to get us interesting gameplay.”

The rapid-prototype development process on display here informs Nintendo’s design philosophy to this day. The company doesn’t begin development with characters and worlds: It starts by making sure that game boasts a fun and compelling game mechanic. If it’s not perfect, Nintendo has no qualms about throwing it out.

Soon after he was hired by Nintendo in the mid-’80s, Tanabe sat down with his boss, Mario creator Shigeru Miyamoto, to look at this prototype together.

“The game was mocked up (so that) when the player climbed about two-thirds of the way up the screen, it would scroll so that the player was pushed further down,” Tanabe said.

The game-design team led by Miyamoto was tasked with coming up with a game that used this trick of programming. But Tanabe and Miyamoto weren’t too hot on the concept.

While the prototype featured two players jumping, stacking up blocks to climb higher, and throwing each other around, the technical limitations of the primitive NES made it difficult to build a polished game out of this complex action. And playing it with just one person wasn’t very fun.

“Miyamoto looked at it and said, ‘Maybe we need to change this up,’” Tanabe recalled. He suggested that Tanabe add in traditional side-scrolling gameplay and “make something a little bit more Mario-like.”

“As long as it’s fun, anything goes,” Tanabe remembers Miyamoto saying.

You may already know the rest of the story. The Mario sequel was originally released in Japan as Doki Doki Panic, starring a wholly different cast of characters. The game released in Japan as Super Mario Bros. 2 was a totally different game, a set of super-difficult new levels built with the original game’s engine and graphics.

That title wasn’t released outside Japan. Instead, Nintendo used Doki Doki Panic, swapping the game’s characters out for the Mario cast. This was the game that Western audiences knew as Super Mario Bros. 2.

Since it was developed by the Mario team, Doki Doki Panic’s colorful world, catchy music and gorgeous artwork fit in well with Nintendo’s star characters. But some purists felt the gameplay wasn’t what they wanted out of Mario: They were used to stomping on enemies to flatten them, not picking them up and throwing them around, a small but fundamental change that gave Mario 2 a significantly different feel.

Although the initial concept for the game had been scrapped, the development of that original two-player cooperative prototype inspired all the innovative gameplay of Super Mario Bros. 2, Tanabe said.

“Picking up blocks was the same thing as pulling out vegetables from the ground,” he said. By the same token, picking up the other player and throwing him turned into picking up enemy characters.

Doki Doki Panic was actually part of a deal with the Fuji corporation, in which Nintendo would produce a tie-in videogame for a media-technology expo called Yume K?j?, or “Dream Factory.” The mascot characters invented for this expo were the stars of the game.

“I remember being pulled over to Fuji Television one day, being handed a sheet with game characters on it and being told, ‘I want you to make a game with this,’” Tanabe said.

Released in 1987, Doki Doki Panic was one of the biggest hits on Nintendo’s Disk System, a floppy drive that worked with the Japanese version of the NES. Since this hardware was not released in America, many Disk System games were ported to standard game cartridges for US release.

“Because we had to make this change, we had the opportunity to change other things” about the game, said Tanabe. “We knew these Fuji TV characters wouldn’t be popular in America, but what would be attractive in America would be the Mario characters.”

Tanabe’s team made many improvements to the original for its American debut, adding more enemy characters, throwing in some visual nods to the Mario games and greatly enhancing the animation and sound effects.

Because one of Mario’s most notable features at the time was his ability to grow and shrink when he ate magic mushrooms, this was added to the game. But the implementation was not without its issues.

“When the characters got shrunk down to a smaller version of themselves, it was easy to sneak through parts of the level that you weren’t supposed to go through, so we made their heads bigger so they would get caught on those things,” Tanabe said.

The enhancements to Super Mario Bros. 2 were so great that the game was eventually brought back to Japan, retitled Super Mario USA.