When you have your Steamworks Partner account and your application all set up, you'll need to obtain the Steamworks SDK.
NOTE: If you have not yet registered with Steamworks, please see the official Steamworks site
Download The Correct SDK Version
As different GameMaker versions expect specific SDK versions for all external tools, you'll need to make sure that you are using the correct version of the Steamworks SDK. This information can be found on our Required SDKs page.
Once you know which version you need, open https://partner.steamgames.com/downloads and start downloading the correct version.
Once the download has finished, you'll need to extract it to a location which GameMaker can point to. It's strongly advised you put it in a short path location which is easy to reach, as you'll need to access this for multiple things later in this tutorial.
We recommend simply C:\SteamworksSDK\ or something which perhaps reminds you which SDK version it is, but still keeping the path short.
Set Up GameMaker
Once you have added the extension to your project, open the Included Files directory and read the provided PDF to set up the extension properly. You can read the same documentation online on the wiki here: Setup Guide (IDE/Runtime 2022.6+).
Carry on developing your game as required, until you're ready to start sending testing builds to Steam, then carry on with this guide.
A Note On Steamworks DRM Wrapper
You may be aware of Steam's DRM Wrapper, which they offer as an optional extra tool you can use when you have sent builds to the store. There is no need to use this with GameMaker, as the runner already uses Steam's alternative/more reliable "SteamAPI_RestartAppIfNecessary" functionality (as you can see from the table lower down on that page).
Attempting to use the DRM Wrapper tool anyway may cause an error report from the tool.
Uploading Your Project To Steam
Now that you have set up Steam and GameMaker to both communicate with each other, it's time to upload your game. This is done using a tool which comes as part of the Steamworks SDK which we downloaded previously.
You can find more information about uploading builds to Steam and best practices to follow here.
Inside GameMaker, you'll want to compile your application for the relevant platforms. It is advised you export using the following formats:
- Windows - Compressed Application .zip
- Mac OSX - .app.zip (Note that in your Game Options > macOS the "Build for Mac App Store" setting needs to be disabled else this will not build an .app.zip, but a PKG instead. Similarly, do not pick the .dmg output type.)
- Linux (Ubuntu) - Compressed Application .zip
Once you have uploaded your build to Steam, if you run your compiled executable (from within the Content folder or anywhere else) it will now attempt to restart your application and run it under Steam or alternatively you can use the Content Server which to get the same outcome.
With all that working, your game is now integrated with the Steam API and you can begin to add in the functions you want to use (you can find out more information on the Steam API functions from its manual, here: Steamworks Extension Documentation).
Note that from now on when testing the game within GameMaker the project will connect to the Steam API each time and behave the same as if it had been launched from Steam.
However, note that you will frequently need to submit your testing builds to Steam in order to see any changes you have made, as please remember it’s the copy off Steam which will now be launched each time.
You can see if your game is working correctly as it will pop up the Steam API notification depending on the platform:
IMPORTANT! When testing the Steam API integration in your games, you must have the Steam Client app open, otherwise it will not work.