Menu

Collaborative VR Multiplayer Physics in Squido Studio’s DigiGods

What if it would be possible to demonstrate the ability to develop a virtual reality game in which you can manipulate the same objects together with another player – say lift up a couch and move it around together? Montréal based Squido Studio was sure the answer would be “raise a nice amount of funding to support the development of your game”, and was proven right.

Squido Studios scoring high on the Meta Store with DigiGods: 4.8/5 out of 400+ ratings at the time of writing.

That’s what happened as they worked with PreviewLabs to get the technical aspect of their collaborative multiplayer physics done. This is the story about the prototyping work behind “DigiGods”, and the development of “The Cube”, a Technical Proof of Concept with physics-based multiplayer gameplay.

The Challenge of Making VR Physics Feel Natural For Multiple Players

In VR, more than on any other platform, the player has a very intimate connection with physics. After all, you are experiencing holding things in your very own hands, rather than seeing them from a third person point of view, held in the hands of a character. This implies that any faults in the behavior of the physics are much more noticeable – while at the same time allowing for a more exciting physics interaction, as we’ve felt for instance in a rowing physics prototype.

When dealing with multiplayer physics, network lag comes in – which can cause objects to move in a jerky, non-smooth way. If it’s a turn-based multiplayer game, or a game where players interact with object individually, the solution is relatively simple: calculate the physics on the side of the player that’s interacting with the object, and synchronize the affected objects movement it to the other player. This may introduce some lag visible to the players who aren’t interacting with these objects, which is easily forgivable as the interaction isn’t as intimate for them as they experience it indirectly by observing another player’s interaction.

In two of our earlier physics based game prototypes, Journey for Elysium (with rowing physics) and Cornhole, the goal was to get the physics to feel just right and ‘natural’ – not necessarily hyper realistic.

The challenge that comes up with collaborative multiplayer physics, is that the physics need to feel good for both players. After all, in The Cube, the premise is that both players can work together to stack objects, lift things, or push obstacles out of the way. In order to solve this problem, we experimented with two different approaches, and settled on the best one.

Photon Quantum versus Photon Fusion

When it comes to networking, we usually recommend to go with Photon for its robustness in a wide variety of conditions. Having used them for the first time in 2013 with their offerings Photon Cloud and Photon Server, we continued to use their technology as Photon Unity Networking (PUN) was released and also as we developed the first multiplayer experience for the Microsoft HoloLens and wrote on the Photon blog about it. Meanwhile we also used other multiplayer technologies such as Unity’s own networking layer as well as the Fish-Networking library, an open source networking solution.

For this project, we opted to look into the newest incarnations of Photon’s multiplayer technology: Photon Quantum and Photon Fusion.

In the first iteration of The Cube, we focused on figuring out the technical challenge of obtaining a smooth and synchronous physics experience for two players.

Photon Quantum allows for deterministic physics. This means that only the players’ actions needs to be sent across the network, while each player’s device can then calculate how these actions affect their environment. Because this means that the physics calculations happen on each side, the resulting behavior should be very smooth. However, at the time of the implementation of the prototype, Photon Quantum lacked smoothness in the movement behavior of smaller objects and seemed to be made mainly for larger movements. Other than that, there would still be other challenges such having to apply user input that came in with a delay retroactively, through a ‘rollback’ approach.

Therefore, we ended up going with Photon Fusion, Exit Games’ replacement for PUN, providing a better performance and overall stability than Photon Quantum for Squido’s use case.

The Solution for a Smooth Experience

In the solution we concluded on during prototyping, a dedicated server runs in the background to calculate the physics of all the objects, serving as the ‘ground truth’. Simultaneously, the players’ clients also calculate the physics to compensate for lag. If there is an error or a difference between all of these calculations, the solution will always prioritize the situation known to the server, while working with an interpolation to ensure that everything still feels smooth for all players.

Interacting With Objects in VR

In The Cube, players can pick up objects in one of two ways. Firstly, you can grab items by holding down a button on your controller, just like in many other VR games. When doing this in our technical proof of concept, the game will ignore the weight of the object, meaning players can pick up anything they like.
Secondly, and this is more novel, you can apply force on objects. This means that you can bring your hands together around an item and the game will register the force you apply to it and allow you to pick it up. When interacting with objects this way, the game actually takes the weight of every object into account. Players can work together, to generate enough force to pick up heavy objects easier.

DigiGods (called Anarchitects during the soft launch) compared side-by-side with some of our prototyping work for the title.

We apply a rubber band effect to show you where your physical hand is in relation to the virtual hand that is pushing against the object you are holding. The interesting thing about this technique is that you can actually work together to pick up objects.

To communicate the weight of items in the virtual world of this prototype, some objects will move slower when pushing against it. Some objects will not move until there is enough force applied against them. This means that while pushing a 50 kg / 100 lbs block with one hand may not be possible, you may be able to barely do this by pusing with two hands, while pushing with two players would make it a breeze.

Acquiring Funding Through a Prototype

The result is a prototype that gives the player a natural sense of interaction with their environment. You can hold objects, stack them, throw them, roll them and even combine them to manipulate the playable environment. As you can see in the video at the top, it even allows players to enjoy a multiplayer game of Jenga together in VR.

Squido used our technical proof of concept in a demo which managed to convince the Canada Media Fund to invest 1.5M CAD, allowing them to use this in their game. The work done by Squido based on this also caught the attention UploadVR, while the prototyping side of this was covered on the GamesBeat website by VentureBeat.

Do you also have a great idea that sounds simple on paper but proves challenging to turn into a usable product? We’re here to guide you and help with a Reach out to discuss how we can help you achieve awesomeness.

Leave a comment

Your email address will not be published. Required fields are marked *