LÖVE

Introduction

The LÖVE SDK can be installed by cloning the latest version from our GitHub into your a folder called sdk within your LÖVE game directory.

git clone https://github.com/planetary-processing/love2d-sdk sdk

You can then import the sdk like so:

local sdk = require(“sdk.sdk”)

The SDK object returned will have functions:

And variables:

Within love.load you need to run sdk.init(game_id, username, password) where game_id is found on your control panel and the username and password are your player’s username and password which you are responsible for capturing from them. If you are using anonymous authentication then you need not supply a username and password.

Within love.update you need to run sdk.update.

You can then access all the entities within sdk.entities (which can be iterated over) and the entity ID of the player associated with this client as sdk.uuid. Note that this means you can access the player entity with sdk.entities[sdk.uuid].

You can call sdk.message(msg) to send a message to the player entity on the server (e.g. to command it to perform an action).

The entity table within the LÖVE SDK is different to that on the server, it is defined as such:

Entity

Fields

Last updated