New To The Forum? Click Here To Read The How To Guide. -- Developers Click Here.

Oculus platform & Unreal listen server

FredrumFredrum Posts: 187
Art3mis

Hello,

I am looking into ways to possibly use a vendor platform (oculus/steam) to help me make and possibly run a lobby but then after matchmaking have the two players of the game connect directly to each other for the gameplay, with one player running as Unreal listen-server.

Would this be possible with the Oculus platform?

Cheers
Fred

Comments

  • brian_jewbrian_jew Posts: 61 Oculus Staff
    Hi Fredrum,

    I'm not sure about the lobby part (do you mean like a waiting room where players just hang out and wait?), but the matchmaking and having one be the listen server is possible with the Oculus platform

    It sounds like you want a 1:1 matchmaking and that's exposed in the UE4 SessionInterface.  
    1) First you set up a matchmaking pool in the oculus dashboard.  See doc for more details: https://developer3.oculus.com/documentation/platform/1.1/concepts/dg-matchmaking-pools/
    2) Copy these settings to your DefaultEngine.ini to enable the Oculus NetDriver: https://developer3.oculus.com/documentation/game-engines/latest/concepts/unreal-platform/#unreal-platform-d57766e353
    3) From there each client can call StartMatchmaking() through the UE4 online session interface
    4) When the OnMatchmakingCompleteDelegates gets triggered, it'll has a result of a oculus room the two can join
    5) Have both users join the room with JoinSession() from the SessionInterface
    6) Check to see who is the Session owner after joining.  
    7) Have the owner start up as a listen server.
    8) Have the non-owner open a connection with "open <oculus_id_of_owner>.oculus" after the listen server starts up.  (Right now the non-owner has to wait for the listen server to start before connecting.  A patch is coming soon that'll let the non-owner start the connection while listen server is still being created.)

    Let me know if you need any details on those steps, but I hope those docs point you in the right direction!
  • FredrumFredrum Posts: 187
    Art3mis

    Hi Brian,

    thank you very much for the detailed respons that's awesome and should be good to get started.
    I'm personally not super hot on c++ so I might have to wait until I have a programmer on board but I like to have a good understanding of the options so I'll read through that documentation.
    Its great to know that it is possible.

    Btw, with the lobby I just meant a listing of available players, which will be presented to the player in text/screen form. Ie not actual avatars in a room or anything like that. 

    Cheers
    Fredrik
  • brian_jewbrian_jew Posts: 61 Oculus Staff
    Glad I can help

    Fredrum said:

    Btw, with the lobby I just meant a listing of available players, which will be presented to the player in text/screen form. Ie not actual avatars in a room or anything like that. 
    Yes we can do that as well:
    1) Set up a matchmaking pool with "Browse" mode.  This will let the rooms being created be found and searchable as oppose to being matched into there.
    2) Some players will start their own sessions with CreateSession() and pass in the oculus matchmaking pool.
    3) Other players call FindSessions() with the oculus matchmaking pool as part of the settings. It'll return a list of session that can be joined by the player.
  • ginopelosoginopeloso Posts: 25
    Brain Burst
    brian_jew said:
    Glad I can help

    Fredrum said:

    Btw, with the lobby I just meant a listing of available players, which will be presented to the player in text/screen form. Ie not actual avatars in a room or anything like that. 
    Yes we can do that as well:
    1) Set up a matchmaking pool with "Browse" mode.  This will let the rooms being created be found and searchable as oppose to being matched into there.
    2) Some players will start their own sessions with CreateSession() and pass in the oculus matchmaking pool.
    3) Other players call FindSessions() with the oculus matchmaking pool as part of the settings. It'll return a list of session that can be joined by the player.
    I'm trying to do the same. I have a matchmaking pool with Browse mode. On one side I create the session (with the Oculus CreateSession); on the other side I search for sessions with "FindMatchmakingSessions". I find the session, but when I call JoinSession passing the found session I obtain this warning: "Cannot map local player to unique net ID", and the method JoinSession fails. What can I do to join the session once found it?
Sign In or Register to comment.