Ali Şahan Yalçın
DocsCreating a lobby

Lobbies

Creating a lobby

Host a lobby other players can find and join.

A lobby is Steam's meeting room. Players gather in one, agree on settings, then travel into the match together. It is the foundation of nearly every Steam multiplayer flow.

The node

Use Create Lobby (Async).

InputMeaning
Lobby TypeWho can find it. See the table below.
Max MembersHow many players can be in it, including you.
OutputMeaning
On SuccessThe lobby exists and you are in it
On FailureIt was not created. Read the Result.
LobbyThe new lobby's ID. Keep this.
ResultSuccess, or why not

Lobby types

TypeWho can find it
PublicAnyone searching. Use this for a public lobby browser.
Friends OnlyOnly the host's Steam friends.
PrivateNobody. Invite only.
InvisibleNobody, and it does not appear in the host's own list either. For matchmaking backends.

A minimal host flow

  • Call Create Lobby (Async) with type Public and 4 members.
  • On On Success, store the Lobby output somewhere you can reach later, for example a variable on your game instance.
  • Publish anything players should see before joining with Set Lobby Data. See Lobby data.
  • That is all it takes to appear in other players' searches.

    Naming the lobby

    A lobby has no name of its own. What a browser shows comes from lobby data you publish:

  • After creating, call Set Lobby Data with key name and your lobby's name.
  • Anyone who finds the lobby reads it back with Get Lobby Data.
  • The keys are entirely yours. Pick them once and be consistent.

    INFO: If you would rather not design your own keys, use the Sessions layer instead, which defines a standard set for you and creates the lobby in the same node.

    You are the owner

    Whoever creates a lobby is its owner, which SteamForge calls the host. The owner is the only one allowed to change lobby settings and lobby data.

    If the owner leaves, Steam automatically hands ownership to another member. Nothing is lost, but the new owner has to notice and take over. See Host migration.

    Leaving

    Call Leave Lobby with the lobby ID. If you were the last member, the lobby ceases to exist.

    Always leave explicitly when the player backs out. A lobby you forget to leave keeps your slot occupied until Steam times you out.

    Where to go next

    Finding lobbies, so other players can discover the one you just made.