Oculus Go Development

On 6/23/20 Oculus announced plans to sunset Oculus Go. Information about dates and alternatives can be found in the Oculus Go introduction.

Oculus Quest Development

All Oculus Quest developers MUST PASS the concept review prior to gaining publishing access to the Quest Store and additional resources. Submit a concept document for review as early in your Quest application development cycle as possible. For additional information and context, please see Submitting Your App to the Oculus Quest Store.

Peer-to-Peer Networking

Note: You are viewing the Unreal version of this topic. To view this topic for Unity development, see Peer-to-Peer Networking (Unity). To view this topic for native development, see Peer-to-Peer Networking (Native).

Peer-to-Peer (P2P) networking allows your app to establish a connection and send data directly between users.

There are a number of uses for P2P networking. Some common implementations include, using P2P to exchange chat messages between users, updating gameplay data in lower latency, or update avatar positions in real-time. Our P2P service connects users to exchange data directly.

The Oculus Platform P2P allows you to choose between two send policies to transmit data depending on your use-case and the needs of your app.

  • Reliable connections transmit data that will be delivered once and in the order that messages are sent. The networking layer retries until each message is acknowledged by the peer. Outgoing messages are buffered until a working connection to the peer is established. Reliable messages are useful when using P2P to send text chat messages that need to be delivered once and in the order that the user sent them, but not necessarily instantaneously.
  • Unreliable connections transmit data as best-effort, but cannot guarantee delivery in a specific order or time-frame. Any messages sent before a connected state is established will be dropped. Unreliable messages are useful when you’re using P2P to update game data in realtime and transmitting data quickly is more important than guaranteeing delivery once and in order. Note that messages sent over unreliable connections should be limited to 1200 bytes.

Note

P2P data may be routed through relay servers located inside Facebook's infrastructure when connecting to client devices that are behind network address translation (NAT), if a connection cannot be established from their detected external address. The VoIP data passing through a relay server is not inspected any more than is necessary to forward to the recipient; nor is it retained.

Integrate Peer-to-Peer Networking

P2P networking between users is handled by Unreal’s UNetDriver and most situations do not require any additional integration. To enable P2P ensure that the following is added to your DefaultEngine.ini file.

[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemOculus.OculusNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[/Script/OnlineSubsystemOculus.OculusNetDriver]
NetConnectionClassName="OnlineSubsystemOculus.OculusNetConnection"

If you’d like the client to act as the host of a game, you may add Set Is Server to your map.