Juan Garzón / CNET

Some of the greatest rivalries have come out of the video game industry: Midway's Space Invaders against Atari's Asteroids. Nintendo's Mario versus Sega's Sonic the Hedgehog. Microsoft's Halo against Sony's God of War.

Now the next great battle for leadership of the video game industry is starting. And it's between companies most people have never heard of over a technology few have even tried: virtual reality.

In the past year, nearly every major tech company has announced or hinted at plans to take real steps into the emerging market for VR, which immerses goggle-wearing users in three-dimensional worlds -- and often feature gee-whiz graphics tied to the hottest games. Facebook surprised the industry with its $2 billion buyout of VR headset maker Oculus in March 2014. Google unveiled its . Apple filed and was awarded a patent for VR technology.

But the competition is likely to be fiercest between two camps: Facebook's Oculus and video game developer Valve, which has teamed up with smartphone maker HTC. The companies are poised to be among the most influential in the market, and they've both set their sights on the same potential customers: gamers who plan to use VR on a computer.

The stakes are high. Whichever company establishes itself as the go-to VR device maker could take control of a potential $7 billion market, attracting not only those customers but also software developers needed to create the compelling apps that draw in even more users.

Or they could establish separate fiefdoms, each with its own loyal following of customers and software developers.

Hello VR

Virtual reality was once the stuff of science fiction. Movies like Walt Disney's "Tron," New Line Cinema's "The Lawnmower Man" and Warner Bros. "The Matrix" introduced audiences to simulated, computerized worlds, completely unlike the one we live in.

Characters who visited these worlds, either by being transported into them or by seeing and interacting with them using head-mounted goggles and a set of controllers, soon learned they could manipulate and change the environment, just like a computer program.

The message: VR offers limitless potential for you to visit, explore or be part of the action.

CNET

But turning fiction into reality is no simple trick. Jaron Lanier, a visionary game developer, helped to popularize the term "virtual reality" in the 1980s and began selling headsets and specially designed gloves through a company he founded called VPL Research. VPL went bankrupt.

Game maker Nintendo attempted to field its own VR headset in the 1990s called "Virtual Boy," which was designed to be kept on a table with a stand. Players who looked through the headset were shown games with simple visuals and played in a black-and red-colored 3D world that surrounded them. Virtual Boy wasn't compelling enough to entice customers though, and the project was discontinued within a year.

Other attempts, such as specialized arcade games like Pac-Man VR, were deemed too clunky and expensive for mainstream audiences.

Oculus VR changed all that. In 2012, a teenage tinkerer named Palmer Luckey unveiled a device called the Oculus Rift, a next-generation headset built with modern parts, including a smartphone's screen. Put on a pair of Oculus goggles, and the world inside is far different from what Nintendo offered. You can visit realistic Tuscan villages, pilot a spaceship in an epic dogfight and (attempt to) dodge bullets fired by men in a hallway. Oculus showed how VR can make users see the world from the eyes of a tiny animal scampering through a rainforest or from the perspective of a monster stomping through a city.

Oh, and it's cheap. Oculus sells prototypes of its Rift goggles for $349 apiece.

Luckey's tech worked so well that the industry started viewing VR as an opportunity rather than a novelty. It also captured the attention of Facebook and CEO Mark Zuckerberg.

Running virtually unopposed

Nick Statt/CNET

