
Install
@minit-games/sdk is the bridge between your game and the Minit Games platform: install it once, then wire up a small number of lifecycle calls.
What the SDK does
Core lifecycle (initializeSDK, reportResult), config helpers for reading mod values, and optional UI components (feedback pop-ups, a header bar, flying rewards).
Installing
npm install @minit-games/sdk
Import what you need and call initializeSDK() once at startup:
import { initializeSDK, loadingDone, reportResult } from '@minit-games/sdk'
initializeSDK()
// ...load assets, then optionally signal the game is ready (see below)...
loadingDone()
// ...when the run ends...
reportResult(score)
What to set up next
The baseline lifecycle is initializeSDK() at startup and reportResult(score) when the run ends. The options and result handling are covered in Reporting Results. Two further integration points are optional:
- Game Ready Signal: call
loadingDone()when your game has finished loading, so the platform holds its reveal until the game is playable. - Saving User Data:
getUserData()andreportResult(score, { userData })remember things about a player between sessions, most commonly to skip the tutorial on a return visit.