by Gramps

Gramps / GodotSteam

Steam API for the Godot game engine

577 Stars 59 Forks Last release: about 1 month ago (g3-s150-gs38) MIT License 178 Commits 4 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

GodotSteam for Godot Engine

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

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


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

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.8) of this repo here: https://github.com/Gramps/GodotSteam/releases

Version 3.8 Changes - Added: default argument to steamInit to pull all current stats or not, defaults to true so no one has to change anything - Added: new SteamNetworkingMessages class; with functions, callbacks, constants, and enums - Added: all missing functions due to 5 argument limit in Godot - Changed: filterText updated to match new SDK 1.50 function - Changed: HTTP class setCookie to setHTTPCookie to prevent confusion with HTML setCookie - Changed: moved fileLoadDialogReponse into htmlfileopen_dialog callback as it must follow the call anyway - Fixed: retrieveConnectionDetails and getAllLobbyData functions - Fixed: (probably) various NetworkingSockets and NetworkingUtils functions

Known Issues

  • Using MinGW causes crashes. I strong recommend you do not use MinGW to compile at this time.

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.2.3.
  • Move the following to godotsteam/sdk/:
  • The repo's directory contents should now look like this:
  • Now move the "godotsteam" directory into the "modules" directory of the unpacked Godot Engine source.
  • Recompile for your platform:
    • Windows ( http://docs.godotengine.org/en/stable/reference/compilingforwindows.html )
    • Linux ( http://docs.godotengine.org/en/stable/reference/compilingforx11.html )
    • 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.
    • OSX ( http://docs.godotengine.org/en/stable/reference/compilingforosx.html )
    • When creating templates for this, please refer to this post for assistance as the documentation is a bit lacking ( http://steamcommunity.com/app/404790/discussions/0/364042703865087202/ ).
  • When recompiling the engine is finished do the following before running it the first time:

    • Copy the shared library (steamapi), for your OS, from sdk/redistributablebin/ 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 steamappid.txt file with your game's app ID or 480 in this folder. Necessary if the editor or game is run _outside of Steam.
  • The finished hierarchy should look like this (if you downloaded the pre-compiles, the editor files go in place of these tools files, which are the same thing):

    • Linux 32/64-bit
      ./godot.linux.tools.32 or ./godot.linux.tools.64
    • OSX
      ./godot.osx.tools.32 or ./godot.osx.tools.64
    • Windows 32-bit
    • Windows 64-bit
  • Lack of the Steam API DLL/SO/DyLib (for your respective OS) or the steam_appid.txt will cause it fail and crash when testing or running the game outside of the Steam client.

    • NOTE: For OSX, the libsteamapi.dylib and steamappid.txt must be in the Content/MacOS/ folder in your application zip or the game will crash.
    • NOTE: For Linux, you may have to load the overlay library for Steam overlay to work: ``` export LDPRELOAD=~/.local/share/Steam/ubuntu1232/gameoverlayrenderer.so;~/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so


export LDPRELOAD=~/.local/share/Steam/ubuntu1232/gameoverlayrenderer.so; export LDPRELOAD=~/.local/share/Steam/ubuntu1264/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.

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.

  • When uploading your game to Steam, you must upload your game's executable and Steam API DLL/SO/DyLIB (steamapi.dll, steamapi64.dll, libsteamapi.dylib, and/or libsteamapi.so). Do not include the steam_appid.txt or any .lib files as they are unnecessary.


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


MIT license

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.