Uniplay

Making games for the Uniplay Hub#

The Uniplay Hub, at play.unikia.es, is a library of browser games that runs in one page. Players pick a game and play it without leaving the Hub, earn achievements across every game, keep their saves in slots they can manage, and play co-op with their buds in a room that stays open from game to game.

A game is a static web build: HTML, scripts and assets, served from its own folder on the Hub's site. It describes itself in a unihub.manifest.json, and uses the Uniplay SDK, @unikia/upe-sdk, for achievements, saves, time played, the Hub around it and co-op. Every part of the SDK is optional, and a game that skips it still runs; this contract is what the SDK implements, so a game may also port it or write its own.

Installing#

The SDK and the uniplay command are on npm:

Package What it is
@unikia/upe-sdk The SDK, imported by the game: achievements, saves, time played, the Hub around the game and co-op
@unikia/upe-cli The uniplay command: validate, pack, submit, status, skill
npm install @unikia/upe-sdk                       # or: bun add @unikia/upe-sdk
npx -p @unikia/upe-cli uniplay validate           # run the command without installing it

Always name the package (-p @unikia/upe-cli) when running uniplay with npx: a different, unrelated package on npm is called uniplay, and plain npx uniplay would run that instead.

How a game gets on the Hub#

  1. Build the game, with a unihub.manifest.json at the root of its folder.
  2. Check it with npx -p @unikia/upe-cli uniplay validate, the same checks the Hub runs on a submission.
  3. Pack it with npx -p @unikia/upe-cli uniplay pack, which writes the submission zip.
  4. Ask for a Publisher profile from the Feedback window in the Hub, signed in with your account. An admin creates the publisher, with you as its member.
  5. Submit the zip from your publisher dashboard, or make a key there and run npx -p @unikia/upe-cli uniplay submit --key uk_sub_… (submitting).
  6. Review: an admin plays the game's first version before it goes live, unless you're a verified publisher.
  7. Live: the game is listed in the Hub. Later versions go through the same steps.

The docs#

Page What it covers
Game manifest unihub.manifest.json, and what goes in the submission zip
Achievements achievements.json, unlocks and the unlock notification
Saves Save slots the player can manage from the Hub
Playing inside the Hub The Hub shell around a game, and Buds rooms for co-op
Time played How time played is counted
Versioning and storage keys Spec versions, and the keys the Hub keeps for itself
Submitting a game Submission keys, the upload API and review
Checklist for adding a game Everything above, step by step

The JSON Schemas for the manifest and for achievements are served at /schema/unihub.manifest.v1.json and /schema/achievements.v1.json. For coding agents, /llms.txt lists these pages as Markdown, and npx -p @unikia/upe-cli uniplay skill copies an agent skill for building Uniplay games into a project.