Nintendo's (NTDOY -0.33%) current living room console, the Wii U, has been an abysmal failure. Since its release last November, Nintendo has shipped fewer than 4 million units, a far cry from the 5 million the company had originally expected to sell by the end of March. The situation is unlikely to improve -- soon, Nintendo's Wii U will face competition from both the PlayStation 4 and the Xbox One.

Thankfully, Nintendo's handheld, the 3DS, continues to sell well, somewhat offsetting the Wii U's failure. That trend should accelerate next quarter, when sales of the company's latest Pokemon titles are factored into earnings. Still, as Nintendo becomes more reliant on its handheld, the company becomes ever more vulnerable to smartphone and tablet-based gaming, especially as Samsung (NASDAQOTH: SSNLF) and Apple (AAPL 1.27%) look to more aggressively target the space.

Nintendo is now a handheld gaming company
Nintendo's dominance of handheld gaming stretches back some 20 years. First with its Game Boy, and then with the DS, Nintendo's handheld consoles have consistently outsold rival machines from companies such as Sega and Sony. That trend continues with the 3DS; in fact, Nintendo's 3DS was the best-selling video-game console in the U.S. from May through September.

It will probably also be the best-selling console in October. Pokemon X and Pokemon Y were released Oct. 12 and sold 4 million copies in just the first 48 hours, becoming the fastest-selling 3DS games ever. Alongside Pokemon, Nintendo also released the 2DS, a stripped-down version of the 3DS that costs $40 less.

Worldwide, Nintendo has now sold 35 million 3DS consoles, giving it a significant platform from which to sell software. In the six months ended in September, Nintendo sold more than 27 million 3DS games. Yet despite the success of the 3DS, it wasn't enough to overcome the failure of the Wii U: Last quarter, Nintendo recorded an operating loss of $187 million, the byproduct of taking a loss on Wii U hardware.

Samsung looks to gaming to set itself apart
But as Nintendo becomes reliant on handheld gaming, it makes the company particularly vulnerable to competition from smartphones and tablets. Although mobile gaming has exploded in popularity, its growth has not affected the core gaming market -- but that could change.

Samsung has begun to aggressively move into gaming as a way to differentiate its hardware from its Android rivals. At its developers conference last week, Samsung unveiled a software development kit that allows games to be beamed from Samsung tablets and smartphones to compatible smart TVs. This technology, paired with Samsung's proprietary controller, will allow Samsung's Galaxy tablets and smartphones to act as mobile consoles.

If it takes off, it could be incredibly popular. While Nintendo's 3DS sells well, Samsung's Galaxies absolutely dwarf it in total sales. Samsung's flagship Galaxy S4 alone sold 40 million units in its first 6 months on the market. Add in sales of its Galaxy Note phablets and its tablets, and Samsung's Galaxy platform is several times larger than Nintendo's.

Apple finally caves
Still, Apple's iPhone is a far larger threat to Nintendo than Samsung's Galaxies. The mobile-game developers I've spoken with tell me that Android's fragmentation and piracy make it a less attractive platform to work with. Apple's more locked-down iOS is more likely to sustain a large gaming scene.

Indeed, the iPhone is already a huge platform for gaming. According to Distimo (via Forbes), games bring in 79% of the all the revenue to Apple's app store. With Apple now paying developers $25 million per day, iOS has become a force in the video-game economy.

Still, most of the high-grossing games are simplistic titles such as Angry Birds and Candy Crush. They simply don't compare to the more engrossing titles available on Nintendo's platform. Not for long, though. Because the iPhone lacks buttons, developers are limited in the sorts of gaming experience they can offer -- but not for much longer.

Apple's most recent update to iOS, iOS 7, includes support for third-party controllers. Images of Logitech's upcoming controller, the Powershell, leaked online last week. An iPhone (or iPod Touch), paired with Logitech's controller, could be a potent alternative to Nintendo's handheld.

Can Nintendo survive?
Almost 40% of children under age 2 now use tablets or smartphones. That presents a serious challenge to Nintendo, as its inept Wii U console has made the 3DS the sole source of income at the company.

Samsung and Apple, the two largest mobile hardware producers, are moving aggressively into gaming. Major developers, including Activison Blizzard, Electronic Arts, and Square Enix, have begun to offer their titles on mobile platforms. If more complex mobile games appear, it will be nearly impossible for Nintendo to maintain its current business model.