Sessions
Why a join failed
Turning a failed join into something you can actually tell the player.
"Could not join" is the least useful thing a game can say. A join fails at several distinct points, Steam reports them through more than one mechanism, and each one needs a different response from the player, so without something structured they all reach them as the same shrug.
Join Session returns a Steam Join Diagnosis:
| Field | Meaning |
|---|---|
| Success | Whether it worked |
| Failure | A structured reason you can branch on |
| Player Message | Plain language, ready to put on screen |
| Technical Detail | For your log or a bug report |
| Worth Retrying | Whether trying again might work |
| Lobby | The session, when the join got that far |
The failure reasons
| Reason | What it means | Retry? |
|---|---|---|
| Steam Unavailable | Steam is not connected | Yes |
| Session No Longer Exists | The host ended it | No |
| Session Full | No room | Yes |
| Not Accepting Players | The match already started | No |
| Banned From Session | The host banned this account | No |
| Blocked | One player has the other blocked on Steam | No |
| Account Limited | Steam requires a purchase to use matchmaking | No |
| Wrong Password | Joined, then rejected on the password check | Yes |
| Version Mismatch | The host is on a different build | No |
| Travel Failed | Everything worked until the connection itself | Yes |
What is not a failure
Joining a session whose host has not started the match yet succeeds. The player is in the session, waiting, and travels automatically when the host starts.
That is the normal case for a pre match lobby, so treat Success as "you are in", not as "you are playing". If your UI needs to tell those apart, check whether the world changed, or drive it from the host's own start button.
Using it
The simplest useful handling is two nodes:
- Show Player Message in your UI.
- If Worth Retrying is true, show a Retry button.
That alone puts you ahead of most shipped games.
For more, branch on Failure:
- Wrong Password should clear the field and focus it, not send them back to the browser.
- Version Mismatch should point at whatever updates your game.
- Session Full should refresh the list.
The post join checks
Some of these can only be decided after the Steam level join succeeds, because none of the session metadata is readable until you are inside the lobby. Password and version are both in that group.
When one of those rejects you, SteamForge leaves the lobby again on your behalf. Without that the player would show as a member of a session they were refused from.