A Steamworks binding for Node.js. Primarily targeting node-webkit and Atom Shell.
Based on Native Abstractions for Node.js for maximum compatiblity with various versions of Node.js.
NOTE: Steamboat is currently in the alpha/experimental phase of development. If you're looking for something more stable, please check out greenworks by Greenheart Games.
First and foremost, you'll need to have access to the Steamworks SDK. Download the SDK from Valve and either copy or symlink it to lib/steamworks
at the root of Steamboat. To be clear: the lib
folder should be a sibling to src
.
Don't commit the Steamworks SDK files to source control or distribute them with your game. You'll only need to ship a few specific files from the redistributable_bin
folder which we'll cover later.
Lastly, run npm install
at the root in order to pull in the Node.js dependencies.
You'll need node-gyp in order to build. node-gyp has some of its own requirements, such as Python and Visual Studio on Windows. See its installation instructions for more info.
node-gyp rebuild --arch=ia32 --target=0.11.13
The --target
parameter can be used to target a different version of Node, e.g. 0.10.x. The --arch
paramter can be used to build for 32-bit (ia32) vs 64-bit (x64) architectures.
node-webkit requires its own build tool, nw-gyp. With nw-gyp, the target version becomes the version of node-webkit you'd like to target instead of the version of Node.
nw-gyp rebuild --arch=ia32 --target=0.10.2
Atom Shell also requires some special tweaks in order to properly build native modules. The development headers must be fetched from a different location. This can be done by using the --dist-url
paramter:
node-gyp rebuild --arch=ia32 --target=0.11.13 --dist-url=https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
If the previous files for a specific version have already been fetched from the default location, you'll need to remove them first:
node-gyp remove 0.11.13
TODO: Which Steam redist libs to ship and where TODO: Where to put steam_appid.txt for node-webkit and Atom Shell
Must be called first. Returns true/false if initialization succeeded/failed.
var success = steamboat.init();
Call when your app is shutting down.
steamboat.shutdown();
Returns true/false if the Steam overlay is enabled/disabled.
var enabled = steamboat.isGameOverlayEnabled();
Triggers the Steam overlay to display the specified dialog. Possible dialog values are:
- Friends
- Community
- Players
- Settings
- OfficialGameGroup
- Achievements
steamboat.activateGameOverlay("Achievements");
steamboat.setAchievement("perfectScore");