(Fortune Magazine�) -- "Are you ready?" shouts Josh Ball, manager of GameStop No. 1,782 in Euless, Texas, near Dallas. He's standing before more than 100 fidgety young men and women lined up in the strip-mall parking lot outside his store. They've been here for hours in the warm spring air, waiting for midnight when the latest version of Grand Theft Auto - the ever controversial hoodlums-and-pimps videogame - goes on sale. It's getting close to the appointed hour, and these people can barely contain themselves.

"ARE YOU READY FOR GRAND THEFT AUTO IV?" Ball hollers again.

"YEAH!" the crowd shout back.

Ball understands. He's a gamer himself. He thinks Grand Theft Auto (a.k.a. GTA) is the coolest thing you can do with two thumbs. The 23-year-old has been telling customers for weeks to reserve their copies and is stoked to see so many of them here tonight.

At 12:00 A.M. sharp, Ball and his employees open the doors and start handing out games. They close up three hours later. But Ball isn't done yet. He rushes home and plays his own copy of GTA4 until six. Two hours later he's back at store 1,782 for the morning rush. "It's just a never-ending process," Ball says later.

Number one by far

Guys like Josh Ball are the reason GameStop will sell more copies of GTA4 than any other retailer this year. Michael Pachter, an industry analyst at Wedbush Morgan, predicts that of the 12 million copies of GTA4 sold this year, nearly one out of five will go through GameStop. "They'll be No. 1 by far," Pachter says.

That's what Wall Street has come to expect from the videogame chain started 21 years ago by Barnes & Noble chairman Len Riggio. Videogames aren't just kids' business anymore, of course - they're a fast-growing, $19 billion industry with arguably as much pop-culture significance as Hollywood. No retailer has more cachet among gamers than GameStop, and only Wal-Mart has a larger share of the market - for now. According to market researcher NPD, Wal-Mart had a 21.3% market share last year. GameStop's share was 21.1%, and may well overtake Wal-Mart's this year.

It isn't often that a retailer challenges Wal-Mart in any category. How has GameStop pulled it off? First, all those Josh Balls. They really are gamers, and they really do connect with customers. If you've shopped for games at Wal-Mart, you know the difference. You have to track down someone to unlock the game cabinet. And if you are looking for advice, forget it.

Second, GameStops are everywhere - 4,061 in the U.S. and another 1,203 abroad (and counting). You can't visit a mall or a strip center without seeing one.

Last, and this is key, GameStop has a trade-in policy. Bring in your old game, and the store will credit it toward a new one. That's heaven for a teenager who wants a new copy of Halo 3 for $60.

The benefits of a console war

Now GameStop is reaping the benefits of the latest console war. The new generation of platforms like Microsoft's Xbox 360, the Sony PS3, and the Nintendo Wii are driving hardware and software sales to new heights. GameStop's sales for fiscal 2007 were $7.1 billion - a 33% increase over the previous year; same-store sales were up 24% over the same period. Its net earnings rose 82%, to $288 million. GameStop's stock price has risen 480% since its 2002 IPO. And yes, Ball and his fellow store managers get options.

GameStop will probably have a good year in 2008 too, thanks in part to GTA4. But after that? Open question. The Wii may be attracting new customers - mainly women - to games. But they may prefer shopping at Target to GameStop. The videogame retailer also faces a future in which hits like GTA4 move from being packaged goods to digital downloads. Those are two serious challenges. Can GameStop meet them? Well, it wouldn't be the first time this company defied expectations.

Most people don't think of Riggio as a game guy. If anything, they know him as the man behind Barnes & Noble, the bookstore giant with the sofas and lattes. Riggio found himself in the game trade in 1987, when Barnes & Noble bought the 797-store B. Dalton chain. Along with that purchase came five Software Etc. shops. They sold computer programs and videogames. Riggio was intrigued. "It's pretty simple," he recalls thinking at the time. "Books are basically software." And videogames were just software.

So he opened 372 Software Etc. outlets in malls. By 1993 videogames were 36% of the chain's sales. But Riggio discovered books and videogames were in fact very different. You don't need a gizmo to read a Stephen King novel, but you do need a Nintendo console to play Mario games - and that console would be obsolete in five years, tops. It was a cycle: new console, crowds at Software Etc., then crowds leave to await the next console. Repeat.

In 1993 Software Etc. got caught between console cycles and had a lousy Christmas. In an uncharacteristic moment of self-doubt, Riggio decided to merge Software Etc. with a competing chain that had the what-were-they-thinking name of Babbage's. The results were disastrous. Babbage's filed for bankruptcy in 1996.

A changing business

"It was just tomfoolery," Riggio says of the Babbage's adventure. But he was too embarrassed to walk away. So he and two former B. Dalton executives - Dick Fontaine, now GameStop's CEO, and Dan DeMatteo, now COO - took action. They closed stores and repaired relationships with disgruntled vendors like Nintendo.

Meanwhile, the business was changing. A guy named David Pomije had come up with a new kind of game store named FuncoLand. He didn't see the need to be in high-rent malls; low-rent shopping centers suited him fine. Pomije pushed used games harder than new ones. Why? Because FuncoLand made a 50% margin on used games - more than twice its margin on new ones. At first Barnes & Noble tried to compete by opening strip-mall stores called GameStop.

Then, in 2000, it bought Pomije's company for $159 million and turned his business model into a science: buy consoles and games that customers bring in, immediately resell what you can, and fix the rest. (Damaged goods are sent to the company's elaborate "refurbishment" center in Texas, where workers on three shifts repair PlayStations and Xboxes and take scratches out of damaged games so they can be resold.)

There's one more important chapter in the history of GameStop: purchasing its largest rival, Electronics Boutique, in 2005 for $1.4 billion. GameStop couldn't have picked a better moment for the acquisition.

The deal closed just as Microsoft (MSFT, Fortune 500), Sony (SNE), and Nintendo released their next-gen machines. That, plus the success of Nintendo's handheld DS and the fact that game publishers have continued to make games for older platforms like the PS2 - it all means that GameStop is moving more product than anyone would have imagined 20 years ago. "We no longer talk about videogame cycles," says Fontaine. "We talk about cycles within cycles."

The Internet looms

This won't last forever. One day, games will be distributed on the Net, not sold on discs. That's a touchy subject for GameStop: you can't sell used downloads. GameStop says the disc era is far from over. Maybe, maybe not. Meanwhile, there's a more pressing challenge for GameStop. Remember those new customers brought in by the Wii? This summer Nintendo unveils Wii Fit, an aerobics and yoga game. It'll probably be a hit, but it's targeted at moms - and you don't see many of those in a GameStop unless their kids drag them in. So this is a chance for Wal-Mart (WMT, Fortune 500) and Target (TGT, Fortune 500) to erode GameStop's market share.

Or is it? DeMatteo says his company is trying to change its image from the "village pool hall" to the "Starbucks of videogame stores." Now GameStop people will just have learn to talk about yoga positions on Wii Fit with the same passion they display discussing Uzi tactics on GTA4. Hey, it could happen.

Ken Pescatore, manager of a GameStop in Springfield, N.J., says he's already made some adjustments to his pitch. He doesn't use the term "controller" when he's talking to moms about the Wii; he uses the more familiar-sounding "remote." He talks about health and hobbies a lot. "With the release of Wii Fit, you can do your exercises in the living room," Pescatore says, lighting up. "If horseback riding is your hobby, there's even a game that will simulate that!"

This isn't playtime for Pescatore. He manages a store with annual sales of $2.5 million. Do you think he's going to let those newbies at the Wal-Mart or Target down the street take his customers? Over his dead stock options.