@seekprotocol/game
v0.1.5
Published
GameKit: the bridge between a minigame and the Seek app.
Maintainers
Readme
@seekprotocol/game
The GameKit bridge between a minigame and the Seek app. Made by Seek Protocol.
A minigame in a quest is a web page that the Seek app shows. The bridge tells the app when the game is ready and how it ended.
import { createBridge } from '@seekprotocol/game';const seek = createBridge();
const { seed, lang, autostart } = await seek.ready();
// autostart: the app already showed the story and a 3, 2, 1. Skip your intro,
// start the first round once your assets are in, and count down between rounds
// instead of showing a continue button. False in a free run and in older apps.A game played on foot (a play step with position, capability
gamekit.position) also gets the player's position, as metres east and north
of where the run started, never coordinates:
if (seek.launch().position) {
const { radiusM, minWalkM } = seek.position.rule ?? { radiusM: 150, minWalkM: 100 }; // null from an older app
seek.position.subscribe(({ x, y, accuracy, heading, t }) => {
// at most twice a second; nothing while the app is in the background
});
}
const now = seek.now(); // Seek's clock, the same one as a position's tSeek checks the walk itself after the run. The bridge never sends a position anywhere: not to storage, track or Vitals.
seek-game.js is the same bridge as one file, for a game without a bundler.
The guide is in Store Connect, under Documentation, after you sign in: https://storeconnect.seekprotocol.ai
Copyright (c) 2026 Seek Protocol. MIT licensed, see LICENSE.md: ship the bridge with your game freely.
