Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums will be revoked at the discretion of Oculus staff.
New to the forums? Click here to read the How To guide. -- Developers click here.

Trying to find my footing in creating a Multiplayer VR App for Oculus GO

Software Versions:
2018.2.16f1 Unity
VRTK latest github version 3.3.0
Building for Oculus GO. 


I am creating a multiplayer app for Oculus GO and have been running into issues working with the Platform SDK with anything isn't a normal avatar SDK packet. I am at the point where I think that using a different service alongside platform SDK is the way to go, e.g. PUN or UNET alongside Platform SDK. I have been using and exploring the Platform SDK documentation (what is available of it and the CAPI documentation) and managed to get a working example up and running for a proof of concept but have run into issues.

What I have made already is a project that sends and receives the avatar updates, with VOIP & mouth vertex animation, which was based on Oculus Social Starter. This has two players when built, and is pushed to an Oculus GO, but the problems I am having arose when I tried to write another packet to send across the Platform SDK to position the remote avatars in the scene at unique places, and also have their local position match this. 

The aim is if three people are in the app, all 3 are in unique locations and other players see other user's avatars in the right place. This does not happen at the moment because any packet I sent would be scrambled at the other end, e.g. I packed 1 byte for messageType, 1 ulong for userID, then an amount of data (tried byte, uint16 and uint32) to send that would be processed on the other end. However, the only part of the packet that would not scramble is the first byte. In each case the userID received was wildy different from the sent userID and the rest of the data in the packet was also gibberish. (I even took the values I found and bit-shifted them left and right numerous times but they never seem to even closely represent a userID, even considering some data loss). 

My questions:
Is there a proper way to send my own custom packets for basic functionality over the Platform SDK? Is the Platform SDK Net.SendPacket() service reserved only for avatar updates, VOIP and other Oculus services? Do i need to implement my own solution for my apps "game state" so that i can have players spawning properly. 

TL;DR My packets are coming out scrambled when sent over Platform SDK on Oculus GO. Am I using Platform SDK Wrong? 


  • imperativityimperativity Posts: 3,587 Valuable Player

    Welcome to the Oculus Developer Forums.

    Great questions and really well written. Thanks very much for concisely stating your request and providing all salient details.

    I have passed this along to our Platform SDK team for their input and will be back with further guidance.
  • imperativityimperativity Posts: 3,587 Valuable Player

    I have sourced some feedback from our platform SDK team on your questions above:

    ">>Is the Platform SDK Net.SendPacket() service reserved only for avatar updates, VOIP and other Oculus services?

    nope! It's just a transport layer to send whatever packets of data the dev wants: https://developer.oculus.com/.../latest/concepts/dg-p2p/

    It is completely agnostic to the bits that the dev is putting in there.

    As far as the "data loss", it's probably not at the P2P layer because it only shoves data in and takes data out on the other end. It could be whatever code the dev is using to pack and unpack those bits into the byte, uint16 and uint32."


    "If this dev is directly piggybacking on the social starter avatar sample's serialization logic, they could be hitting an issue theresince the sample implementation hands off the entire remainder of the packet to ovrAvatarPacket_Read(). If the dev is just appending their data onto that, it might be getting consumed during avatar serialization.

    However, it sounds like they had already stripped the sample down to just messagetype, remote id, and payload though. Maybe they have an unmatched read/write in their serialization logic? If the original social starter sample is working for them without issues, sending over custom data should work fine as well. "
Sign In or Register to comment.