跳到主要内容
InstaPlay
SDK 文档章节

Publishing a game on InstaPlay

Upload a game in the dashboard or with the instaplay CLI: it builds the zip, checks the metadata, uploads the build, waits for the automatic checks and, with the --submit flag, sends a moderation submission. Install the CLI into the project (npm install --save-dev instaplay) instead of running it from the registry — installation, all commands and errors are in the guide: CLI. Before publishing, run the game in the emulator.

1. Studio key

Games are published by a studio: every studio has its own ipk_… keys. The studio owner or an admin creates a key in the dashboard: “Settings” → “API keys”, the “Publish” scope (details — the guide: API keys). The key is a secret: do not commit it to the game repository. In CI pass it as the INSTAPLAY_API_KEY environment variable (API address — INSTAPLAY_API_URL).

npx instaplay login --key ipk_… --api https://<portal>/api/v1
npx instaplay whoami   # the studio of the current key

login checks the key against the API and stores it in ~/.config/instaplay/credentials.json.

2. instaplay.json metadata

instaplay.json sits next to the game: slug, category, tags, ru and en texts, cover, leaderboards. Category and tags are keys from the reference below only: you cannot invent your own, or publishing returns 400 validation_failed (“unknown tag …”). Text quality threshold — title 2–60 characters, SEO description 50–160, description 300–5000, “how to play” from 80, FAQ 3–6 questions, 2–10 tags, a 16:9 cover of at least 1280×720.

3. Check and publish

npx instaplay check ./my-game                       # threshold: meta, category and tags (M03), zip, SDK, cover
npx instaplay publish ./my-game --submit --note "…"  # upload, checks and a moderation submission
npx instaplay status ./my-game                      # build checks and submission state later
  • check validates the category and tags against the portal reference (check M03) before publishing. No network — a warning, publish will check them; --offline skips it.
  • publish is safe to repeat: the idempotency key is pub-<slug>-<sha256 zip> by default, a repeat of the same build does not create a second one.
  • The portal test stand checks the build (start, ready, JS errors, requests outside its own origin, a non-empty frame). Only --submit (or the “Submit” button on the dashboard's “Moderation” tab) creates a moderation submission: without it the build just updates the draft. A trusted studio's game is published right after the checks, without a submission (CLI: publishing).
  • Exit codes: 0 — the build passed, 1 — the checks failed, 2 — an error (key, network, metadata).

Category and tag reference

Keys for the category and tags fields of instaplay.json (the portal name in brackets). The API returns the same list: GET /api/v1/categories and GET /api/v1/tags (the key field).

分类(category)

键名称
action动作游戏
adventure冒险游戏
arcade街机游戏
puzzle益智游戏
match3三消游戏
mahjong麻将游戏
merge合成游戏
idle放置与点击游戏
racing赛车游戏
shooting射击游戏
sports体育游戏
strategy策略游戏
rpg角色扮演
simulation模拟经营游戏
cards纸牌游戏
board棋类游戏
word文字游戏
quiz问答游戏
two-player双人游戏
io.io 游戏
parkour跑酷与闯关
horror恐怖游戏
logic逻辑游戏
girls换装与烹饪
kids儿童游戏
runner跑酷冲刺

标签(tags)

键名称
20482048
animals动物
arena竞技场
auto-battler自动战斗
ball球
basketball篮球
beauty化妆
blocky方块世界
brain烧脑
brainrot脑腐
bricks砖块
bubble-shooter泡泡龙
cars汽车
casual休闲
clans公会
classic经典
colorful缤纷色彩
cooking烹饪
destruction破坏
drawing绘画
dress-up换装
educational益智教育
endless无尽模式
escape逃脱
fantasy奇幻
farm农场
fighting格斗
flappy飞扬小鸟
flying飞行
football足球
hardcore硬核
heroes英雄
hidden-objects找东西
high-score冲击高分
horror恐怖
jigsaw拼图
jumping跳跃
keyboard键盘
kids-friendly适合儿童
mahjong麻将
match-3三消
memory记忆
merge合成
military军事
mines地雷
minesweeper扫雷
motorbikes摩托车
mouse鼠标
multiplayer多人
mystery推理
neon霓虹
numbers数字
obby障碍跑酷
offline离线
one-button单键操作
paddle挡板
pairs配对
parking停车
physics物理
pixel像素风
pvpPvP
quick5 分钟
relaxing解压放松
retro复古
rpg角色扮演
shooter射击
singleplayer单人游戏
sliding-puzzle滑块拼图
snake贪吃蛇
solitaire纸牌接龙
sorting分类
space太空
stickman火柴人
survival生存
tic-tac-toe井字棋
tiles方块
touch触屏
tower-defense塔防
trucks卡车
two-player双人
tycoon大亨
typing打字
vs-ai人机对战
words单词
zombie僵尸

系列(series)

键名称
classic-arcade经典街机系列
brain-trainers大脑训练系列