At the beginning of last year, the VR market was easy to map out. Oculus was the undisputed leader, with important allies even before Facebook stepped in. It received a $75 million investment from leading venture capital firm Andreessen Horowitz, led by Internet browser pioneer Marc Andreessen (who sits on Facebook's board).

In March 2014, Oculus announced a new prototype of the Rift. A week later, it stunned the market by agreeing to be bought by Facebook. Oculus executives called the sale a "partnership," but some of the company's biggest fans worried the social network would change the startup. Oculus would operate as its own division, Facebook executives said. More important, Facebook's commitment and cash reserves would let Oculus hire talent and allow them to ship a final device to customers made with custom-designed, higher-quality parts instead of mass-produced components like smartphone screens used in its prototypes.

Now playing: Watch this: Walking around in VR with Oculus Rift Crescent Bay

By September, Oculus announced a deal with tech behemoth Samsung to offer a version of its VR wear for mobile devices. The device, called "Gear VR," will be released later this year. Samsung sold a prototype "Innovator Edition" of the Gear VR through the US carriers and on its own website for $199 in December. Samsung hasn't said how many were sold, noting only that it was "very pleased" with the reception.

Oculus was unquestionably on a roll. Sony, with a specialized VR device for the PlayStation called seemed to be the only other serious contender in the market. Facebook and Sony had carved up the market: Oculus focused on having its VR gear work with PCs and mobile devices, while Sony looked to specialized video games that worked with its popular PlayStation game console.

What they didn't know was that a dark horse was poised to enter the race.

A 'philosophical alignment'

By 2014, HTC had already been quietly investigating VR technology for more than a year. Known for its well-designed (but undersold) smartphones, the company was convinced the VR market was going to be huge. Then CEO Peter Chou -- now head of HTC's Future Development Lab -- pushed the nearly 20-year-old Taiwanese company to get in front of the trend.

Chou tasked HTC designer Claude Zellweger and his "Advanced Concepts" research team to look into the technology. But HTC also hoped it could find a partner.

The company found that ally in Valve. A video game developer founded in 1996 by two former Microsoft executives, Valve had VR technology that impressed both Chou and HTC's current CEO, Cher Wang.

Unlike devices made by Sony and Oculus, which use a camera to sense a player's position within a limited space, Valve created technology that let players easily move around an entire room. In the real world, walls were covered with symbols that were then interpreted by a headset. Put that headset on and suddenly a living room can become a dungeon, where players walk from wall to wall and peer at details in the video game world as they walk freely in the real one.

Still, Valve's VR tech wasn't ready for home users.

Many developers had already seen the prototype, including executives from Oculus. Oculus and Valve had actually worked together in 2013 to help reduce nausea while wearing the Rift headset, a common problem with VR. Zuckerberg even demoed technology from Valve as he began talking to Oculus about a possible acquisition.

But Facebook's purchase made Valve wary of working with Oculus -- particularly as Oculus appeared to begin controlling (and limiting) some software offered on the Rift. Worse, one of Valve's highest-profile VR experts, Michael Abrash, had defected to Oculus. Others left too, excited by the opportunity to work on technology that was headed to store shelves.

HTC offered Valve a new alliance. "There was philosophical alignment," Zellweger said. HTC and Valve employees were soon working together on their joint VR project.

While Valve initially projected a commercial launch in 2016, HTC's leadership pushed the release to late 2015.

Late last year, Valve and HTC quietly invited 20 games developers to run through the same demo Chou and Wang experienced. The big news for many was HTC's commitment to a commercial product. And for many, that backing made all the difference.

"The developers say over and over again, they love Valve," said Dan O'Brien, HTC's executive director of connected products. "But they weren't going to commit to the platform unless there was someone there to help bring the solution to the market."

After the presentation, O'Brien went to dinner with some developers and asked for their impressions. One developer told O'Brien: "We're terrified and thrilled."

HTC and Valve began distributing a prototype to more developers in December so the companies would have something to show at trade shows in Barcelona and San Francisco in the first half of 2015. Their Vive headset will launch this year for consumers for an as-yet-undisclosed price.

CNET reviews editor Scott Stein tried out a demo version of Vive in March and summed up his experience in a single word: "Amazing."

The battle between Facebook and Valve was heating up.

Making virtual waves

This isn't the first fight between tech companies hoping to become the dominant player in a new market. Microsoft, under co-founder Bill Gates, deftly outmaneuvered Apple's Steve Jobs to establish Windows as the primary computer software for homes and businesses in the 1980s. Microsoft held a near monopoly of the industry for almost two decades, and its software still powers more than 90 percent of the world's computers.

The rivalry between Valve and Facebook could blaze the path for the next wave of gaming and entertainment. That's because VR isn't just about video games. Both are courting the entertainment industries to offer movies or television shows on their respective devices. HTC, for example, is working to push VR technology to content providers including HBO and Lions Gate Entertainment. Oculus has formed a team called "Story Studio" to create VR movies.

"The developers say over and over again, they love Valve." Dan O'Brien, head of the VR team at HTC

While the two companies have similar seeming strategies, developers say Valve and Oculus are behaving differently -- in telling ways. Valve has struck many agreements to sell VR games through its Steam store. Oculus so far has publicized only one big exclusive deal, a game called Lucky's Tale, led by one of the people behind the hit mobile game Words with Friends. More deals may be announced this summer.

Developers, meanwhile, are struggling to decide whose device to build games for because Valve and Oculus use different technologies.

Valve has impressed developers with new wand-like controllers designed to be held in a player's hands to manipulate the game world. Reaching out with the controller and pressing a button in the real world may translate into picking up an object, such as a book, inside a game.

Oculus doesn't have any of that. It relies on a standard video game controller, with joysticks and buttons, designed by Microsoft for the Xbox video game console. The controller is held with two hands, not one like a typical motion controller, and is used more as a way to send commands to a game than to interact with it. While it hasn't publicly shown any motion controllers, it is developing them. A person familiar with Oculus' plans say they may be unveiled this summer.

Now playing: Watch this: We experienced the future of VR with HTC Vive

Oculus has said making motion controllers is a hard thing to do. "I'm glad I'm not in charge of doing them," John Carmack, head of technology at Oculus, said about motion controls at a March conference.

In March, Valve also introduced a new technology some developers say could be, pun intended, game changing. It's codenamed Lighthouse and consists of twin lasers set on opposite sides of a room. Lighthouse lasers help HTC's headset sense an entire room, interpreting the light to pinpoint a player's location and movements. HTC and Valve are also hoping Lighthouse will be capable of tracking moving objects, such as another person or a pet. That could help signal to people wearing the goggles of an impending collision.

Valve isn't just planning to use Lighthouse to set its VR technology apart from the competition. The company's also using it to court developers. Valve has promised to make the underlying technology available for free to any company that wants to incorporate it into their designs. Valve says it wants to ensure the best VR technology is available to the industry. Developers say the move gives Valve credibility.

It also means developers are having to choose between designing games to work with either Valve's motion controllers or Oculus' button-and-joystick controls. "We've got all these different platforms and we're trying to keep our game working on all them the best we can," said Alex Schwartz, head of Owlchemy Labs, in Austin, Texas. Even if Oculus unveils its own motion controllers, developers will need to devote time and resources to making their apps work with them.

Sarah Tew / CNET

The final design for the Vive is "more or less" finished, Zellweger said. HTC will have designed the headset, Lighthouse lasers and wireless motion controllers. The company hopes the products will garner similar praise as its high-end line of smartphones. "Our goal is to have the equivalent of the HTC One design for our VR headset."

Some developers have opted to focus on creating programs for HTC's hardware because it's slated to launch this holiday season. Oculus, in contrast, won't release its flagship Rift headset for computers until next year. Oculus has told developers their programs should work with as many devices as possible, even if Oculus' headset won't be the first to arrive on store shelves.

"At this point, we know it's a hard sell to get people making VR, so we're not going to try and say 'Don't look at anything else,'" Carmack said at that conference in March. After all, Valve is well liked within the industry, he added. "We have our work cut out for us to make sure you can love us more."