Steam: Steamworks & SteamPipe
Steam is where most PC players buy games, and releasing there is more involved than on itch.io: a partner account, a fee per game, a store page reviewed by Valve, a mandatory "Coming Soon" period, a build review, and an upload system (SteamPipe) built around depots and branches. Valve's Steamworks documentation is the authority; requirements, fees and timelines change, so read the current pages when you plan.
The path to release, in order
- Join Steamworks (the partner program): company or personal details, bank and tax information, identity verification.
- Pay the Steam Direct fee for each new game (an app). At the time of writing it is a fixed fee per app that Valve can return once the game reaches a revenue threshold; check the current amount and terms.
- Wait out the waiting period Valve applies to new accounts and new apps before release.
- Build the store page: description, capsule images, screenshots, trailer, tags, system requirements, content survey (mature content), supported languages. Submit it for review.
- Go "Coming Soon": the page is public and collects wishlists. Valve requires a minimum Coming Soon period before release; publish it as early as you can (Wishlists & Launch Planning).
- Upload a build with SteamPipe and submit it for build review (Valve checks that it launches and matches the page).
- Release: press the button, or set a release date.
SteamPipe concepts
| Term | Meaning |
|---|---|
| App | your game (an App ID); DLC, demos and soundtracks are apps too |
| Depot | a set of files with its own Depot ID, e.g. one depot per OS, or a shared content depot plus small per-OS depots |
| Build | one upload of one or more depots, identified by a Build ID |
| Branch | a pointer to a build: default (what players get), beta, private branches with passwords for testers |
| Package | what is sold or granted: which depots a player receives (configured in Steamworks) |
Steam downloads only changed chunks of a depot when a build updates, so don't repack your data into one huge archive per build: change one asset and every player re-downloads the whole archive. Engines' pak/pck files are usually fine if they are split sensibly, but check the patch size Steam reports for a small change.
Uploading with steamcmd and a build script
The Steamworks SDK ships a ContentBuilder folder: builder/ (with steamcmd), content/ (your build files), output/ (logs and cache) and scripts/ (build scripts). An app build script is a VDF file (Valve's key-value format) that says which local files go into which depot:
"AppBuild"
{
"AppID" "1000" // your App ID
"Desc" "1.4.2 (CI build 587)" // internal description, shown in Steamworks
"ContentRoot" "..\content\" // relative to this script
"BuildOutput" "..\output\"
"SetLive" "beta" // optional: set live on a beta branch
"Depots"
{
"1001" // Windows depot
{
"FileMapping"
{
"LocalPath" "windows\*"
"DepotPath" "."
"Recursive" "1"
}
"FileExclusion" "*.pdb" // never ship debug symbols to players
}
"1002" // Linux depot
{
"FileMapping"
{
"LocalPath" "linux\*"
"DepotPath" "."
"Recursive" "1"
}
}
}
}Then run steamcmd with your build account:
# Windows
builder\steamcmd.exe +login <build_account> +run_app_build ..\scripts\app_build_1000.vdf +quit
# Linux / macOS
./builder_linux/steamcmd.sh +login <build_account> +run_app_build ../scripts/app_build_1000.vdf +quitThings the documentation stresses:
SetLivecan't target thedefaultbranch; making a build live for all players is done in the Steamworks web UI. That's deliberate: a CI mistake can't ship to everyone.- Use a dedicated build account with only the permissions it needs, not your main account.
- Steam Guard asks for a code on new machines. For CI, log in once interactively, then preserve steamcmd's
config/config.vdfbetween runs (as a secret or cached file), so later logins don't need a code. - Each depot can also be described in its own
depot_build_<id>.vdffile and referenced from the app script, which helps when depots are shared between apps (a demo and the full game, say).
A runnable model: which files land in which depot?
Depot mappings plus exclusions are easy to get subtly wrong (a forgotten Recursive, a .pdb that slips through). A dry run of the same rules against the build folder catches it:
from fnmatch import fnmatch
build_files = [
"windows/StarCatcher.exe", "windows/UnityPlayer.dll", "windows/StarCatcher_Data/data.unity3d",
"windows/StarCatcher_Data/Plugins/x86_64/steam_api64.dll", "windows/StarCatcher.pdb",
"linux/StarCatcher.x86_64", "linux/StarCatcher_Data/data.unity3d", "linux/notes_internal.txt",
]
depots = {
1001: {"local": "windows/*", "recursive": True, "exclude": ["*.pdb"]},
1002: {"local": "linux/*", "recursive": False, "exclude": ["*.txt"]},
}
for depot_id, rule in depots.items():
base = rule["local"].rsplit("/", 1)[0] + "/"
included, skipped = [], []
for path in build_files:
if not path.startswith(base):
continue
rel = path[len(base):]
if "/" in rel and not rule["recursive"]:
skipped.append(f"{rel} (subfolder, Recursive off)")
elif any(fnmatch(rel.rsplit('/', 1)[-1], pat) for pat in rule["exclude"]):
skipped.append(f"{rel} (excluded)")
else:
included.append(rel)
print(f"depot {depot_id}: {len(included)} file(s)")
for f in included:
print(f" + {f}")
for f in skipped:
print(f" - {f}")depot 1001: 4 file(s)
+ StarCatcher.exe
+ UnityPlayer.dll
+ StarCatcher_Data/data.unity3d
+ StarCatcher_Data/Plugins/x86_64/steam_api64.dll
- StarCatcher.pdb (excluded)
depot 1002: 1 file(s)
+ StarCatcher.x86_64
- StarCatcher_Data/data.unity3d (subfolder, Recursive off)
- notes_internal.txt (excluded)
In this dry run the rule for depot 1002 forgot Recursive (unlike the VDF above), and the Linux build would ship without its data folder. That's the kind of mistake the build review may not catch if the game shows a black window rather than an error.
Steamworks SDK features
Achievements, Steam Cloud saves, stats and leaderboards, rich presence, Steam Input and multiplayer services come from the Steamworks SDK (C++). In engines you use a wrapper: Steamworks.NET or Facepunch.Steamworks in Unity, the Online Subsystem Steam plugin in Unreal, GodotSteam in Godot. Initialise it at startup, call its callback pump every frame, and test with the Steam client running. Steam Cloud can also be set up without code (Auto-Cloud: Steam syncs files in folders you list).
Test yourself
Can a build script's SetLive make a build live on the default branch?
- Yes
- No, the default branch is set live in the Steamworks web UI
- Only for demos
- Only with a password
What is a depot?
- A store page
- A set of files with its own ID, for example the Windows build or shared content
- A sale
- A beta branch
How do you keep steamcmd from asking for a Steam Guard code on every CI run?
- Disable Steam Guard
- Log in once and preserve steamcmd's config/config.vdf between runs
- Use your personal account
- Add the code to the VDF