Skip to content

How-To Modules

For those of you who are comfortable compiling or want to give it a shot, here are some steps to follow.

Set Up Tools

Follow Godot's documentation to setup the required tools for your operating system.

Get Godot

Cloning the Source

You can clone the latest Godot source in a folder called godot like so:

git clone https://github.com/godotengine/godot.git -b 2.1.6-stable godot
git clone https://github.com/godotengine/godot.git -b 3.5.3-stable godot
git clone https://github.com/godotengine/godot.git -b 4.2.1-stable godot

You may need to change the given tag(s) above from whatever it is to whatever the current version or whatever version you need.

Downloading the Source

Alternatively, you can download and unpack the Godot source from their Github into a folder called godot.

Get GodotSteam

Cloning the Source

Head into the godot/modules/ folder and clone the source like so:

git clone -b godot2 https://github.com/CoaguCo-Industries/GodotSteam.git godotsteam
git clone -b godot3 https://github.com/CoaguCo-Industries/GodotSteam.git godotsteam
git clone -b godot4 https://github.com/CoaguCo-Industries/GodotSteam.git godotsteam

Downloading the Source

Alternatively, you can download the branch you need from our repository then unpack it into a folder named godotsteam inside your Godot source godot/modules/ folder.

Get the Steamworks SDK

Download the Steamworks SDK from Valve's partners site. This requires a Steam developer account.

Move the public and redistributable_bin folders from the unzipped Steamworks SDK into the godot/modules/godotsteam/sdk/ so you have the following layout:

godot/
└─ modules/
   └─ godotsteam/
      └─ sdk/
         ├─ public/*
         └─ redistributable_bin/*

Double-Checking Folder / File Structure

Before we start compiling, let us make sure everything is in place. Your godot directory should look something like this:

godot/
└─ modules/
   └─ godotsteam/
      ├─ doc_classes/
      ├─ sdk/
        ├─ public/*
        └─ redistributable_bin/*
      ├─ config.py
      ├─ godotsteam.cpp
      ├─ godotsteam.h
      ├─ godotsteam_constants.h
      ├─ register_types.cpp
      ├─ register_types.h
      └─ SCsub

You can also just put the godotsteam directory where ever you like and just point to it in SCONS when compiling:

custom_modules='../path/to/dir/godotsteam'

Compiling Time

To compile editors, use this SCONS line:

scons platform=<your platform> production=yes tools=yes target=release_debug
scons platform=<your platform> tools=yes target=editor

To compile debug templates, use this SCONS line:

scons platform=<your platform> production=yes tools=no target=release_debug
scons platform=<your platform> tools=no target=template_debug

To compile release templates, use this SCONS line:

scons platform=<your platform> production=yes tools=no target=release
scons platform=<your platform> tools=no target=template_release

A Linux Note

If using Ubuntu 16.10 or higher and having issues with PIE security in GCC, use LINKFLAGS='-no-pie' to get an executable instead of a shared library.

All Together Now

When the compiling is finished, make sure to copy the Steam shared library, for your operating system, from godot/modules/godotsteam/sdk/redistributable_bin/ folder to the newly-compiled Godot binary location.

By default, it should be in the godot/bin/ folder. You can move them to a new location as long as you keep the two files together.

Missing Shared Library

A lack of the Steam API .dll/.so/.dylib for your respective OS will cause the editor or game to fail and crash when testing or running the game outside of the Steam client.

A General Note

Some people report putting the Steam API file inside their project folder fixes some issues.

A Mac Note

For MacOS, the libsteam_api.dylib must be in the Content/MacOS/ folder in your application zip or the game will crash.

A Linux Note

For Linux, you may have to load the overlay library for Steam overlay to work:

export LD_PRELOAD=~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so;~/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so

or 

export LD_PRELOAD=~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so;
export LD_PRELOAD=~/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so;

This can be done in an .sh file that runs these before running your executable. This issue may not arise for all users and can also just be done by the user in a terminal separately. You can read more about it in our Linux Caveats doc.

Good to Go

From here you should have access to all of the Steamworks SDK functions and callbacks.

You should be able to read the Steamworks API documentation to see what all is available and cross-reference with GodotSteam's documentation.

Feel free to check out our tutorials if you want to learn some basics or just start tinkering!