Skip to content

KoderaSoftwareUnlimited/GodotSteam

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GodotSteam for Godot Engine

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

Additional flavors include:

Documentation

Documentation is available here and there is the project's Wiki page here.

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

Feel free to chat with us about GodotSteam on the CoaguCo Discord server.

Current Build

You can download pre-compiled versions (currently v3.9) of this repo here.

Version 3.9 Changes

  • Added: new UGC functions addRequiredTagGroup, getQueryUGCNumTags, getQueryUGCTag, getQueryUGCTagDisplayName
  • Added: new Friends function activateGameOverlayInviteDialogConnectString
  • Added: default values to leaderboard functions, you can now pass handles for specific leaderboards or use the internally-stored, last-called handle
  • Added: multiple controller types from Input function getInputTypeForHandle
  • Changed: minor readability changes to function arguments and defaults
  • Changed: additional spacing and readability to overall module
  • Changed: replaced leaderboardDetailsMax with k_cLeaderboardDetailsMax
  • Changed: applied EIREXE's UTF-16 fix module-wide
  • Changed: minor corrections to comments and added missing comments
  • Changed: some additional code to some call results and callbacks
  • Changed: metadata length for UGC to 5000 from 255, thanks to EIREXE
  • Changed: beginAuthSession to use new auth function arguments
  • Changed: cancelAuthTicket to actually use the Steamworks function
  • Fixed: renamed addItemToFavorite to addItemToFavorites to match SDK
  • Fixed: incorrect class check in some UGC functions
  • Fixed: minor corrections to various functions
  • Fixed: destroyResult and getResultItemProperty being bound to the wrong functions
  • Removed: setLeaderboardDetailsMax as it is unnecessary
  • Removed: getAuthSessionTicketID as it is no longer useful due to auth function changes

Version 3.9.1 Changes

  • Removed: unused C++ line from config.py for Mac, which caused compiling issues

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 1.51; this requires a Steam developer account.
  • Download and unpack the Godot source 3.3.
  • Move the following to godotsteam/sdk/ folder:
    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 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
    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
    
  • 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 libsteam_api.dylib and steam_appid.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 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.

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 (steam_api.dll, steam_api64.dll, libsteam_api.dylib, and/or libsteam_api.so). Do not include the steam_appid.txt or any .lib files as they are unnecessary.

Donate

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

License

MIT license

About

Steam API for the Godot game engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 99.7%
  • Python 0.3%