Lobbies
Lobby data
The shared key and value store every member can read, and searches can filter on.
Lobby data is a small store of text keys and values attached to a lobby. It does two jobs:
Anything you want visible in a lobby browser has to live here, because a search reads lobby data and nothing else.
Writing
Set Lobby Data takes a lobby, a key and a value. Host only.
Typical use, straight after creating a lobby:
| Key | Value |
|---|---|
name | Alisahan's game |
map | Warehouse |
mode | deathmatch |
version | 1.4.2 |
The keys are entirely your choice. Pick a set, write them down, and use the same ones in your search filters.
Reading
Search results already include this map, so you do not need to call anything extra for lobbies you found through a search.
Size limits
Steam caps a single value at 8192 bytes, and keys at 255 characters. Lobby data is for small settings, not for content.
If you need to move more than that, send it over the networking layer once players are connected.
Publishing a game server
When the host starts the match, they publish where everyone should connect:
Version gating
Publishing your build version as lobby data lets you keep incompatible players out before they join rather than after:
version.The Sessions layer does this for you if you would rather not build it.