Steamworks Matchmaking with UE4 OnlineSubsystem not supported?

So after being Greenlit we started working on Matchmaking for our game using the Steamworks API and the Unreal Engine Online Subsystem. There isn’t much documentation available for it and we have now run into some issues that haven’t really been documented well and searching for answers yielded no results.

So we tried implementing the it through the Online Subsystem and it simply didn’t work, so we took a look at the Source in GitHub. We found the OnlineSessionInterfaceSteam.cpp and all we could find for Steamworks Matchmaking was that the function StartMatchmaking only has a log call “Matchmaking is not supported on this platform.” and it always returns false.

So is the Steam Matchmaking simply not supported at this point (contradicting the Online Subsystem Steam Interface | Unreal Engine Documentation Steam documentation) or is it worked on or did we just not do it properly?

We also found that some aspects of the Leaderboard system is lacking as well; in the file OnlineLeaderboardInterfaceSteam.cpp function WriteOnlinePlayerRatings does nothing.

So have we just misunderstood something or are these aspects something that are not supported (will there be support if that’s the case)?

Sorry for the confusion and apologies for lack of documentation.

The StartMatchmaking function is an Xbox LIVE specific function that has no analogue on Steam.

Steam works with matchmaking as long as you use the Sessions APIs and the Create/Destroy/Update/JoinSession calls.

Looking at the ShooterGame example, you should be able to see how sessions are created/updated/destroyed by a server and how they are found/joined by a client. There is also Start/EndSession, but that is not quite as important on the Steam platform.

When you create the session settings and set FOnlineSessionSettings::bUsesPresence=true, you will use Valve’s lobby APIs. If this is false, you will be using Valve’s GameServer APIs. Lobbies give you free authentication and also access to their newer/more straightforward matchmaking APIs. However, the GameServer APIs are required if you plan to do standalone dedicated servers. I would suggest you go the lobby route for now as it is newer and should save you some time.

Specific Steam implementations are found in

  • OnlineSessionAsyncLobby.h/.cpp
  • OnlineSessionAsyncServer.h/.cpp

As for leaderboards, again I believe WriteOnlinePlayerRatings was some function written for one of the console platforms that may not have an analogue in Steam, or if it does, wasn’t implemented. That being said, leaderboards still should work without this. The function WriteLeaderboards should do what you want.

Thank you for the answer; the matchmaking is now working and is using the Lobby (some comments on the FOnlineSessionSettings::bUsesPresence=true might be useful as we had no idea that was it)

Still some issues getting the Steamworks ratings to work, but we’ll try to work it our ourselves.

Cheers,
Tatu

Were you able to get the leaderboard stats to write at all? We were able to figure out that when writing stats to the steam leaderboards, you had to write the stat using WriteLeaderboardInteger (execute on server) in the PlayerState using the PlayerController as a replicated variable and giving the stat a name, for example TestStat. Then in steamworks, under stats, create a new stat and name it TestStat_TestStat. We got it to work a few times after trying every combination of writing the integer and reading the integer. Upon returning to work this morning, however, I’ve found that the stats are no longer working.

I’m not sure what else to do at this point. Any assistance would be greatly appreciated,

Chad

Hi Chad,

yes we did get it working, though at the moment we aren’t getting the numbers updated in Steam Leaderboards Page, but they are working fine otherwise. I don’t have much else to say, but I can ask my programmers next week.

Cheers, Tatu

Greetings. Do you have any more info on this "free authentication "? It seems to mean that it would use some sort of steam authentication with session tickets?
Any documentation on how to implement this for a blueprints only project?

Cheers

From Valve’s documentation:

Authentication
Any user in a Steam lobby is already fully authenticated with the Steam back-end. There is no need for the game to do any more authentication steps with lobby users, unless it’s looking to see if they’re VAC banned (see Valve Anti-Cheat Technology). If a user tries to log in from a second location with the same account, their prior login will automatically be removed from any existing lobbies.