Sign In Register

How can we help you today?

Start a new topic

Unreal 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 GameSparks to matchmaking 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 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 the RealTime system from gamesparks.

I read that for creating lobbies, the best way is to create challenges in GameSparks, but I still don't understand how to tell one of the clients to be the host of the game without the Session interface, and how I can make travel the players together from the lobby to the game map, and make that map listening to let other players enter in the middle of the game.


Thanks!


Hi David, 


This can be achieved using the GameSparks MatchMaking Api. 


Rather than utilizing the OnlineSubsystem and its inherent funcitons,you will simply utilize the GameSparks SDK and send the relevant Api Requests. 


These are sent in the context of an Authenticated GameSparks player. The appropriate request can be sent based on the build target of your game binary. 


We have a tutorial which I believe deals directly with your use case here. It utilizes MatchMaking and our Realtime service to join players as well as initialize RealTime multiplayer sessions. 


It's worth noting that you can spin up sessions with one player by simply configuring your Match to accept a minimum player count of 1. 


Players can drop in and out of the session by simply enabling the drop in setting on your GameSparks Match Configuration. 

Happy to help - Patrick. 



Hi,


I lost some days working on that, following the tutorials and reading the docs from GameSparks. 


My first question in the private ticket was If I was able to use only the Matchmaking system from GameSparks and then use the rest of my code. They told me that Gamesparks allow me to do that (and more).

The reality is that this is not possible at the moment with GameSparks, since GS don't have any NAT Punch to conect players.


I'm just mad because I lost a high amount of time on this because the GS support just lie.


For people that have the same question than me, try to find more information about "hole punching" and take a look at libjingle, (this is my next step) 

Login to post a comment