This is a wrapper for Discord's Game SDK for GameMaker: Studio / GameMaker Studio 2.
Written by YellowAfterlife.
Licensed under LGPL.
What does it cover?
- Activities/Rich Presence (for using RPC in non-Discord-Store builds, see Dissonance)
For each of these, the extension does not necessarily cover every function, but enough of these to port a game that was previously using my Steamworks wrapper.
- Extract discord_game_sdk.zip (which you get after you've been approved for Discord Store)
- Open and compile the included Visual Studio solution.
If you have GmxGen in your PATH, this will also auto-update the extension to match any new functions/scripts/macros.
First, let's get a few things out of the way: development of this extension was paid for by several high-profile GM projects (Nidhogg, Knight Club, (unannounced)).
Later I contacted Discord to ask whether I could release my wrapper, and whether they'd be willing to pay me to cover missing SDK functions and documentation, but, unfortunately, I only got an OK for releasing it (and nothing at all on expansions), so... you get what you get, I guess.
Now, to the actual FAQ:
- Is there documentation?
As per above, not really. You can use "Show API" context menu option on the extension in GMEdit to view a list of functions and match them up to accordingly named functions in official SDK documentation.
- Are there samples?
You can find a small sample project in the repository.
It is not extensively commented by any means, but it tests that functions are working correctly.
You will need to open a second Discord instance with a second Discord account using Sandboxie and open a second copy of the game in there to test matchmaking.
- Is there Mac/Linux support?
Does Game SDK even support Mac/Linux? I'm not sure.
- Does it work in GMS2?
It should work fine if you import the sample project into GMS2 and then "Add Existing" the extension from sample project to yours.