Keeping the Beat:  Porting Beat Saber to OpenXR for An Improved Developer Experience - Khronos Blog

Keeping the Beat:  Porting Beat Saber to OpenXR for An Improved Developer Experience - Khronos Blog
Keeping the Beat:  Porting Beat Saber to OpenXR for An Improved Developer Experience Banner

Keeping the Beat:  Porting Beat Saber to OpenXR for An Improved Developer Experience


Beat Saber is one of the world’s most popular VR games, with over 6 million users across a wide array of platforms. We want the experience of slashing through blocks with a laser sword to rock, no matter what hardware or platform players use.

In pursuit of a more consistent, maintainable cross-platform experience, we recently merged our Beat Saber's PC implementation using Steam VR and Oculus VR by porting to OpenXR. The result was a cleaner code base, and what we hope will be a more portable future for Beat Saber.

Anticipating Our Next Move

Beat Saber was originally developed using the Unity game engine in an astonishing four weeks. We built the initial Beat Saber PC implementation with SteamVR for Steam builds and OculusVR for Rift builds, then PSVR and PSVR2 for Sony PlayStation applications. We had to manage four different VR implementations.

At the time, we used Steam VR’s library for rendering and input. However, a recent update to Steam VR broke the library in two - one for seeing in VR and another for controller input. Steam now uses an action-based system where inputs are abstracted from controls. Unity also has an action-based system. Two redundant action-based systems were bound to cause future issues with debugging, requiring us to chase down control issues in two separate locations.

As we began evaluating our options, we realized that this was a moment of opportunity: if we were making changes anyway, we could use OpenXR to eliminate the redundant action system and enhance Beat Saber’s portability at the same time.

The Goal: A More Developer-Friendly Beat Saber, Now and In the Future

OpenXR provides a unified interface for virtual reality (VR) and augmented reality (AR). Without a cross-platform standard like OpenXR, a VR application must use every platform’s proprietary API. Using OpenXR, a single implementation of a game engine can run across every platform that exposes the OpenXR API.

The biggest names in the XR gaming space, like Meta and Microsoft, have already aligned with OpenXR as a unified interface. In the near future, we think it will be a necessity for cross-platform games. We decided to seize the moment and future-proof Beat Saber now.

Our immediate goal for this project was to streamline the input system for easier debugging and maintenance. In the process, we aimed to prepare the game for evolving tech and improve the developer experience without impacting user gameplay.

OpenXR Implementation with Unity and Steam VR

We ported the PC implementation of Beat Saber to OpenXR in April 2023. Unity’s plugin framework made the process very straightforward. We used the OpenXR plugin to create an application interface layer while still using the Unity action-based system directly.

Testing and quality assurance were the biggest challenges for our team. You can’t test for bugs until the game is built. We had to “brute force trial and error” all three layers at once - Unity, OpenXR, and Steam. Still, given OpenXR’s industry momentum, taking our time with testing was a small price to pay for cross-platform implementation.

The Outcome:

With OpenXR, the user experience remained identical, and the developer experience was streamlined. Thanks to OpenXR, true cross-platform functionality is now more feasible.

Porting Beat Saber to OpenXR was an investment in the game’s future - and thanks to the natural integration between OpenXR and Unity, it was an easy decision to make. The Beat Saber team hopes to eventually move all versions of the game over to OpenXR, enabling easier feature additions and maintenance. Once OpenXR achieves a fully comprehensive mapping of all possible platform and hardware combinations, we will have arrived at a dramatically simplified developer experience.

Header image courtesy of Beat Games