Bohan Wu | Brandon Fremin | Junjie Lei | Melody Hsu
Virtual Reality (VR) is a rapidly evolving area of technology that is becoming increasingly prevalent in a wide area of applications such as art, education, business, entertainment, and much more. With such diversity in its applications, what our team aims to address is how we can use VR to develop the future of virtual real-time collaboration and communication. Our goal is to ensure that within the continental United States, users joining a common virtual space are experiencing events and interacting at the same time. Additionally, all users should see a consistent view of the world as it changes in response to user input and interaction. Perhaps the most notable of the currently released VR devices (as of May 2022) is Meta's Oculus Quest 2, which is what our team uses in our project development. Using the Oculus Quest, Unity Engine for game development, and Spines infrastructure to impose artificial latencies in server-to-server communication, we created an application that is extensible to general VR devices and enables players to interact in real-time (< 65 ms delay).
Each VR device has a local state about where the headset and controllers are positioned. Oftentimes, games update the local state, then update the server, then reconcile the local and server states. However, this can lead to inconsistent representations of what users see, as it would always be the case that one's device will first update its own state before reconciling its information with other devices. Our application instead updates the server first, then updates the local state based on the server state. This allows the server to consolidate information about all players and the world state before individual player views are rendered locally.
On each of the 8 servers we had running in the Distributed Systems and Networks lab, a Spines daemon was run to represent one of the below locations. Each link between two locations represents the one-way trip time in miliseconds. By having a server represent each location and using Spines to create artificial links between servers, we emulated the transcontinental path that packets take when routed to and from different destinations across the United States.
Our application allows up to 8 unique players to join a lobby, select a location, and interact with one another. Movements made by a player are consistently represented among all player views at the same time, and an added layer of interactivity is incorporated in the game objects placed in the environment. Below is the initial user interface that players will see and interact with to connect to a server and join a lobby.
All metrics were collected in a setting where the average round trip ping time was ~2 ms. Note that this additional ping time factors into the overall latency seen in subsequent graphs.