Ask me!‎ > ‎

Steamworks API Multiplayer Lobby and UDK

posted Mar 24, 2012, 4:42 PM by BaneDeath
I came across your website and saw you had steamworks experience. I have been working on a small game and busy with the multiplayer. What I'm trying to do is to use Steam Lobby and UDK to host a game and to list all available lobbies to join a specific game.

UDK already has the whole steamworks API integrated but everyone is only using the achievements and not the lobby that supports NAT.

We used the Lidgren network for our multiplayer code in Galactic Arms Race so we never had to worry about lobbies or master server stuff through steamworks api.  When we did our steamworks integration, we had to write a c++ wrapper dll that could be loaded in c# for the pertinent functions from the main steamworks api for functions that we used.

Your best bet is to make a standalone C++ .dll project which interfaces with steamworks and exports another .dll.  Then use UDK's dll bind to load in your custom dll and make a class to interface it.  There is lots of documentation with this route.  UDN Documentation also shows this sad note

"The lobby system is disabled by default, enable it in OnlineSubsystemSteamworks\Globals.uci (requires UScript and C++ recompile to enable) see OnlineLobbyInterfaceSteamworks.uc\UOnlineLobbyInterfaceSteamworks.cpp

 Note: At the moment, this is a Steamworks-specific interface, not a generalized interface compatible with other online subsystems as a result, it's subject to considerable change and binary compatibility breakage, since it may need to be generalized in the future."

Additionally you will need to have you game approved by Steam and you get your appid code, which you probably don't have at the moment.  You will need this code before you can get the Steamworks API to write the wrapper class and create your achievements and stats on their browser interface.

If you want to take a different approach away from steamworks, our lobby system in Chroma (UDK) we used google app engine to query and maintain a database that is updated by the servers every minute with a heartbeat.  When the client does a query it will return the servers that have been updated within the last five minutes.  We started with this tutorial.