Nintendo was hemmed in on both sides and in deep trouble.
The company's Wii U video-game console, an effort to add a small, semiportable screen to the hit motion-sensing Wii, was a flop. And Nintendo's handheld consoles, descendants of the legendary Game Boy, were suffering as people opted to play games on smartphones instead.
This was in 2014, the year the Japanese gaming giant recorded its third consecutive annual loss, a setback that followed decades of profitability. Critics called for the company to reboot its hardware, or perhaps reduce the emphasis on its own devices by bringing beloved characters like "Super Mario" or "Zelda" to smartphones.
"You gotta either go back and do something that's more (traditional) consolelike, or go forward and do something that's all motion, like the Wii," said Phil Spencer, the head of Microsoft's Xbox gaming business, describing the prevailing industry opinion at the time.
"And they didn't."
Instead, Nintendo doubled down on its effort to build a console that combines mobile and living-room gaming, developing the Nintendo Switch.
So far, it has been a wild success. Nintendo has struggled to make enough devices to satisfy demand since its launch in March, and at the E3 trade show here earlier this month, Nintendo had a bit of its swagger back.
Spencer's Microsoft is trying to pull off a similar rebound. His team is going back to the roots of the Xbox business: pushing the boundaries of the power you can pack into a gaming machine.
The company's Xbox One X, unveiled at E3, is - as Microsoft's marketing mantra repeated constantly - the most powerful console ever made, aimed at hard-core gamers who want every bit of graphical realism they can get.
Microsoft and Nintendo had taken a similar path: Facing speculation that they would have to reboot or rethink their video-game businesses to respond to rival Sony's dominance, they instead doubled down on what makes their devices stand out.
The competition to sell living-room video-game consoles is among the oldest battlefields in video gaming, dating to the emergence in the 1980s of Atari and Nintendo devices that plugged into television sets.
This market has seen competitors come and go, but a pattern has remained remarkably steady. New devices tend to come out in waves every few years, "generations" in industry-speak, adding each company's take on the latest technological advances.
When Sega dropped out of the market in 2001, the contest winnowed to three primary entrants: Sony, Microsoft and Nintendo.
The current generation began in 2012, with Nintendo's Wii U. Sony's PlayStation 4 and Microsoft's Xbox One followed a year later.
Sony, with a hardware package that was easy to use for both game developers and consumers, and a laser focus on drawing the best games, quickly took a wide lead.
In Tokyo and the Seattle area, Nintendo and Microsoft plotted their response. Microsoft's campus in the Seattle-area city of Redmond is adjacent to Nintendo of America, the Japanese company's subsidiary for the Western Hemisphere. Nintendo, which set up shop in Redmond a year before Microsoft came to town in 1986, sold Microsoft some of the land that became its campus during one of the company's growth spurts.
Far more ground separates the two corporate cultures.
Microsoft, which helped put a computer on every desk with Windows and today runs a sprawling business-software empire, got into gaming at first through experiments in entertainment CD-ROMs. Dabbling in encyclopedias turned into computer games that pushed the boundaries of PC hardware and highlighted the power of Windows.
The company's dive into consoles began when some leaders in the Windows unit worried that Sony's popular PlayStation would conquer the living room and shut Microsoft out.
The Xbox console was born in 2001, a brand Microsoft tried to associate with raw computing power and graphical fidelity.
Since then, Xbox - which is far more popular in the U.S. than abroad - has also been closely tied to hard-core gamers. Microsoft's most popular franchises, "Halo" and "Gears of War," are both "shooters," the top U.S. console-game genre.
Nintendo strikes a more lighthearted tone, one explicitly aimed at appealing to a broad range of people - "from 5 to 95," as Nintendo of America chief Reggie Fils-Aime says.
The 127-year-old company got its start making playing cards, and eventually wound up in the business of building arcade games. Nintendo's later living-room consoles, and visionary game designers, helped establish video gaming as a popular pastime.
Its more recent efforts haven't fared so well. With the Wii U flagging, Nintendo accounted for about 5 percent of global console and console-game sales last year, researcher IDC estimates. But instead of dropping the concepts the device explored, Nintendo dug deeper.
In October, the company announced a new console that kept the Wii U's portable small-screen concept, but rebuilt the device as a sleek, tablelike tool that could be plugged into a television dock for traditional play.
Nintendo's internal game studios, in need of a hit to go with the new device, built one in "The Legend of Zelda: Breath of the Wild," one of the best-reviewed games of all time.
FRUSTRATION AT MICROSOFT
Microsoft's situation wasn't so dire, but the company's Xbox One, after marketing missteps that placed the focus on broader entertainment instead of games, was selling at just half the rate of Sony's PlayStation 4.
The company stopped reporting sales of the console entirely, officially a move to emphasize use of the Xbox Live subscription gaming service, but to some a capitulation to Sony's dominance.
Microsoft faced calls from outside observers to try to blow up the console market entirely and go with something different.
Spencer, the Xbox chief, had voiced frustration with the console model and its tendency to make old games outdated. That, along with a renewed Microsoft embrace of PC gaming, had many analysts speculating as they went into the E3 show that the company would opt for a device that blurred the line between Xbox and PC gaming, perhaps with a new operating system or closer ties to Windows.
But the company's research showed that while the growth in console gamers globally had stagnated over the last decade, people still identified as either a PC or console gamer, and were unlikely to drop one device entirely.
Building a PC box risked ceding the console market - which researcher Newzoo pegs at $34 billion this year - to Sony.
Spencer gave the greenlight to develop the Xbox One X shortly after taking over the Microsoft gaming business in 2014.At the E3 show, he unveiled the console in front of a few thousand people in a basketball arena.
The reception was mixed. Observers praised the promised capabilities of the device.
But others thought that the demand for a $500 Xbox - $100 more expensive than Sony's PlayStation 4 Pro - might not amount to much.
"They need to do something different if they want to make a meaningful run at Sony," said Doug Creutz, who tracks video gaming at Cowen. "They need to shake things up."
Spencer said the Xbox One X builds on work the company has already done, and that there's plenty of room in the market for a focus on hard-core gamers. He points to the Xbox Elite controller, which at $150 cost about $90 more than Microsoft's standard console controller.
"I had similar questions from people, 'I don't understand what this is for,'" he said. "And if you remember, we couldn't make enough" to satisfy demand.
Spencer, who has been with Microsoft's gaming unit since 2002, is also a big Nintendo fan.
The roster of Nintendo consoles he has owned goes back decades to the SNES Nintendo 64. (He even has some nice things to say about the Game Cube, the relatively unloved turn-of-the-millennium console).
What impresses him about the company, he said in an interview, is how it has stuck to its guns over the years, and learned as it went along.
"It's not like everything they've done has been as successful as the Wii," he said.
Spencer draws a line from the ultimately unsuccessful ideas in the Wii U to those that caught on with the Switch.
"Persistence is just so critical," he said. "To learn, move forward, innovate again. That's so important."
He might as well have been talking about Xbox.
Release: March 2017
Retail price: $299
Pitch: A tablet-sized console that can plug into your TV or play on the go.
Features: Motion-sensing "Joy Con" controllers work as a traditional controller, can snap to the side of the Switch for mobile play, or be held in the hand.
Microsoft Xbox One X
Scheduled release: November 7, 2017
Retail price: $499
Pitch: A more-compact Xbox that packs more power for hard-core gamers.
Features: Support high-definition games displayed on 4K televisions, powered by a graphics processing unit with 6 teraflops of performance.
Source: Microsoft, Nintendo
Microsoft's 'Play Anywhere' program fails to attract big game studios
A year in, Microsoft's bid to link personal computer and Xbox gaming is still a work in progress.
At the E3 trade show a year ago, Microsoft introduced "Play Anywhere," a program that lets people buy a game digitally through the Xbox store and play it on both a console and a PC.
The aim was to add a consumer-friendly link between Windows, the home for most PC gaming, and Microsoft's game console. In the process, executives hoped to extend Microsoft's Xbox gaming brand beyond the console that bears its name.
But the video game industry's biggest studios have yet to make the leap to Play Anywhere. Of the chart-topping first-person shooters, action and sports games that typically get annual releases, none has opted into the program.
Phil Spencer, who runs Microsoft's Xbox business, says the company doesn't want to force other studios interested in Xbox to use the program.
"We're not trying to take a heavy hand and trying to say everybody has to do it," he said in an interview this month. "If consumers find it interesting and developers find interest in it, it's going to work."
Microsoft's own studios, he said, remained committed to the program. "I don't really see a world where I try to get people to buy two copies of 'Gears of War 4,' one on PC, and one on the console," he said. "That doesn't seem right."
The latest in the "Gears of War" franchise - built by Microsoft-owned The Coalition in Vancouver, B.C. - was among the first games to take advantage of Play Anywhere. Most of the big-budget games that use the feature are either built by Microsoft studios or published by the company.
A couple of other big studios are testing the waters, however.
Capcom's "Resident Evil 7" is a Play Anywhere title. Warner Bros.' upcoming "Middle-earth: Shadow of War," is slated to be, too.
- Matt Day
Explore further: Microsoft challenges Sony with powerful new Xbox One X