Steam API Guide


#1

Hello!
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.
Link: https://1drv.ms/w/s!Ah5q32nu2JG-ri9zU2eVbJ7DbWhQ?e=zRwKWX

Linked Topics

Steam API and Gamejolt API?
Steam achievements
API for native games (Steam, GameJolt, GooglePlayGames)


#2

While I probably won’t do this until a few years later (therefore won’t read it much yet), great job! I’m especially amazed since what I know so far, GDevelop 5 is a web browser running javascript extensions to make the game engine happen, and thought Steam API is only possible on “native” games (something like OpenGL, DirectX, or Vulkan), rather than HTML5.
Thanks for proving me wrong.


#3

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.


#4

Congrats!

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 :slight_smile:


#5

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?)


#6

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.