Using The Steamworks SDK With GameMaker: Studio

Now that you have your Steamworks Partner account and your application all set up you'll need to obtain the Steamworks SDK. As GameMaker: Studio is built to use specific SDKs you'll need to make sure that you are using the correct version of the SDK for the correct version of GameMaker: Studio. This information can be found on our Required SDKs page: http://help.yoyogames.com/entries/91625158.

NOTE: If you have not yet registered as a Steamworks Partner, or have not yet got a game through Greenlight, please see the following articles:

Once you know which version you need then navigate to https://partner.steamgames.com/downloads and select the correct version.

Steam_12.png


Once you have obtained the correct Steamworks SDK you'll need to extract it to a location which GameMaker: Studio can point to. It's advised you put it in a location which is easy to reach such as C:\Steamworks as you'll need to access this for multiple things later in this tutorial.

Within GameMaker: Studio open your Preferences and navigate to the Steam tab. Point the Steamworks SDK Location field to where you previously extracted this to and then confirm this is working by pressing the Check Steam SDK button and if it's working correctly then it will state "SDK Status: SDK OK".

ss__2015-09-21_at_07.00.15_.png

Setting up your game to work with Steam

Now that you have Steam set up correctly you'll need to now configure your GameMaker game to know about Steam. This is done by opening your Global Game Settings and navigating to the Steam Tab, where you'll see that it has sub-tabs for each specific target platform - Windows, Mac or Linux. Depending on how you've set up your application, each of these might be unique applications with unique Steam IDs, but generally each target platform should have the same Steam App ID.

ss__2015-09-21_at_07.01.21_.png


Once you've put in the correct ID and enabled the Steam check box you can test if your game is working correctly as a Run of your application will pop up the Steam API notification depending on the platform.

Uploading your application to Steam

Now that you have set up Steam and GameMaker:Studio to both understand each other it's time to upload your game. This is done using a tool within the Steamworks SDK which we downloaded previously.

Navigate to the Steamworks SDK folder and open the Tools folder. This contains the two sub folders Content Builder and Content Server. Content Builder is what we use to upload our applications to Steam whereas Content Server allows us to emulate the Steam Servers but run our content locally before uploading. As we only care about the Content Builder for now, open this folder and you'll see three further folders which are important: builder (Choose the builder folder relevant for your operating system), content and scripts.

First open the relevant builder folder and then run steamcmd, this will build the steam content builder upon first run which we need for future use, although we won't need to run it specifically as we have a batch file which runs this for us. Navigate up a folder and open the scripts folder, you'll see two .vdf files, one is relevant for your game and the other is for a specific Depot. It's highly advised that you rename each script to contain the relevant AppID or DepotID.

Open your app_build_AppID.vdf script first in a text editor, and change the AppID to your AppID as it is shown on the Steamworks site. In the depots section change the DepotID to to the relevant DepotID shown on the Steamworks site as well, and make sure that the depot script is named correctly. If you plan to upload more than one Depot then add in more lines with the correct DepotID as well as script names. Once you've finished editing this script save it, and it should look something like the following:

ss__2015-09-21_at_06.44.56_.png

Open one of your depot_build_DepotID.vdf scripts and change the DepotID to your DepotID shown on the Steamworks site. Then change the ContentRoot folder location to the content folder within your Steamworks folder such as C:\Steamworks\steamworks_sdk_133b\tools\ContentBuilder\scripts. Next change the LocalPath to be a relevant folder such as ".\Windows_Content\*" as per the above example of a Depot. Once you've filled out all your Depot scripts correctly save them.

ss__2015-09-21_at_06.47.36_.png

Navigate up a folder and now open the content folder. This is where your game content goes, based on what you put as the LocalPath in the Depot Scripts. These folders should exist here as this is where we will export our game. Open up GameMaker: Studio now and you'll want to compile your application for the relevant platforms. It is advised you export using the following formats:

  • Windows - Compressed Applications zip
  • Mac OSX - .app.zip (Note that in your Global Game Settings build for Mac App Store needs to be disabled else this will not build an App but a PKG instead)
  • Linux (Ubuntu)  - .zip

When you have built all your relevant compiled applications check that the contents of the .zip files are extracted within the correct content folders as this is what is uploaded to Steam, and if the file paths are wrong then the Launch Options we previously created won't launch our application. Navigate up to the ContentBuilder folder and edit the run_build.bat file. This will run steamcmd, login with your account and run the app_build_AppID script to upload our build to Steam. First though, you'll need to edit the information within this file to match your user name, password as well as the correct app_build script:

ss__2015-09-21_at_06.50.43_.png


Once the batch file has been run it will upload your build to Steamworks and you will receive a message stating whether this was successful or a failure and information about why it failed.

Assuming it was successful, navigate back to the Steamworks site and open the landing page for your application. Click on Edit the Steamworks Settings of your application and click the Builds tab. This will show you what was uploaded as well as the Depots Included. You will then need to set the app branch which allows your app to become "live":

ss__2015-09-21_at_07.02.44_.png


Once all of this has been completed, if you run your compiled executable that you just uploaded to Steam, it will now attempt to restart your application and run it under Steam or alternatively use the Content Server which was previously mentioned 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 the manual, here: Steam API Functions)

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk