Skip to content
PEERLESSDocs

SDK overview

One small browser script connects your game to identity, social features, progress and multiplayer.

What the SDK is

peerless-sdk.js is a dependency-free browser script (SDK 2.5, protocol 2). Load it before your game and it defines window.Peerless. Inside the PEERLESS player it talks to the parent page; everywhere else init() selects standalone mode and makes no request, so the same build can ship to several stores.

The SDK is optional. A single-player game can be uploaded without it, and player volume, mute and fullscreen still work.

Downloads

FilePurpose
peerless-sdk.jsThe browser SDK. Bundle it with your build.
peerless-sdk.d.tsTypeScript declarations with documentation comments.
peerless-colyseus.jsBinds an existing Colyseus lobby to PEERLESS sessions.
Managed Node kitServer helpers, packager, doctor and contract tests.

API at a glance

APIPurpose
init() · ready() · runtime()Select the mode, read identity, capabilities and launch credentials.
ui.open(panel)Open party, friends, chat, profile, settings, menu, achievements or leaderboards.
social.*Player cards, accepted friends, presence and the current party; change subscriptions.
analytics.*Report gameplay readiness and completed rounds.
achievements.*List achievements, unlock them and report cumulative progress.
leaderboards.*Submit scores and read global, friends or nearby boards.
audio.*Read and follow the player's volume and mute setting.
sessions.*Bind lobbies, queue, cancel, reconnect, listen hosting and regional connections.
join() · send() · leave()Relay rooms for small games without a backend.
managed()Refresh short-lived credentials for managed and dedicated servers.
player.* · fullscreen() · asset()Overlay roster, fullscreen requests and export-relative assets.
on(type, listener)Subscribe to SDK events; returns an unsubscribe function.

See the function reference for signatures, and events for every event type.

Versions

SDKHighlights
2.5audio.state() and audio.onChange(); typed capabilities and events.
2.4Listen (WebRTC) hosting with TURN fallback and host migration hooks.
2.2Player cards, friends, presence, parties and hosted social panels.
2.1Guest identity, gameplay analytics and leaderboards.

All versions speak protocol 2 and remain supported by the player.