If the video game industry is beginning to rake in revenue that rivals the movie industry, it's also beginning to accumulate Hollywood-like headaches.

Both industries have to worry about attracting star talent, containing rising production costs and stopping hackers who freely trade their products online. And, of course, there are the lawsuits. For a game designer these days, coming up with the flashy technology that will impress jaded fans is only part of the job.

Take Half-Life 2, a hotly anticipated computer game that arrives in stores today. The title features the latest adventures of a character named Gordon Freeman, a scientist who's going to save the world from aliens with the help of a stack of cool weapons and a couple of friends.

With a list price of $54.99, Half-Life 2 is widely expected to sell millions of copies (the original Half-Life sold 8 million since its 1998 release). But getting the fearless Freeman on retail shelves has been a bit of a slog. Hackers at one point stole the source code to the game by breaking into a computer at Valve Corp., the game's developer, forcing delays. Development was further slowed by a fitful creative process as game designers tried to come up with a worthy sequel. And all the while, Valve and its publisher have been entrenched in an ongoing legal battle, squabbling over issues such as late payments and which party has the right to sell Half-Life to Internet cafes.

The troubles are largely a reflection of how valuable the Half-Life franchise has become. The game was one of the original first-person shoot-'em-ups that incorporated a story line and created a game world that felt more interactive than the settings in other shooter games.

Unlike, say, Doom, players had to recruit in-game characters such as scientists and security guards to be successful, and not every problem could be solved with the blast of a virtual firearm.

"People responded really well to even the small steps we took to integrate character and story into a game," said Valve founder Gabe Newell in an e-mail. "They liked the cinematic feel -- the richer and more immersive experience."

Newell had worked for Microsoft for over a decade before leaving to start his own game company in 1996. To help create a story line that would draw players in, Newell hired a science-fiction novelist among his team of programmers. When Half-Life became a hit, its style was quickly copied by other game makers.

This year there are scores of games, such as Halo 2, that feature top-notch storylines, professional acting talent, great music and immersive worlds, and nearly all of them owe some debt to Valve and Half-Life.

The imitators have in turn put pressure on Valve to top its own success, company officials said. When the original Half-Life was released, the company employed 20; it now employs 65, all working on Half-Life 2. Valve marketing executive Doug Lombardi figures that, with voice actors included, it took 100 people to create the new game.

Valve is privately held and would not comment on how much it cost to build Half-Life 2, but blockbuster titles these days are often costing in the neighborhood of $10 million to develop. Part of the reason is the need to hire proven talent and employ more sophisticated technology. The new title, for instance, has Louis Gossett Jr., Robert Guillaume and Robert Culp lending their voices. The programming in the new game is advanced enough to let players rip rooms apart with a weapon called a "gravity gun" or see the expressions on the faces of characters in the game -- advances that lead to more complex game scenarios and a more complex story.

In April 2003, after years of developing the game in secret, Valve showed off glimpses of its new game at a trade show in Los Angeles; the company announced to excited fans that Half-Life 2 would be out in September 2003.

But the deadline came and went with no game. Computer makers that specialize in gaming machines groused about stocking up for a demand that never came, and one computer graphics card company -- maker of a component designed to handle all the visual elements of complex computer games -- even timed the release of a new product to coincide with the game's original release date.

Fans, however, initially took the delay in stride. Newell is fond of criticizing an industry that regularly forces developers to push out games that don't feel quite finished in the interest of meeting a deadline. So when Valve missed its release date and made no immediate explanation, it did not come as a complete shock to Half-Life fans.

But then news leaked out that hackers had somehow installed a piece of malicious software onto Newell's work computer and had taken a copy of the in-development programming for Half-Life 2. Weeks later, dealers at underground Web sites purported to sell unfinished but playable versions of the game.

Some of the company's fans expressed outrage at the break-in and set out to hunt down the thieves, and the FBI eventually announced that it had made arrests in the case.

The company's fans "completely rallied," Newell said. "They tracked down the culprits, gave us logs of them talking about the crime, and sent us their identities and their [Internet] addresses. And after the arrests, they sent us cookies."

Nevertheless, Valve announced, and missed, new release dates and kept pushing the game's release back as designers kept working to perfect their creation.

At one point, Valve and publisher Vivendi Universal Games Inc., which distributes the game to retail stores, even made conflicting comments about when the game would hit the market.

Their partnership has been the subject of multiple legal spats as the pair fought over the game's lucrative rights. To date, their disagreements have generated some 200 legal filings -- motions, claims and counterclaims. Valve alleges that Sierra Entertainment Inc., a division of Vivendi Universal Games, overstepped its bounds by selling Half-Life to Internet cafes and that the publisher was thereby infringing on its copyrights in regard to Half-Life.

"Sierra's activities are outside the scope of Sierra's limited license . . . and therefore constitute copyright infringement in violation of the Copyright Act of 1976," the complaint reads.

Vivendi Universal Games, meanwhile, has filed its own complaints against Valve, claiming that the developer threatened to slow down production of the Half-Life sequel if the publisher did not relinquish some of its rights under the original contract for the game. Vivendi has also sought to stop Valve from distributing the game online before it is sold in stores.

Neither side would comment on the lawsuits -- citing policies against talking about pending litigation -- though Newell offered that the suit and the hacker theft have been "very painful" for him.

With such hullabaloo surrounding the game, Valve has put in place new security policies for Half-Life 2. For example, magazine reviewers who wanted to take an early look at the game have had to fly out to Valve's Bellevue, Wash., headquarters to play it. ("It's spectacular," said Andy McNamara, editor-in-chief of Game Informer magazine, who made the trek.)

Despite such heavy security precautions, somewhere along the line, a free finished version of the game was leaked again.