question

david-3 avatar image
david-3 asked

Unreal p2p OnlineSubsystem Matchmaking integration

Hi,

I have a full multiplayer p2p game working with UE4 Online Subsystem on Steam and PS4. Now I want to make my game cross-platform and I need to matchmake my players from Steam and PS4. But I'm kinda lost on that. To be clear, this is a example of what I'm trying to achieve:

- Player 1 starts the game, and press a "matchmaking" button, but that player don't find any suitable game, so he creates one (This player will be the host of the game) and enters a Lobby room. Inside that room player can select character, change their equipment, and select the map to play.

- Player2 starts the game, press "matchmaking" button, and find the Player 1 Lobby room and enters.

When both players select their characters and set themselves to Ready, game will start and both players will travel to the game map.

- Then Player 3 starts the game, press "matchmaking" button, and find the game from Player1 and Payer2. Player 3 enters that game, even when they have already started it.

Game ends after 10 minutes(for example) and the 3 players return to main menu.

I got this done everything with the HostSession, FindSession, JoinSession and ServerTravel functions from Unreal, and in game, I got everything done with the Unreal replication system, so I don't need a dedicated server for that.

What would be the best way to achieve this? I see that there is an adaptation of the OnlineSubsystem (https://gitlab.com/mtuska/OnlineSubsystemPlayFab/tree/master). This will be enough for having Matchmaking on my game? or do I need authentication, and do extra code on the UE4 replication system?

Thanks!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

The PlayFab matchmaking system is only designed to manage dedicated servers that are either hosted in PlayFab, or use our external game server hosting logic (https://api.playfab.com/docs/tutorials/external-game-servers), which requires that the server make use of Server API calls, which in turn require your Secret Key.

For player-hosted servers, you should look into using something like Photon Realtime as a way to have search for open game sessions.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.