Git Product home page Git Product logo

steamworks.js's Introduction

Build Status npm License: MIT Chat

Steamworks.js

A modern implementation of the Steamworks SDK for HTML/JS and NodeJS based applications.

Why

I used greenworks for a long time and it's great, but I gave up for the following reasons.

  • It's not being maintained anymore.
  • It's not up to date.
  • It's not context-aware.
  • You have to build the binaries by yourself.
  • Don't have typescript definitions.
  • The API it's not trustful.
  • The API implement callbacks instead of return flags or promises.
  • I hate C++.

API

const steamworks = require('steamworks.js')

// You can pass an appId, or don't pass anything and use a steam_appid.txt file
const client = steamworks.init(480)

// Print Steam username
console.log(client.localplayer.getName())

// Tries to activate an achievement
if (client.achievement.activate('ACHIEVEMENT')) {
    // ...
}

You can refer to the declarations file to check the API support and get more detailed documentation of each function.

Installation

To use steamworks.js you don't have to build anything, just install it from npm:

$: npm i steamworks.js

Electron

Steamworks.js is a native module and cannot be used by default in the renderer process. To enable the usage of native modules on the renderer process, the following configurations should be made on main.js:

const mainWindow = new BrowserWindow({
    // ...
    webPreferences: {
        // ...
        contextIsolation: false,
        nodeIntegration: true
    }
})

To make the steam overlay working, call the electronEnableSteamOverlay on the end of your main.js file:

require('steamworks.js').electronEnableSteamOverlay()

For the production build, copy the relevant distro files from sdk/redistributable_bin/{YOUR_DISTRO} into the root of your build. If you are using electron-forge, look for #75.

How to build

You only need to build if you are going to change something on steamworks.js code, if you are looking to just consume the library or use it in your game, refer to the installation section.

Make sure you have the latest node.js, Rust and Clang. We also need Steam installed and running.

Install dependencies with npm install and then run npm run build:debug to build the library.

There is no way to build for all targets easily. The good news is that you don't need to. You can develop and test on your current target, and open a PR. When the code is merged to main, a github action will build for all targets and publish a new version.

Testing Electron

Go to the test/electron directory. There, you can run npm install and then npm start to run the Electron app.

Click "activate overlay" to test the overlay.

steamworks.js's People

Contributors

aprivette avatar arthuro555 avatar auwimo avatar ceifa avatar dfabulich avatar freddiegilbraith avatar goosehub avatar headcr4sh avatar james226 avatar lzqcn avatar podrivo avatar stefftek avatar yorkzero831 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

steamworks.js's Issues

Steam Overlay not working

I'm revisiting my app again after not working on it for a while, and noticed the steam overlay doesn't work, when it used to. I've tried updating to latest and even calling electronEnableSteamOverlay() but nothing happens at all when I press shift+tab. Any ideas?

Windows 10, Electron 22.1.0

Incompatibility with Electron 21

Thanks so much for finally taking on the task of building a modern steamworks api.

We're trying to use this library in an Electron 21-wrapped application, but have run into a compatibility issue with the new V8 memory cage as described here: https://www.electronjs.org/blog/v8-memory-cage

This causes Chromium/Electron to fatal crash whenever we're trying to for example retrieve the session ticket via the api:
[167373:1105/112515.909269:ERROR:node_bindings.cc(146)] Fatal error in V8: v8_ArrayBuffer_NewBackingStore When the V8 Sandbox is enabled, ArrayBuffer backing stores must be allocated inside the sandbox address space. Please use an appropriate ArrayBuffer::Allocator to allocate these buffers

As a result, it is impossible to use this as a node module in Electron 21 and onwards because of this. Trying to disable the sandbox either via launch parameters or sandbox: false has no effect on this setting. Apparently this issue needs to be fixed at the module level as described in the link above, where it mentions this:

