Lobbies and using steam Join/Invite Friend feature?

Creating sessions and being able to join it via a server name is great and all, but realistically if you’re creating a co-op game you’ll likely want to create a lobby and either invite friends of let them join your game via the steam overlay. I found that the session interface does have an abstraction for sending invites for a session and delegates that can then handle an accepted invite etc. I’m not quite sure if that would work though. Also I was unable to find a delegate that would match someone joining a game via the steam overlay (i.e. right click friend → Join Game). Do the session interface invite methods/delegates allow you to invite via steam? And is it possible to get Join Game to work with the way we’re creating a session here?


It should be theoretically possible to do this although I’ve never explored the possibility myself. This is a potential area where data protection issues come into play and generally we avoided this on purpose in the course. If you think about it, Steam probably doesn’t permit third party titles access to information about your friends who may or may not have the title. This would be a serious breach of data protection acts. This is often why multiplayer games need you to register with a third party tool (e.g. Ubisoft games, borderlands games, xbox live and so on).

In fact, xbox live is a good example. It is handled by the console and not the game. So, I imagine steam should be handling this and not the game itself.

I know this doesn’t give you the answer you’re looking for but you have to consider these issues when dealing with multiplayer.

All the data is anonymous so there’s no data protection issues here in play. And equally you can’t join a game over the steam overlay if your friend has it set to private as you won’t see them as in game, so there wouldn’t be any leakage of titles owned.

If you create a session as we’ve done here you can in fact see in the logs that the session was created as a lobby and if you Join Game through the friends overlay that the lobby is found and it gives you the details needed to to connect to the lobby. The only issue is if the online subsystem for steam supports the delegate to handle that type of joining or not. If you just bypass the OSS you can just use Steamworks to do this same logic, but I’m not sure if that will allow the replication framework of unreal to work as intended or not.

Steam OSS uses steamworks. You can upgrade it but then you generally have to rebuild the engine. the OSS for steam is just a wrapper for the steamworks library.

Also, consider a malicious actor can use this data (I’m talking IP address here) to identify the exact location a person is connected as location services in a browser does the same thing. This is why care has to to be taken when dealing with these things.

Generally, anything that could be used in such a way is not covered. We also generally can’t support outside of the course unless we know ourselves how to deal with it. In this case, never tried this.

if you do wish to go down this route, reach out in the discord #unreal channel and ask there. I’m sure there will be people who may have attempted this.

I realize that the Steam OSS uses Steamworks under the hood. The original question I had basically boils down to, does the session interface expose/map delegates such as
ISteamFriends Interface (Steamworks Documentation) and
ISteamMatchmaking Interface (Steamworks Documentation)
as we’re already creating the session as a lobby.

I’m still not quite sure I understand how IP comes into play here as we’re just talking about joining a game via the steam overlay, at which point the session already exists and is advertising and won’t give you any more information than searching for a session does. In fact as far as I understand it steam networking by default will work via a relay so it would be unlikely that you’d be able to get the IP regardless of whether it’s a session or a lobby. Joining via the overlay may even arguably be safer as you’d be joining the session via an abstracted lobby id rather than searching for sessions and then hoping that the Server Name you and your friend chose happens to be unique.

In any case it sounds like this isn’t the place to explore this for one reason or another so I’ll look elsewhere. For anyone that may be interested in this topic, it looks like Unreal Engine has a beta feature called Online Services which seems to be a sort of replacement for the Online Subsystem which gives a bit more granular control not only for sessions, but lobbies, achievements and more. I’ll probably be exploring that next. Online Services in Unreal Engine | Unreal Engine 5.3 Documentation

That actually looks good. The main issue I’ve always had with OSS is you need builds for different platforms. If they have a single library that enables different platforms, that would be excellent.

Thanks for sharing the link.

IP Address tracing could be performed by malicious bots/actors if they had access to friends lists is what I was referring to. For the server to establish a connection in a game, it would know their IP Address and the very least a name. Not much use in their own right but could be put to use. wouldn’t be the first time an app gets into an app store that gathers info on users and then uses it with bad intent. If you created an app that did indeed have friend names, and ultimately IP addresses and it was compromised, you could be responsible for any and all Liability. This is something you as a developer have to consider.

Now, given all of this, here’s something I found. It may or may not be of any use but there’s little out there:

Inviting / joining steam friends - Development / Platform & Builds - Epic Developer Community Forums (unrealengine.com)

Privacy & Terms