Openmotion Game
Published by nexu-io in opengame
What this skill does
Find/preview game assets and build, remix, validate, and publish single-player browser games via OpenMotion tools and multimodal media.
Add Openmotion Game to your agent
Review the source and files first. When you are ready, copy the prompt instruction or use the CLI command supported by your environment.
Install with a prompt
Paste this into a compatible coding agent:
add this skill "openmotion-game" from https://github.com/nexu-io/opengameInstall with the CLI
Run this command in a controlled environment after reviewing the repository:
npx skills add https://github.com/nexu-io/opengame --skill openmotion-gameSkill instructions
OpenMotion Game Studio
For 2D/3D sourcing see sourcing (openmotion://workflow/game/sourcing); for asset previews call openmotion_asset_manage(action:"present_asset", conversationId, path|assetId+versionId) (exact GLB animation; BVH skeleton only).
0. Built-in Template Remix Path
When remixOf points to a ready built-in template, infer whether custom edits were requested:
- Commercial/IP remake: keep Q&A read-only; on template copies break fast path, read remake (
openmotion://workflow/game/remake), and create a fresh project; casual remixes stay fast. - No edits asked (empty/unchanged brief, no overrides/attachments): skip
write_files/validate/playtest/simulate/capture_cover; callset_status(id, "ready")+present_artifact(kind="game-project", projectId=id)(game_getonly if controls missing). - Edits asked: keep preview playable (no
set_status("building")/full rewrite). Inspect touched files viagame_get+game_read_file-> in-placegame_write_files, keep working audio/engine, skipdesign/*.md, verify once (<= 2 passes), update cover/meta if changed, thenset_status(id, "ready")+present_artifactafter the final playable write. - Reply voice: open in user's language as builder (
"《<title>》已为你制作完成……"/"I've built <title> for you — ..."), summarize highlights + controls; never mention templates, copying, internal skills/tools or skipped checks.
1. Intent Precedence & Strict Read Budget
- User intent first (single-player only): Multiplayer: explain single-player scope, ask first. Treat composer selections (tab, genre, style, orientation,
playableAd) asnon-binding, never hard overrides. Answer read-only Q&A without creating or editing games. Commercial/ad-monetized mini-games (saves, progression, rewards) are regular games, NOT 30–60 s buy-side playable ads; clear mismatched flags viaopenmotion_game_update_meta(playableAd=false, ...). - Consent: Do not ask upfront for local-market publication consent — call
openmotion_game_publishonly when the user explicitly asks to publish. For paid media, skip inside Studio or any host that manages generation consent; in external MCP hosts without built-in controls, ask one batched spend confirmation. - Pick ONE track (never bulk-read unrelated refs via
openmotion://workflow/game/<section>):Fast Track(default for 2D games & custom remixes, including 3–4 visuals + BGM/SFX; BGM-only generation does not upgrade aFast Trackgame): Readstartonly (plusminigameon portrait casual/IAA); skipdesign/*.mdand deep dives.Full Track(realtime-3d, multi-levelstrategy-combo/sandbox-explore, explicit buy-sideplayable-ad, or >= 5 generated visual/3D assets): Read<= 2optional matched refs (plus mandatoryanimation/playable/lookupwhen triggered);<= 1briefdesign/plan.md(+design/assets.csvfor multi-asset batches).
| Trigger | Load Strictly On Demand |
|---|---|
realtime-3d (mandatory before assets) | 3D & vendored kits (animation) |
| 9:16 portrait casual / one-hand / IAA mini-game | portrait mini-game (minigame) |
| Explicit buy-side playable ad | game-playable-ad.md (playable) |
| Commercial remake | remake |
| Named reference ("like X"), idea hunt or solver math | game-lookup.md (lookup) |
| Optional deep dives | audio, genres, gates, review, flow, style, sprites, textures, procedural, controls, craft, brief, design |
Re-read start if openmotion_game_create returns runtimeUpdate.skillChanged; mention restart only on mcpSchemaChanged/restartDeferred.
2. Zero-Friction Build & Verify Loop
Priority: 1. Safety/IP/runtime/spend > 2. User intent > 3. Genre authenticity & craft > 4. Speed.
- Direct Start & Never-Ask Defaults: Skip shell probes and starter reads you replace. Self-decide unspecified defaults (palette, difficulty curve, sound mix, language, controls) and deliver a playable build without preference questionnaires; pause only for multiplayer scope, missing multimodal access, or required spend confirmation. Call
openmotion_game_create(style:"3d"on 3D briefs;orientation:"portrait"on vertical;playableAd:trueONLY for explicit buy-side playable ads) ->set_status(id, "building"). New 2D/portrait drafts ship pure-JS kits in./kits/(OneHandInput.js,SafeAudioKit.js,PlayableShell.js); import those instead of re-coding touch/audio/ad boilerplate. - Craft, Art Cohesion & Onboarding Floor:
- Cohesive illustrated art: Pin one concise English style prefix (medium, lighting, muted backdrop < medium playfield < high-contrast hero + signal hue) across all prompts and HUD. Composite sprites cleanly (cutouts, contact shadows, idle motion) — never ship flat dashboards or crude primitives for focal heroes/structures unless minimalist/text-only is asked. Keep canvas proportional (center portrait on full-bleed backdrop) with zero HUD overflow at
1280×720/720×1280/390×844. - First-second clarity & audio: Playable within 1–2 s after
#start(first-frame play onplayable-ad) with pulsing first-action cues, fair 5–8 s opening, escalating risk/reward, keyboard + mouse/touch, hit-stop/shake/popups, dual-layer audio (looping BGM + crisp SFX) unless silence asked, reachable win + loss + restart.
- Cohesive illustrated art: Pin one concise English style prefix (medium, lighting, muted backdrop < medium playfield < high-contrast hero + signal hue) across all prompts and HUD. Composite sprites cleanly (cutouts, contact shadows, idle motion) — never ship flat dashboards or crude primitives for focal heroes/structures unless minimalist/text-only is asked. Keep canvas proportional (center portrait on full-bleed backdrop) with zero HUD overflow at
- Multimodal-First Asset Routing (skip only on explicit pure-code / no-AI-generation requests —
"original/local art"still uses multimodal generation):- Discover live capabilities (1 parallel turn): Call
openmotion_media_use(action:"inspect", modality:"image")+"audio"(and on 3D briefsopenmotion_capability_discover(action:"list", modality:"3d"); never passmodality:"3d"toopenmotion_media_use). IfpaidGenerationPolicyis"forbid", skip paid generation and use procedural/CC0 + WebAudio. Callmodels(refresh:true)/describeonly when needed. Prefer signed-in OpenDesign (included,unknown, or liveentitledModelIds), then BYOK. - Default parallel packs (reuse pinned style prefix in 1 burst; adjust only if minimalist/pure-code asked):
- 2D multimodal: 3–4 cohesive visuals (
1backdrop +2–3focal hero/entity sprites with transparent/isolated ground) + 2 audio (1looping BGM +1action SFX). - 3D / Playable ads: On 3D briefs read
animationfirst (1–2 P0 actors via isolated concepts or orthographic 3-view turnaround -> Image-to-3D + 1–2 surface visuals + BGM/SFX; for stylized hard-surface vehicles/turrets/towers/weapons/gates/chests/mechanisms or offline fallback, search built-inopengame-kitswhite-box GLBs (search_modelsqueryopengame-kits), acquire the ID for a publish-safemediaUrl, restyle viaapplySemanticPalette(3D kits); no live 3D model -> fall back to 3D meshes only, keeping image/audio active). Playable ads followplayablepack rules.
- 2D multimodal: 3–4 cohesive visuals (
- Unavailable, plan-gated, or low-balance recovery (mandatory onboarding):
- Usable Plus+ or BYOK: generate normally; never prompt sign-in/upgrades.
- Missing access / plan gate: when
inspectreturnssettingsHandoffwithagent_media_signed_out(signed out),agent_media_upgrade_free/agent_media_upgrade_go(no multimodal plan/entitled models — shareupgrade.url; OpenDesign Plus or API key is required), oragent_media_key_rejected, you must callopenmotion_open_previewwith it and pause until the user replies (then re-runinspect). Never offer or fall back to code-placeholder assets to bypass official multimodal generation — use procedural/CC0 + WebAudio only whenpaidGenerationPolicyis"forbid"or the user declines or asks pure-code. - Low balance: never pre-block Plus+ on cached
hasBalance; on realbalance is too low/insufficient_balance, stop, callopenmotion_open_preview(target:"providers", entry:"agent_media_balance_low"), then ask to top up.
- Overlap build & publish-safe media: Submit
generatejobs in 1 parallel burst (requestId/job), write code while jobs run, await in ONEwait_all(jobIds:[...]; resume timed-out 3D with samerequestId+inputs; fall back after 1GENERATION_TIMED_OUTon secondary assets), skipmanagerenames, batch-readimages<= 1x(never audio), embed whole literal/motion-api/assets/<assetId>/versions/<versionId>/mediaURLs. Publish-safe media: never concat/motion-api/...; gate withif (url)(neverstartsWith('/')); load sprites progressively via offscreennew Image()(never hidden<img>, never drop lateonloadon timeout, retryonerror1–2x); wire<button type="button">+click(never<form>submit); never block first frame.
- Discover live capabilities (1 parallel turn): Call
- Author in ONE Cohesive
openmotion_game_write_filesBatch:logic.jsboundary: Starterlogic.jsis ignored if unimported (hasLogicModule: false). Use pure deterministiclogic.js+simulate(ctx.random(),ctx.now,ctx.tick, noimport/Math.random/Date.now) for discrete/turn/grid/card/board/fixed-tick rules; for continuous real-time 2D physics/action and ALL 3D, write client ESM directly and skipsimulate.- Mandatory
window.__omGamehook: expose{ getState, getStats, sendAction, runSelfTests }returning{ selfId: 'player-1', players: { 'player-1': { connected: true, x, y, z } }, phase, result }and{ fps, drawCalls, triangles, entities, tick }; update coordinates on move (movementThreshold: 0for stationary UIs). For action/arcade/pacing games, also emit a compacttuning.json(4–8 core feel parameters + 2–3 optional presets), load via non-blockingfetch('./tuning.json'), and exposewindow.__omGame.tuning = { get, set }so later feel/difficulty requests useopenmotion_game_tune(live zero-reload tuning card) instead of rewriting JS.
- Verify, Fix Hard Defects & Capped 1-Pass Visual Polish:
- Run
openmotion_game_validateonce runnable (fix every diagnostic/portability warning; skipdesign/*.mdon Fast Track/Remix), andopenmotion_game_simulateonly whenhasLogicModuleis true (referencewins;idleloses< 2500ticks). - Run 1 consolidated
openmotion_game_playtest(<= 8captures; 3D:burst4 +<= 4screenshots) proving real gameplay with real inputs (validkey:a-z/0-9/Arrow*/Space/Enter/Escape— neverKeyA-KeyZ), then{ type: "action", action }for win/loss/restart +runSelfTests(). On portrait mini-games and playable ads, enableaudioAudit: trueandpersonaAudit: true(pluscontainerAudit: trueand URLqueryoverrides on playable ads) to verify anti-clip audio, background freeze and 4-persona stability deterministically. - Inspect
contactSheetPath& Revision Freeze: Fix all hard defects beforeready, allow at most 1 focused visual/cohesion/onboarding polish pass (write_files+ 1playtestconfirmation), then stop. On follow-up revision turns against an already-playable game, preserve working controls, feel, user art and top-levelconfigknobs (optionally frozen indesign/contract.json), triaging changes into Must-Fix P0, Safe Surgical Polish or Suggest-Only. Never use shell on OpenGame internals.
- Run
- Deliver (
capture_cover->update_meta->ready->present_artifact): Finish playablewrite_filesfirst (playable edits reset tobuilding, aux dirs keep status; never finish indraft/building).capture_coveronce (1280x720/720x1280assets/cover.png, neverassets/playtests/...),update_meta(+zh-CNi18n),set_status(id, "ready"),present_artifact(kind="game-project", projectId=id). Callopenmotion_game_publish(local),openmotion_assets_use(action:"web_publish", webPublish:{command:"publish", targetKind:"game", targetId})(public HTTPS share link on any team/friend share request aftervalidate; onOPENDESIGN_SIGN_IN_REQUIREDsurfacesettingsHandoff, never local servers/tunnels; re-publish after follow-up edits), oropendesign_studio_action(studio="game", action="export")(channel packages) only when asked. Channels: wechat, taptap. - Final Reply (user's language, no tool names/ids/JSON): bold summary, play link, real controls, 2–3 tweak ideas (note you can generate a public share link for teammates on request), verified vs unverified note (feel/GPU/audio/touch) & caveats, plus spend note if paid generation ran.
Mandatory Multiplayer Entry Acceptance
Authoring is single-player only. For existing multiplayer games: verify ?room= auto-join, deterministic logic.js, and openmotion_game_playtest(clients: 2).
Files included
- SKILL.md
- PROVENANCE.md
- references/game-design-system.md
- LICENSE-HIGGSFIELD
- references/game-3c-modules.md
- references/game-audio.md
- references/game-3d-animation.md
- references/game-2d-animation.md
- references/game-brief.md
- references/game-feel-craft.md
- references/game-flow.md
- references/game-genres.md
- references/game-gates.md
- references/game-lookup.md
- references/game-model-sourcing.md
- references/game-procedural-animation.md
- references/game-playable-ad.md
- references/game-stylization.md
- references/game-original-remake.md
- references/review-rubric.md
- references/game-textures.md
- references/game-portrait-minigame.md
- scripts/game_model_tools.py
- references/wechat-minigame-port.md
- references/taptap-h5-publish.md