This change only affects native Node modules which allocate memory outside of the V8 heap (e.g. using malloc or new) and then wrap the external memory with an ArrayBuffer. This is a fairly rare use case, but some modules do use this technique, and such modules will need to be refactored in order to be compatible with Electron 20+

I don't know enough about the internals to know how to suggest this fix in a PR, or even where to suggest it, but the end result is still that it renders this module incompatible with Electron 20+ 😞

Steam Overlay only works when devtools is open

In my main process I'm doing:

app.commandLine.appendSwitch("in-process-gpu");
app.commandLine.appendSwitch("disable-direct-composition");

const client = steamworks.init(480);

And in my render process I have:

// this is required for Steam Overlay to render smoothly
function tick() {
    console.log("tick");
    requestAnimationFrame(() => tick());
}
tick();

But when devtools is closed, the overlay doesn't show at all, and when devtools is open, it shows and looks ok, but I can't see the game behind it and pressing Shift+Tab again switches focus to devtools and it isn't possible to return to the main browser view. This suggests to me that devtools possibly has its own process/window that the overlay is attaching to. Any ideas?

Check Achievement

client.achievement.activate('ACHIEVEMENT') seems to return true even if the achievement was previously activated. It would be awesome if this either a) had a way of only returning true if the achievement was newly activated, or if b) there was a way to check beforehand if the achievement had already been obtained.

Shut down client (detach)

First off I want to thank all the contributors for this awesome project! 🔥

I am working on a project were I have to be able to initialize and gracefully shut down the steamworks client during different lifecycles of my app (Electron). Lazy initialization of the client works as expected, but I am unable to see a way to call the internal shutdown function to gracefully detach from the steam process without closing the app.

I see that there is a gc (drop) function in the steamworks-rs package this project is using, but I see no way of triggering this from JS.

Any help would be appreciated! 😺

Tag releases in Github

It would be nice if the Github release automation would tag a release, linking to a commit, etc.

How to set achievement?

client.achievement.activate('ACHIEVEMENT') does not seem to actually set the achievement as true.
I'm using the achievement ID set up in steam but when I run it but still it results in a FALSE.

Is there actually a working example? I have checked other projects using steamworks.js and none actually seem to use client.achievement.

I have also noticed I'm getting this message at start up and wonder if there is a connection.

Setting breakpad minidump AppID = myappid
SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  mysteaid [API loaded no]

But I am still able to get my playername via client.localplayer.getName() so I'm not sure if the "[API loaded no]" mean anything or not.

arm64 support

Getting an error when steamworks tries to use /dist/osx/steamworksjs.darwin-x64.node: incompatible architecture (have 'x86_64', need 'arm64e')

Working on a macbook pro with M1 chip

also, love the work you're doing with this project - excellent alternative to greenworks

Error running app on Steam Deck

