Facebook had a huge success with its web gaming canvas, but got locked out of mobile gaming revenue by platform owners Apple (iOS) and Google (Android). Facebook seems determined not to miss the next big gaming platform, as today it announced plans to acquire Oculus VR, maker of the Rift virtual reality headset, for $2 billion in cash and stock. And long-term, it’s looking to take VR beyond games and into simulated in-person connections.

If Apple or Google had acquired Oculus, it could have been the mobile gaming fiasco all over again.

On the web, Facebook’s canvas attracted tons of big developers like Zynga with its personal data and opportunities for growth. In exchange, it got to lay a 30 percent tax on what developers earned through in-app purchases.

But on mobile, the native app stores were controlled by Apple and Google. They were the ones that received that 30 percent tax. Facebook tried to launch an HTML5 gaming platform, but it floundered since mobile web games were so much less powerful than native ones. In the end, Facebook was relegated to becoming a “social layer”, providing login, sharing, and advertising to game developers. Eventually it bought Parse to add a mobile-backend-as-a-service to its offering. But it was still iOS and Android that held the reins.

Now with the purchase of Oculus, the roles could be reversed. Developers who want to build for virtual reality hardware will have to come to Facebook, and it’s Apple and Google who could feel left out in the cold.

[Update: As for exactly how Facebook will monetize Oculus, CEO Mark Zuckerberg said on the call to investors, “We’re clearly not a hardware company. We’re not going to try to make a profit off of the hardware long-term…but if we can make this a network where people are communicating, and buying virtual goods, and there might be ads down the line…that’s where the business could come from.”]

For now, Facebook will let Oculus operate independently with a focus on gaming. And to some, that makes the acquisition seem out of sync with Facebook’s mission to make the world more open and connected. Perhaps that’s why Facebook’s share price is sinking. But down the line, Zuckerberg believes that VR could be used for much more:

“After games, we’re going to make Oculus a platform for many other experiences. Imagine enjoying a court side seat at a game, studying in a classroom of students and teachers all over the world or consulting with a doctor face-to-face — just by putting on goggles in your home. This is really a new communication platform. By feeling truly present, you can share unbounded spaces and experiences with the people in your life. Imagine sharing not just moments with your friends online, but entire experiences and adventures.”

[Update: On the call to investors, Zuckerberg said “Oculus has the potential to be the most social platform ever.” He also said that Facebook expects people will love using virtual reality, it will become an integral part of people’s lives, and it could be the next important computing platform.]

This all reveals how Oculus could be at the center of Facebook’s long-term strategy to connect people as vividly as possible. A criticism frequently lobbed at Facebook is that it actually isolates people rather than brings them together. Scrolling through the News Feed is not the same as talking and laughing with a friend in person. But with Oculus, Facebook could one day make you feel like you’re right next to the people you love, no matter how far away they are.