Party Beacon? How does it work? o.O

Haya,
I was stumbling around trying to figure out how to deal with party systems for parties dropping into/out of servers and stumbled on party beacons here. These seem like exactly what I want, but the documentation is sparse, and there aren’t many hints in code for how you go about hooking them up. I’m also curious how possible it is to get these hooked up to matchmaking through unreal or if it would be better to ignore the online subsystem matchmaking layer and go straight to steam if we decided to go this way.

I was wondering if anybody knew about any good documentation or had some ideas about how one might get started poking this bear.

Any info would be great. Pretty much all I have to go with right now is the couple dozen function names in PartyBeaconHost and PartyBeaconClient, but neither really does much to explain the expected workflow with them.

Thanks much!

hey, I’m the guy that started that post.

I’m still trying to put this together, admittedly it keeps taking a back seat to other systems, but I literally just started back into it tonight.

I’ve been using the UT source code as a starting point because they’ve started to implement a party system in it using the beacons and the new UParty class.

Might make sense to put our two heads together and figure this out. If you’re interested PM me, I’ll give you contact details.

It’s actually a very big system if you want real party matchmaking. But the idea behind it is quiet simple (let see if I can summarize it up a bit):

First of all we will have to handle 2 sessions, you might aleardy noticed that there is a session name in the matchmaking methods, those sessions are normally called Game and Party. So far so god (:D), what we want to achieve in party matchmaking is simple: find a group of people without establishing an unreal connection. This is achieved by using a network beacon system (hence the name Party Beacon). When you search for a party session you will perform a standard matchmaking search got but specifying that you want a Party session (those I mentioned earlier), once you have found one that suits your needs to try to connect to it, but not with a JoinSession call instead you connect your PartyBeaconClient to that session (it will have a different por that the normal game sessions) because the host must have setup a PartyBeaconHost already.

Once you are connected to the PartyHost you are not really connected with an unreal connection to it so any network interaction is done serializing a set of messages that go through those Beacon classes (it’s just a simple socket connection thata all). There are several predefined messages for joining, leaving etc

So whats next? The party host will start a Game search to find a team to play against, again if you find one the host will tell all their connected PartyMembers to connect to found host. This time the idea would be connecting with a real unreal connection and joining the server.

Why do we need all the above? Simple, if we finish the match we are actually connected to a host that might not be our PartyHost and we want to be together again with the players we made the party with. The good thing is that you know what your previous party host was, so when you return to the party lobby everyone knows exactly where to connect to.

One thing that is important here is that we have not discussed the hosting of the beacon/party nor the game session. This is done randomly. If you do not find a party session after X attempts you might use a random chance if you go into hosting mode. The chance should be low and increase overtime. Also if you are hosting and no one joins your session you should just switch to search mode again. That same schema applies also to the part when we start searching/hosting for a game session.

I have left an important part uncovered, invites/friends and splitscreen :stuck_out_tongue: but you will see how they work together, just take in mind that you have to travel with all players that are connected to you, for example if you send an invite to a friend you could consider yourself the party leader so once you go back to the party lobby only you and your friend will be there.

After writing all this I guess it’s not simple after all xD

2 Likes

Can you explain this part a bit more? How do I set up a connection with the beacon system? And how do I pass data between everybody connected to the party beacon vs. actual game? Just RPCs as usual?

Yes with RPCs, the good new is that the beacons in UE4 are way better than the ones we had in UE3, in UE3 it was completely different from any other unreal network system. For the client beacons you would start calling ALobbyBeaconClient::ConnectToLobby or APartyBeaconClient::RequestReservation, the first is to connect to a lobby and the later to send a reservation for a game session. For a game session you will send reservations to ensure a spot once you travel to the game server to avoid disconnections in cases where the server is full for example. The host beacons have similar methods to it’s setup.

Hrm. It looks like ALobbyBeaconClient wasn’t committed until after we last upgraded (we’re on 4.8). Do you know where it might have lived before moving, or would it just be better to pull the new stuff from when it was put in?

I think it was just a simple APartyBeaconClient with a different session name and some extra work on your side. Also there are earlier versions of the Beacon system that works with plain sockets and not with UEs RPC system.

