REDMOND, Wash.

TUCKED in the woods here, west of State Route 520, is a little piece of the Mario Kingdom.

Behind the unassuming doors is the business built by Mario, the pudgy plumber, and Luigi, his lanky brother, as well as characters like Link, wielder of the mystical Master Sword, and Princess Zelda, of the royal family of Hyrule. All of them, and more, are the pixelated children of Shigeru Miyamoto, the Walt Disney of video games and creative genius of the Nintendo Company of Japan.

But while Mr. Miyamoto is dreaming his dreams across the Pacific, an army of marketing types is at work here in Redmond, inside the shiny new headquarters of Nintendo of America. This palace of play is quiet, but there’s trouble brewing in the world around it: three decades after the mustachioed Mario burst into arcades via Donkey Kong, plucking countless quarters from people’s pockets, the kingdom is under siege.

Nintendo’s enemies have arrived by battalions. Angry Birds, Fruit Ninja and other inexpensive, downloadable games, particularly for cellphones and tablets, have invaded its turf. Changing tastes and technology have called into question the economics of traditional game consoles, whether from Nintendo or Microsoft, maker of the Xbox. Nintendo recently posted the first loss in its era as a video games company, a prospect that would have been unimaginable only a few years ago. And while game consoles aren’t going away, analysts are skeptical that the business will regain its former stature soon.