I know this is a long shot (feel free to close this issue if it's off topic), but I'm struggling to get my Electron app to launch and run properly on Steam Deck or on Manjaro Linux, the distro that Steam recommends for testing Steam Deck compatibility.

https://steamcommunity.com/groups/steamworks/discussions/0/3373782431179895116/

Steam Deck app crashes instantly running Electron app

I'm trying to make my app compatible with Steam Deck.

My app seems to work fine on Linux when I launch it directly from the console; I've tested it in Ubuntu 22 and in Manjaro 22. I cd to the directory containing my files, run ./MyGame and it launches without error.

But when I upload the game to SteamPipe and launch it via Steam, something strange happens. When I launch it on a physical Steam Deck, the button briefly turns blue and says "X STOP," but then it just immediately turns green and says "PLAY" again.

I have to assume that the app must have crashed or something? (With no error message??) But I've configured my game to log a message to the file system on the first line, as soon as it launches, and my log message doesn't get run. It's like my app never launches.

More mysteriously, when I "Switch to Desktop", open Konsole, cd to the directory containing my game, and run ./MyGame, it launches without error, just as I'd expect.

Soooo I tried running Steam on Manjaro 22. On Manjaro 22, when I click the Play button, it doesn't crash instantly, or at all. Instead, when I click Play, the button turns blue and says "X STOP" but my app window doesn't open, and no log message is displayed, for exactly 90 seconds (!!!) and then, right at the end of 90 seconds, the app window opens and the game launches and plays normally.

I can't understand at all what could be causing this behavior. As far as I can tell, there are no bugs in my code. As soon as my app ACTUALLY launches, the game starts up immediately, but the Steam launcher is either refusing to launch my app at all (on Steam Deck) or delaying launch needlessly for 90 seconds (on Manjaro).

How can I debug this issue?

(FWIW, my game is an Electron app (a giant wrapper around Google Chrome). It's designed to work great on Windows and Linux, which is part of why I picked Electron as a platform. Could this have something to do with it? I can't imagine what…???)

Any idea what could be wrong here?

Feature request: get app install dir

This is a cool library, and I am going to use this in my game based on electron.
I want a feature is to get the installation directory of the current app.

Server-side checking of credentials

If one were to implement a Login with Steam solution on the server side, how would that be done? You couldn't take the client's word for it as, well, it's the client and can be exploited.

Is there any way to check the validity of a steam user's ID, username, achievements, etc. on a Node.JS server app?

TypeScript typings not found: missing "tyipings/types" declaration in `package.json`?

I tried to include the steamworks.js module in my TypeScript-based codebase.
Unfortunately, Visual Studio Code / the Type Script Compiler complains:

Could not find a declaration file for module 'steamworks.js'.
'/[PATH_TO_MY_PROJECT]/node_modules/steamworks.js/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/steamworks.js if it exists or add a new declaration (.d.ts) file containing declare module 'steamworks.js';ts(7016)

I assume that the file client.d.ts must be referenced in package.json:

{
  "name": "steamworks.js",
  "types": "client.d.ts",
  "REST_OF_PACKAGE_JSON": "AS_USUAL"
}

See: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html

Remote storage functions should return promises

Currently, readFile and writeFile are synchronous, but under the hood, they're doing asynchronous work. I think they should probably return promises instead.

(I bet there are others like this.)

Support inviting steam friends

It would great to be able to allow players to invite their steam friends to play with them. As far as I can tell this requires the following steam API calls:

  • ISteamMatchmaking.CreateLobby
  • ISteamFriends.ActivateGameOverlayInviteDialog
  • ISteamMatchmaking.JoinLobby
  • Various Lobby callbacks:
    • LobbyCreate_t
    • LobbyEnter_t
    • LobbyInvite_t
    • LobbyDataUpdate_t

I suspect this is an incomplete list since I haven't implemented this in another system and it is one of more complex interactions with the Steam SDK.

How can I get actionSetName?

export namespace input {
  ...
  export function getActionSet(actionSetName: string): bigint
  ...
}

How can I get getActionSet's param actionSetName?

API doesn't match steamworks-rs or C++ API; hard to find documentation

steamworks.js's API doesn't match the API of steamworks-rs or the official Steamworks C++ API. As a result, it's kinda hard to track down documentation for individual methods.

For example, client.cloud.readFile is in a cloud package, but the Steamworks API refers to it as "ISteamRemoteStorage", and steamworks-rs puts it in a struct called RemoteStorage. So if you know you want the "remote storage" functions, you just have to figure out that in steamworks.js, that means the cloud package.

Furthermore, cloud.readFile has no documentation, and steamworks-rs doesn't have a simple read_file function. As a result, the only way to learn what readFile does is to read cloud.rs, comparing and contrasting that with https://docs.rs/steamworks/latest/steamworks/struct.SteamFileReader.html#method.read_to_string and thinking about how that might correspond to https://partner.steamgames.com/doc/api/ISteamRemoteStorage#FileReadAsync

I think at least the exposed modules should map one-to-one with the modules of steamworks-rs, so, e.g. cloud.rs should be remote_storage.rs, and each function should either have hand-written documentation or should link to the documentation on https://docs.rs/steamworks/latest/steamworks/

Tauri integration

Currently, steamworks.js only works with Electron for desktop applications. However, Tauri is an interesting alternative to Electron that offers improved security and a smaller package size. So we would like to propose an application to integrate Tauri with steamworks.js.

Tauri is a platform for building cross-platform desktop applications using web technologies such as Rust, HTML, CSS and JavaScript. It offers a secure environment by default, with sandboxing and a strong security policy. In addition, Tauri generates smaller binaries than those generated by Electron, which can be an advantage for developers looking to optimize the size of their application.

I understand that this integration may require significant changes to the steamworks.js code, but I think it's worth exploring this possibility. So I would like to ask the steamworks.js developers to look into the possibility of integrating Tauri for desktop applications.

I hope you will take this request into consideration and consider Tauri integration for desktop applications.

Testing using contextIsolation = true for Electron

What I have done so far:

in index.js:

const createWindow = () => {
  // Create the browser window.
  const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      nodeIntegration: true,
      preload: path.join(__dirname, 'preload.js'),
    },
})