Cool. Thanks for your help. I’ll look into it a bit more. I’ll try to add more info as I stumble my way around :stuck_out_tongue:

Just re-replying to this thread because we’ve continued work on this. I feel like there’s a lot of misinformation in here, and thats simply due to a lack of documentation.

APartyBeaconHost is meant for the game server. It’s used to reserve spots on a server that hasn’t started its match yet. You can form a party and reserve spots for every member and the server will then handle putting you all on the same team, or deny the request because you wouldn’t fit.
APartyBeaconClient is meant for the client, and only on the party leader. The party leader sends the reservation, no one else.

The actual persistent party (ala Rocket League?) exists in IOnlinePartyInterface and has zero implementation. Its up to you, your game, or the back end you’re using to provide implementation for it. Take a look at UParty and UPartyGameState, both of which make heavy use of this class.

We’re just about to start our implementation of it and we’ll either be writing up a tutorial when its said and done or perhaps provide a barebones subsystem that implements that interface that other developers can pick up and use.

1 Like

Any news about documentation or tutorials? I would like to know what the party system can do, and what is already implemented and actually working. As overlawled suggested I am looking at UParty and UPartyGameState, but I still haven’t figured out a lot. Without the implementation of UOnlinePartyInterface, UParty is unusable, but maybe something can be done using beacon host and beacon client directly?

Another question, would the beacon system be suitable to ping servers found with session search on Steam? This would be useful since, as reported several times, sessions are all returned with ping 9999 because Steam does not give that information.

matfer, about your last question only, what seems to be the trick these days is to do an A2S_INFO server query and time that, that will give u latency
Example (for phyton but you should be able to recreate it easy in cpp) here (look for the ping function)

Thank you, didn’t know about that trick.

Sure thing :slight_smile:

I tried creating subclasses of PartyBeconHost and PartyBeaconClient. I create and initialize the host beacon on the server and it seems fine, while on the client after creating the client beacon I call RequestReservation and I get this:

[2016.12.07-15.06.19:972][858]LogNet: CreateNamedNetDriver failed to create driver from definition BeaconNetDriver
[2016.12.07-15.06.19:973][858]LogBeacon:Warning: RequestReservation: Failure to init client beacon with steam.76561198050836541:15000//Game/Maps/MainMenuLevel.

I added some beacon related lines to DefaultEngine.ini as suggested here AOnlineBeaconHost and BeaconNetDriver problem - C++ - Unreal Engine Forums
but I still get the same error. Any idea?

I was putting the driver in the wrong section of the config (Engine.Engine instead of Engine.GameEngine). However now I have this error on RequestReservation:

[2016.12.07-16.48.04:851][343]LogInit: SteamSockets: Socket queue 32768 / 32768
[2016.12.07-16.48.04:852][343]LogNet:Warning: Failed to init net driver ConnectURL: steam.76561198050836541:15000//Game/Maps/MainMenuLevel: SteamSockets: binding to port 0 failed (0)
[2016.12.07-16.48.04:852][343]LogNet: DestroyNamedNetDriver IpNetDriver_0 [IpNetDriver_0]
[2016.12.07-16.48.04:852][343]LogExit: IpNetDriver_0 IpNetDriver_0 shut down
[2016.12.07-16.48.04:852][343]LogBeacon:Warning: RequestReservation: Failure to init client beacon with steam.76561198050836541:15000//Game/Maps/MainMenuLevel.

My bad, I mistyped the driver name in the ini.

Looks like Steam delays connections for at least 5 seconds. Based on what I know, one of the main reasons to use beacons is that they make faster connections (wrt standard session join), because they don’t need to load a new map.
However, the loading time of a emtpy lobby map should be much less than 5 seconds, so is using beacons on Steam really that beneficial?

Bump. Look at this now for my own implementation.

I want to ideally setup an IOnlinePartyInterface for Steam since there isn’t a fallback option still as @overlawled mentions above - so if anybody has since looked at this or implemented one, that would be useful. Thread Here: IOnlinePartyInterface / Party System Implementation - C++ Gameplay Programming - Unreal Engine Forums