Skip to content

LootLockerGodotSDK_v0.0.1-alpha

Latest
Compare
Choose a tag to compare
@kirre-bylund kirre-bylund released this 19 Dec 12:49

LootLocker Godot SDK 🎉 🧩

We are happy to announce an alpha of the official Godot SDK for LootLocker! 😀

About the release

Alpha

This release is marked as a pre-release alpha. That means that you are free to try the product out. It is however not promised to be production ready and is liable to change.

This also means that the SDK is without support at this stage. It is provided as is, as a technical evaluation. If you run in to any problems, then please do reach out to us as outlined below.

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

Sample

Attached to this release you can find a sample project we have made showcasing how to set up and use the new Godot SDK in a project. If you wish to quckly get an overview of how the SDK functions then we recommend that you consult the sample. It outlines:

  • How to start Guest Sessions
  • How to create White Label Accounts
  • How to Sign in a White Label user
  • How to get information about a player and change their display name
  • How to fetch leaderboard information
  • How to display information about leaderboards that reset on a recurring basis (in the sample it's weekly)
  • How to submit scores to a leaderboard

The sample is connected to a LootLocker provided sample game without support. To learn more about how to configure your own game, consult our documentation.

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 LootLockerSDK.
  • Copy the extracted folder (called LootLockerSDK) into your Godot project. Place it into your project's structure in a way that makes sense for you.
  • 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"

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