in preload.js:

const steamworks = require('steamworks.js')
const { contextBridge } = require('electron')
contextBridge.exposeInMainWorld('steamworks', steamworks)

Other files in the renderer thread can then reference the 'steamworks' object.

This is working so far in Electron on MacOS with some simple functions, init, setting/clearing achievements (though MacOS does not support Electron/Steam overlay, so I have not tested that yet, will test it later on a Windows dev system.) Anyone have experience with this yet?

Angular start cause error

Build at: 2023-02-24T16:30:29.533Z - Hash: 1f974c0785ba152b - Time: 6003ms

./node_modules/steamworks.js/dist/linux64/steamworksjs.linux-x64-gnu.node:1:0 - Error: Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

./node_modules/steamworks.js/dist/osx/steamworksjs.darwin-arm64.node:1:0 - Error: Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

./node_modules/steamworks.js/dist/osx/steamworksjs.darwin-x64.node:1:0 - Error: Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

./node_modules/steamworks.js/dist/win64/steamworksjs.win32-x64-msvc.node:1:2 - Error: Module parse failed: Unexpected character '�' (1:2)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)



** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **


× Failed to compile.


failed to init the steamworks API on basic installation

I created a test project to test steamworks js, added a index.js file with following code:
`const sw = require("steamworks.js")

const client = sw.init(/app id/);

console.log(client.localplayer.getName());`

but when I tried to run it, received following error:
`C:\Users\samee\dev\work\grest_games\test\node_modules\steamworks.js\index.js:44
internalInit(appId)
^

Error: failed to init the steamworks API
at Object.module.exports.init (C:\Users\samee\dev\work\grest_games\test\node_modules\steamworks.
js\index.js:44:5)
at Object. (C:\Users\samee\dev\work\grest_games\test\index.js:3:19)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'GenericFailure'
}`

`.init()` works on initial load, but not on subsequent reloads

I'm calling steamworks.init(480) in the renderer, and it works fine on first load, but then when reloading the window it calls that again and I get the error:

Uncaught (in promise) Error: Client already initialized for app id 480

Even if I put a huge timeout here, it still errors. Works fine in main process btw.

First tests

Very cool. I did the test. If you want to compare the files I put it in my fork.
I found this error.

File 'SteamClient.ts' replace 'ipcontry' by 'ipcountry'

