/GodotSteam

Steam API for the Godot game engine

Primary LanguageC++MIT LicenseMIT

GodotSteam for Godot Engine

Steam API for the Godot game engine (version 3.0 - 3.1). For the Windows, Linux, and Mac platforms.

Additional flavors include: Godot 2.x, Godot 2.x Minimal, Godot 3.x Minimal, Server, and GDNative.

Documentation

Documentation is available here: https://gramps.github.io/GodotSteam/

Alternately, there is the project's Wiki page here: https://github.com/Gramps/GodotSteam/wiki

You can also check out the Search Help section inside Godot Engine after compiling it with GodotSteam.

Current Build

You can download pre-compiled versions (currently v3.2.1) of this repo here: https://github.com/Gramps/GodotSteam/releases

Version 3.2.1 Changes

  • Added: all remaining UGC functions and callbacks
  • Added: all new Remote Play functions and callbacks
  • Added: remaining UGC constants and enums
  • Added: relevant Remote Storage callbacks for UGC
  • Added: back some needed UGC constants
  • Changed: int to uint32 in some for loops
  • Changed: renamed some UGC enums for consistency
  • Changed: getItemDownloadInfo to give proper default return
  • Fixed: a few missing default returns
  • Fixed: compiling issues on Linux
  • Removed: non-listed UGC enums

Known Issues

  • None... so far

Quick How-To

  • Download this repository and unpack it.
  • Download and unpack the Steamworks SDK; this requires a Steam developer account.
  • Download and unpack the Godot source; preferably 3.0.6 or 3.1.2.
  • Move the following to godotsteam/sdk/:
    sdk/public/
    sdk/redistributable_bin/
  • The repo's directory contents should now look like this:
    godotsteam/sdk/public/*
    godotsteam/sdk/redistributable_bin/*
    godotsteam/SCsub
    godotsteam/config.py
    godotsteam/godotsteam.cpp
    godotsteam/godotsteam.h
    godotsteam/register_types.cpp
    godotsteam/register_types.h
  • Now move the "godotsteam" directory into the "modules" directory of the unpacked Godot Engine source.

  • Recompile for your platform:

  • When recompiling the engine is finished do the following before running it the first time:

    • Copy the shared library (steam_api), for your OS, from sdk/redistributable_bin/ folders to the Godot binary location (by default in the godot source /bin/ file but you can move them to a new folder).
    • Create a steam_appid.txt file with your game's app ID or 480 in this folder. Necessary if the editor or game is run outtside of Steam.
  • The finished hierarchy should look like this:

    • Linux 32/64-bit
    libsteam_api.so
    steam_appid.txt
    ./godot.linux.tools.32 or ./godot.linux.tools.64
    
    • OSX
    libsteam_api.dylib
    steam_appid.txt
    ./godot.osx.tools.32 or ./godot.osx.tools.64
    
    • Windows 32-bit
    steam_api.dll
    steam_appid.txt
    ./godot.windows.tools.32.exe
    
    • Windows 64-bit
    steam_api64.dll
    steam_appid.txt
    ./godot.windows.tools.64.exe
    
  • Your game must ship with the executable, Steam API DLL/SO/DyLIB, and steam_appid.txt to function. Lack of the Steam API DLL/SO/DyLib (for your respective OS) or the steam_appid.txt will cause it fail and crash.

    • NOTE: For OSX, the libsteam_api.dylib and steam_appid.txt must be in the Content/MacOS/ folder in your application zip or the game will crash.

From here you should be able to call various functions of Steamworks. You should be able to look up the functions in Godot itself under the search section. In addition, you should be able to read the Steamworks API documentation to see what all is available and cross-reference with GodotSteam.

Donate

Pull-requests are the best way to help the project out but you can also donate through Patreon or Paypal!

License

MIT license