Today, I want to share with the community a guide I wrote that explains how to integrate the steam API into a GDevelop Game.
DON’T QUIT this topic thinking “I’m going to wait for an extension to come out”. There will probably never be an extension for this as it would require to rewrite major parts of GDevelop to support that. This guide is and will be the only way for a long time at least.
Warning: This guide is also complicated. Do not expect it to be easy.
Thanks for proving me wrong.
Yes, the steam API also only works on local PC games, as they use electron who itself uses NodeJS to execute the Js (well actually the GDevelop code is executed by the chrome V8 process (Renderer) but the flag to hook node functions into it was enabled for extensionq like the Filesystem extension so we don’t need to do it in the node (Main) process), and node supports native modules. Those are c/cpp code compiled with Js bindings into an importable module. I explain in my guide how to use greenworks, bindings for the steam API (wich is in cpp) in a GDevelop game.
Even if it’s a bit experimental, i think this documentation and the extension you developped might be present on the wiki. Few years ago, with GD4, i’ve probably spent more than 2 weeks trying to get steam api to work, and failed. A tutorial would have been priceless
One of my “Nice to have” goals is once I’ve got all the mechanics in the game I’m working on, to dig into how difficult it would be to implement this API to allow for Steam Achievements. Steam Cards aren’t API based (And are just based off game played time) so those are easy. Achievements require this (or I suppose maybe a network call?)
I looked at the web API already. The problem is it won’t work on local games. You need to set up each API key for only one specific adress. To make it work on local games you need this method.