Ali Şahan Yalçın
DocsLobby chat and invites

Lobbies

Lobby chat and invites

Text chat inside a lobby, and getting friends into it.

Chat

Steam gives every lobby a text channel with no server of your own required.

To send, call Send Lobby Chat Message with the lobby and your text.

To receive, bind On Lobby Chat Message on the SteamForge Lobbies subsystem. It gives you a Steam Lobby Chat Message:

FieldMeaning
Lobby IdWhich lobby
SenderWho sent it
MessageThe text

A message you send comes back to you through this event as well, so you do not need to add your own line separately. Render everything from the event and it stays consistent.

To show a sender's name, match the Sender against Get Lobby Members, or call Get Friend Info on the Friends subsystem.

INFO: Lobby chat is for the lobby only. Once players travel into the match they have left the lobby's context, so in game chat needs your own solution over the networking layer.

Inviting friends

Three ways, in order of how much work they are.

Steam's own invite dialog

The easiest, and usually the best. Call Show Invite Dialog on the SteamForge Overlay subsystem with your lobby ID.

Steam draws the friend picker, handles the sending, and delivers the invites. Anyone who accepts arrives on your side as On Lobby Join Requested.

You do not build any UI for this.

Inviting one specific friend

If you already have a friend picker of your own, call Invite Friend To Lobby on the SteamForge Lobbies subsystem with their Steam ID.

A Join Game button on your friends list entry

The most discoverable option, because it needs no action from you at all. Publish a Rich Presence connect string and Steam puts a Join Game button next to your name in every friend's list.

On the SteamForge Friends subsystem:

  • Call Set Presence Status with what friends should see, for example In a match.
  • Call Set Presence Connect String with +connect_lobby followed by your lobby ID.
  • Clear both with Clear Rich Presence when the player leaves.

    See Friends and presence for the details.

    Handling an accepted invite

    Whichever route the invite took, it arrives the same way. Bind On Lobby Join Requested and call Join Lobby (Async).

    This works whether the game was already running or the invite launched it. See Joining a lobby.