LootLocker Godot SDK 🎉 🧩
We are happy to announce the official release of a Godot SDK for LootLocker! 😀
About the release
v1.0.0
This release is marked as version 1. This means that the SDK is no longer in alpha and you can use it in your game with the expectation that it is stable and reliable.
Feedback
The LootLocker team would appreciate any feedback you have after trying the SDK. If you find bugs, have technical remarks on the structure of the SDK, or simply want to offer your input then please do reach out to us through our discord or create an issue in the SDK Github
About the SDK
This is the SDK (Software Development Kit) for interacting with LootLocker's powerful systems from your Godot game. It is a pure GDScript code package provided by the LootLocker team.
LootLocker is a game backend-as-a-service that unlocks cross-platform systems so you can build, ship, and run your best games.
Full documentation is available here https://docs.lootlocker.com/
How to install it
- Download the zip at the bottom of this release.
- Extract the contents from the downloaded zip file. This will yield a folder named addons containing a folder named LootLockerSDK.
- Copy the extracted addons folder into your Godot project
- Enable the LootLockerSDK addon in Project Settings > Plugins
- You're all set
How to configure it
- Log on to the LootLocker management console and find your Game Settings.
- Find your Game Key in the API section of the settings
- Open or create the file
res://LootLockerSettings.cfg
. The file follows the ini format and needs to have the following settings:- First, the header
[LootLockerSettings]
- Then
api_key="<your api key from console.lootlocker.com>"
- Then
domain_key="<your domain key from console.lootlocker.com>"
- And finally
game_version="<a semver representation of the current game version>"
- Once you've done this, you will have a file that looks something like this:
[LootLockerSettings] ; You can get your api key from https://console.lootlocker.com/settings/api-keys api_key="prod_1c52468fc6e8420c955e3b6c303ea8cc" ; You can get your domain key from https://console.lootlocker.com/settings/api-keys domain_key="1g9glch3" ; The game version must follow a semver pattern. Read more at https://semver.org/ game_version="1.2.1.4"
- First, the header
- Optionally: You can configure the log level of the LootLocker SDK by adding
; The configured Log Level for LootLocker, Set to "None" to silence LootLocker logs completely ; Possible values are: "Debug", "Verbose", "Info", "Warning", "Error", "None" logLevel="Debug"
How to use it
Now that LootLocker is installed and configured in your project, go ahead and call the LootLocker methods you need. All the LootLocker features that you can use are prefixed with LL_
and the name of the general feature you want to use. To make calls to LootLocker, the player needs to have authenticated a user. So the first thing you will do is to authenticate which you can do by making a new request from any of the classes in LL_Authentication
.
Once your player is authenticated you can continue calling any of the exposed LootLocker features you need.
A very basic example of how to sign in a guest user and ping the LootLocker servers to get an "objective" current time would look something like this:
var guestLoginResponse = await LL_Authentication.GuestSession.new().send()
if(!guestLoginResponse.success) :
printerr("Login failed with reason: " + guestLoginResponse.error_data.to_string())
return
var pingResponse = await LL_Miscellaneous.Ping.new().send()
if(!pingResponse.success) :
printerr("Ping towards LootLocker failed with reason: " + pingResponse.error_data.to_string())
return
or if you wanted to authenticate the guest user with an identifier they provide through UI for example you'd call it like this:
var guestLoginResponse = await LL_Authentication.GuestSession.new(<The identifier from the player>).send()
if(!guestLoginResponse.success) :
printerr("Login failed with reason: " + guestLoginResponse.error_data.to_string())
return
Special Thanks to
We wanted to give a special thanks to @ARez2, @Infini-Creation, and @pepper-boi as contributors to the Community Godot SDK and to @AlmightyMikkel for kick-starting the official development of this SDK