Skip to content

Commit dc85df0

Browse files
committed
Document Steamworks build and API policy
1 parent 8f39002 commit dc85df0

2 files changed

Lines changed: 37 additions & 4 deletions

File tree

BUILD.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Building
22

33
The Steamworks SDK is not committed and is not shipped in the npm package.
4+
This follows the Node3D private third-party build input policy recorded in
5+
[ADR 0014](../../docs/adr/0014-private-third-party-build-inputs.md).
46
Maintainer builds expect an unpacked SDK at:
57

68
```text
@@ -14,6 +16,10 @@ The folder should contain the normal Steamworks layout:
1416
.sdk/sdk/redistributable_bin
1517
```
1618

19+
The private archive should be trimmed to those build and runtime inputs.
20+
Steamworks SDK folders such as `tools` and `steamworksexample` are not needed
21+
for addon builds.
22+
1723
To hydrate that folder in CI, upload a private `steamworks-sdk.gz` archive and
1824
set:
1925

README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,31 @@ for (const event of update()) {
4343
The initial binding covers lifecycle, callback pumping, basic app/user helpers,
4444
auth tickets, DLC metadata, and user stats/achievements.
4545

46+
Methods are grouped by Steamworks interface rather than exported as one flat
47+
module. This keeps names close to Valve's API documentation and avoids a second
48+
Node3D-specific taxonomy for the full Steamworks surface.
49+
4650
`steam`:
4751

4852
- `steam.restartAppIfNecessary(appId)`
4953
- `steam.initEx()`
50-
- `init()`
5154
- `steam.shutdown()`
5255
- `steam.isSteamRunning()`
5356
- `steam.runCallbacks()`
54-
- `update()`
5557
- `steam.releaseCurrentThreadMemory()`
5658

59+
Top-level helpers:
60+
61+
- `init()` - calls `steam.initEx()` and throws when initialization fails.
62+
- `update()` - calls `steam.runCallbacks()` and then `callbacks.pollCallbacks()`.
63+
5764
`callbacks`:
5865

5966
- `callbacks.pollCallbacks()`
6067

6168
`user`:
6269

70+
- `user.getHSteamUser()`
6371
- `user.getSteamId()`
6472
- `user.isLoggedOn()`
6573
- `user.getAuthSessionTicket()`
@@ -73,12 +81,19 @@ auth tickets, DLC metadata, and user stats/achievements.
7381
- `utils.getServerRealTime()`
7482
- `utils.getSteamUiLanguage()`
7583
- `utils.isOverlayEnabled()`
84+
- `utils.isSteamInBigPictureMode()`
7685

7786
`apps`:
7887

7988
- `apps.isSubscribed()`
89+
- `apps.isSubscribedApp(appId)`
8090
- `apps.isDlcInstalled(appId)`
91+
- `apps.isAppInstalled(appId)`
92+
- `apps.getCurrentGameLanguage()`
93+
- `apps.getAvailableGameLanguages()`
94+
- `apps.getDlcCount()`
8195
- `apps.getDlcDataByIndex(index)`
96+
- `apps.getAppInstallDir(appId)`
8297

8398
`userStats`:
8499

@@ -91,10 +106,22 @@ auth tickets, DLC metadata, and user stats/achievements.
91106
- `userStats.clearAchievement(name)`
92107
- `userStats.storeStats()`
93108
- `userStats.resetAllStats(achievementsToo)`
109+
- `userStats.getNumAchievements()`
110+
- `userStats.getAchievementName(index)`
111+
- `userStats.getAchievementDisplayAttribute(name, key)`
94112
- `userStats.getAchievementAndUnlockTime(name)`
95113

96-
`update()` runs Steam callbacks and returns queued typed callback payloads such
97-
as `userStatsReceived`, `userStatsStored`, and `userAchievementStored`.
114+
`steam.runCallbacks()` maps to `SteamAPI_RunCallbacks`.
115+
`callbacks.pollCallbacks()` drains the Node3D callback queue.
116+
`update()` does both and returns queued typed callback payloads:
117+
118+
- `userStatsReceived`: `{ gameId, userId, result }`
119+
- `userStatsStored`: `{ gameId, result }`
120+
- `userAchievementStored`: `{ gameId, name, currentProgress, maxProgress }`
121+
- `authSessionTicketResponse`: `{ result, currentProgress }`
122+
123+
Steam IDs and game IDs are exposed as branded strings because Steamworks uses
124+
64-bit identifiers that should not be rounded through JavaScript numbers.
98125

99126
## Steamworks SDK Notice
100127

0 commit comments

Comments
 (0)