return await Api.send(`/client/ipcontry` 

This I changed only here to use with NW.js

 process.cwd()

Instead of

import * as path from 'node:path'
path.resolve(__dirname

Sometimes in first run, it doesn't load the lib. However, this probably occurs only here.

error Steamworks: Setting breakpad minidump AppID = 480
error Steamworks: SteamInternal_SetMinidumpSteamID:  Caching Steam ID: [API loaded no]

Steam overlay not yet tested.

I also deleted the Steam dlls because I think sharing this is not allowed.
I know Facepunch.Steamworks shares this, but I think it's illegal.
I recommend leaving in the description the version of the dlls to download on the official website, and in which folder to put it like greenworks repo.

I also add SteamFriends.cs and SteamFriends.ts to test if I understood how it worked.
Change It was relatively easy. Calls to the API worked fine. I'll wait now to see the callbacks/events.
I still don't understand 100% of the code, but I really liked it connection js /dotnet. ^^

Add an overwrite for createItem(appId)

Hey!

Steamworks' UGC API allows for a AppID overwrite, this would be really useful to implement in steamworks.js.

I use steamworks.js to upload content to the steam workshop, and have built a workshop tool for this purpos, which can be downloaded in Steam as a tool seperately from my game.

Sadly, due to the lack of an appID overwrite in createItem, I had to init steamworks.js with the appID of my main game, and people using my tool only have the main game name set as presence.

Sincerely,
Steff

macOS NAPI Buffer error

Hi! Just upgraded the library and Electron to 22, however I'm now getting an error on init calls;

Error: Failed to create napi buffer

Possible to use steamworks.js with nwjs on Windows?

I am new to rust / napi-rs. I am trying to see if it is possible to use the precompiled steamworks.js node binaries or build new binaries to work with nwjs, instead of electron (I am using a build service which uses nwjs.)

I have tried nwjs with the npm node files on MacOS and it seems to work fine, with various versions of nwjs.

However on Windows, I can only get electron versions of my app to work.

When I try using steamworks.js with nwjs on Windows, the app crashes when loading the steamworks node binary.

I am able to build the node binaries on Windows, but I am not sure if I need to do something specific to get it compiled for nwjs (I did add nw to devDependencies with same version as my runtime (and removed electron), but that did not seem to help. Is there a step I am missing? I have seen comments about the possibility of different native node modules requiring different compiles on node vs electron vs nwjs.

Building for all targets

Hi there,

Love the project, so glad to see an API for Steamworks SDK for JavaScript - absolutely saved my life.

I'm trying to implement AuthTickets (I have a game that uses a remote server). I think I can implement it pretty easily (and I'm happy to put in a PR once it's done), but I wanted to ask how you build for all targets?

I can see the build puts a .node file out into /dist, but mine only does Linux, do I need to do it on all three platforms?

TIA

Issue with cloud.writeFile

Hi there, big thanks for replacing greenworks. This looks like it will be way easier to use. I'm having a basic issue with steam cloud. I have my app configured in steamworks with 5mb and 10 files max. I'm trying to save a single file that is a short string.

cloud.writeFile('sp-save', 'test')

always returns false. I don't know what that means other than the write failed. I can confirm it failed by noting that

cloud.readFile('sp-save')

returns nothing. How do I troubleshoot this knowing that my app is configured correctly in steamworks?
On steamworks.js boot I do see this:

Setting breakpad minidump AppID = (my app id)
SteamInternal_SetMinidumpSteamID: Caching Steam ID: 76561197992801299 [API loaded no]

Does this mean anything?

Crash: panicked at 'called `Result::unwrap()` on an `Err` value: RecvError(())', src\api\auth.rs:62:40

steamClient.localplayer.getName() works, but calling
let ticket = await steamClient.auth.getSessionTicket(); never returns.

This issue happens on both Windows (see terminal log) and Linux. On some machines it started to work after some time without any obvious changes.

SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  76561198[redacted] [API loaded no]
steamClient.localplayer.getName(): [redacted]

thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError(())', src\api\auth.rs:62:40
stack backtrace:
   0:     0x7ff8ff0dc9f7 - napi_register_module_v1
   1:     0x7ff8ff0ab74b - <unknown>
   2:     0x7ff8ff0d2e91 - napi_register_module_v1
   3:     0x7ff8ff0deb6b - napi_register_module_v1
   4:     0x7ff8ff0de727 - napi_register_module_v1
   5:     0x7ff8ff0df68d - napi_register_module_v1
   6:     0x7ff8ff0df135 - napi_register_module_v1
   7:     0x7ff8ff0df07f - napi_register_module_v1
   8:     0x7ff8ff0df054 - napi_register_module_v1
   9:     0x7ff8ff172e85 - napi_register_module_v1
  10:     0x7ff8ff1730f3 - napi_register_module_v1
  11:     0x7ff8ff10fca1 - napi_register_module_v1
  12:     0x7ff8ff130ccd - napi_register_module_v1
  13:     0x7ff8ff169786 - napi_register_module_v1
  14:     0x7ff8ff16d155 - napi_register_module_v1
  15:     0x7ff8ff165a19 - napi_register_module_v1
  16:     0x7ff8ff167721 - napi_register_module_v1
  17:     0x7ff8ff0dbd1b - napi_register_module_v1
  18:     0x7ff930fe7614 - BaseThreadInitThunk
  19:     0x7ff932a426a1 - RtlUserThreadStart

Issue with client.apps being undefined

Hi there!
I'm currently running into an issue with trying to access the functions in client.apps. For some reason, it doesn't seem to include those functions when I print it out, nor when I try them. I just get a client.apps is undefined. Here is an example of what I am trying to do.

  const steamworks = require('steamworks.js')
  let client

  try {
    client = steamworks.init(2233750)
  } catch (err) {
    console.log(err)
    client = null
  }

  console.log(client.apps.appBuildId())
  console.log('client', client)

As you can see in the image below, I'm not seeing apps either in that list.

Screen Shot 2022-12-24 at 1 42 09 AM

Here is the error:
Screen Shot 2022-12-24 at 1 44 50 AM

Version: 0.0.25
OS: Mac

Any help here? I can't seem to find documentation on it, so I can't tell if it's a bug or if it's an issue on my end. I typically think it's an issue on my end. I kind of wonder if it's due to me being on a Mac. Maybe the dist for Mac wasn't built yet?

Accuracy loss

hi, since the type defined in Dependency Library is LobbyId/SteamId, when we register the callback, the value is returned by Is there any good way to get the correct value?

Is there a minimal example project?

I'm using Angular+electron+steamworks.js, and I've been trying for a long time, but it doesn't work properly.
The furthest I can get is the steam community overlay popping up on the page, but the mask doesn't refresh in real time, and finally when I package it as a desktop application, it doesn't work and throws an exception.

Is there a sample project I can refer to?

Document cross-compiling

The published releases of steamworks.js include all platforms (windows, mac, linux), but npm run build only builds the current platform.

How do you compile steamworks.js for all platforms? Is there a command you use? What is it? (And could it be added to the README?)

Steam Overlay doesn't seem to work for Mac

I develop on Mac and as far as I can tell none of the steam overlay stuff works (shift+tab, invite dialog, or achievements), either running electron via npm starm or launching through steam. I can confirm that all of these work in windows though. I have not tested Linux yet.

Understand library dependencies

Apparently steamworks.js depends on C++ redist packages, but I'm not sure where that dependency comes from. The idea of this issue is to understand this and document it.

Feature request: add `MicroTxnAuthorizationResponse_t` to callbacks

As discuss on Discord earlier this year I would love it if callback.SteamCallback also includes MicroTxnAuthorizationResponse_t to allow developers of steamworks.js to automatically complete authorized purchases made via the Steam overlay.

https://partner.steamgames.com/doc/api/ISteamUser

In-app must be initialized through your own backend (this cannot be implemented through Steamworks SDK). More on that here: https://steamcommunity.com/dev

I already have this set up for my game (https://worldseed.eu). Without MicroTxnAuthorizationResponse_t I must optimistically guess that a initiated purchase went through and provide the user with a button to manually call FinalizeTxn: https://partner.steamgames.com/doc/webapi/ISteamMicroTxn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.