Docs / Steamworks compatibility
Steamworks features on 0x
Partly liveWhat each Steamworks feature does when a game runs on 0x, from accounts and ownership to stats, cloud, Workshop, inventory, lobbies, networking and game servers.
Each Steamworks feature below is served by sg-steamclient and the 0x platform API. The game calls the same functions as on Steam and gets the same callbacks. What is behind each call is 0x's: the REST API documents the service side.
#Accounts, ownership and DLC
| Steamworks | On 0x |
|---|---|
ISteamUser::GetSteamID, ISteamFriends::GetPersonaName | The signed-in 0x account as a 64-bit SteamID, and its display name. |
ISteamApps::BIsSubscribed, BIsSubscribedApp, BIsDlcInstalled, DLC lists | Ownership comes from the account's entitlements on 0x. |
Betas (GetCurrentBetaName, branches) | Branches you publish with sg-content publish --branch. Players pick a branch in their library, and private branches can have a password. |
GetLaunchCommandLine, GetLaunchQueryParam | What the 0x app passes in (join links, +connect). |
Auth tickets (GetAuthSessionTicket, GetAuthTicketForWebApi, BeginAuthSession) | Ed25519-signed by 0x, valid for 1 hour, issued only for owned apps. Online verification is one-shot, so a ticket cannot be replayed. Servers can also verify offline with the keys at GET /v1/keys. |
| Encrypted app tickets | Issued by 0x with up to 128 bytes of your data; your server decrypts them through the API with its game-server session. |
| Offline | Each online session caches identity, schema, ownership and stats. An offline start uses them, and ownership is honoured for 30 days. Stats and cloud writes that failed offline are replayed before the next online session. |
#Stats, achievements and leaderboards
- Stats (int, float, average-rate) and achievements, with the app's schema rules enforced on the service side (min, max, increment-only).
UserStatsReceived_tarrives after sign-in.StoreStatsis written by an ordered worker and flushed at shutdown.- Global achievement percentages and global stats (
RequestGlobalAchievementPercentages,RequestGlobalStatswith daily history). - Leaderboards: find or create, upload with details, download global, around-user and
friends ranges, and attach a file to an entry (
AttachLeaderboardUGC). - Achievements and leaderboards also appear on the game's store page.
#Steam Cloud (ISteamRemoteStorage)
Files are kept per user and app, mirrored to 0x. 0x syncs them down before the game starts and up as the game writes them. Uploads are hash-checked, and file bytes go through pre-signed URLs, never through the API itself. Shared files (UGC handles) are supported, up to 200 MB each.
#Workshop (ISteamUGC)
- Publishing:
CreateItem,StartItemUpdate, theSetItem*calls, thenSubmitItemUpdate.GetItemUpdateProgressreports each stage and the bytes sent. - Queries: all items, user lists and details; tags (required, excluded, grouped), text search, key-value tags, created and updated ranges; the usual rankings, in pages of 50.
- Visibility: public items are listed. Unlisted items are found by ID only. Friends-only and private items are visible to their owner.
- Subscriptions:
SubscribeItemdownloads and installs the item, as the Steam client does. Votes, favourites, played and completed actions work too.
#Inventory (ISteamInventory)
Items, item definitions, promo items, exchanges (crafting), playtime drops (TriggerItemDrop,
using 0x's play time), trades, and purchases. Every result is signed by 0x: serialized results
can be verified by a server with the keys at GET /v1/keys.
#Friends, presence and parties
- The friends list, friend groups, nicknames, players played with, clans and clan chat, friend messages, follows and game invites, all backed by 0x's social graph and kept current by push events.
- Rich presence: keys you set appear to friends. Join requests (
GameRichPresenceJoinRequested_t) work. ISteamParties: party beacons in the player's clans.
#Lobbies and matchmaking (ISteamMatchmaking)
Create, search (string, numerical, near, slots, count and compatibility filters), join, leave,
owner data and member data, chat, invites, owner changes, linked lobbies, and the lobby's game
server. Every change is pushed to the members, and the usual Lobby* callbacks fire. Lobbies are
ephemeral, as on Steam. See also matchmaking on 0x.
#Server browser and game servers
ISteamGameServer, ISteamGameServerStats and ISteamMatchmakingServers work: logon (anonymous,
or with a registered token), heartbeats with rules and player lists, the internet and LAN lists
with Steam's master-server filters, PingServer, ServerRules, PlayerDetails, player
authentication and licence checks. Details: game servers.
#Networking
| API | Transport on 0x |
|---|---|
ISteamNetworkingSockets P2P, ISteamNetworkingMessages, ISteamNetworking (legacy P2P) | Peers are addressed by SteamID. Traffic goes over QUIC: a direct connection through NATs, or a 0x relay, or the 0x push stream when QUIC is not available. Unreliable sends are really unreliable on QUIC (datagrams). Reliable ones are ordered per lane. |
ISteamNetworkingSockets IP (CreateListenSocketIP, ConnectByIPAddress) | TCP between two sg-steamclient ends, for dedicated servers. Every send is delivered reliably. |
Hosted servers and relay tickets (ReceivedRelayAuthTicket, GetHostedDedicatedServer*, game-coordinator logins, certificates) | 0x signs the relay tickets and certificates. A publisher of the app issues them through the API. |
FakeIP (BeginAsyncRequestFakeIP, CreateFakeUDPPort, ConnectByIPAddress to a FakeIP) | 0x hands out global FakeIPs in 169.254.128.0/17 (unique per app, up to four ports). Traffic is carried over the P2P transport. |
Custom signaling (ConnectP2PCustomSignaling) | Works between processes. |
ISteamNetworkingUtils | Relay network status, ping locations, config values, and the debug output hook. FakePacketLoss_Send and FakePacketLag_Send apply to unreliable P2P messages. |
#Other interfaces
| Interface | On 0x |
|---|---|
ISteamHTTP | The game's own HTTP client, with streamed responses. Requests to Steam's own hosts fail like a network failure. |
ISteamScreenshots | WriteScreenshot and AddScreenshotToLibrary save the image (with a thumbnail) and upload it to the player's library. HookScreenshots works. |
ISteamInput, ISteamController | Action manifests and controller configurations in the Steam input format, read from evdev devices on Linux, with action origins and glyph names. |
ISteamUser voice | Capture at 16 kHz mono, compressed and decompressed as on Steam, with speech detection. |
ISteamTimeline | Timeline events and game phases are stored per play session. No video is recorded. |
ISteamUtils | App ID, server time, IP country, images (avatars, achievement icons), text filtering, gamepad text input, Steam Deck detection. |
Overlay (ActivateGameOverlay*) | Requests (store page, user profile, web page, invite dialog) are handed to the host app, and the game gets GameOverlayActivated_t open, then closed when the app is done. sg-steamclient never draws UI itself. The 0x app does not draw an overlay yet, so today the game sees the overlay open and close at once. |
