mirror of
https://github.com/nexu-io/openmotion.git
synced 2026-12-02 04:30:00 +08:00
feat/openmotion-lambda-render
3 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
df2c1febb6 |
feat(game-studio): bundle 26 playable game templates (re-apply #768 on main + 4 new) (#849)
* feat(game-studio): bundle 22 playable game templates Re-applies the template changes from feat/game-studio-templates on top of main. The PR targeted feat/game-studio, which was squash-merged into main on 11-21, so the templates never reached main and Game Studio only showed the community games. - 22 single-file playable templates under templates/games (racing, shooter, casual, platformer, story, horror) with zh-CN titles, descriptions and controls. - Studio loads template covers from the local game service instead of bundling them twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(game-studio): add Harbor Skirmish, Jingyang Ridge, Rooftop Roast and Periscope Depth templates - Harbor Skirmish: the hand-drawn 3D island FPS from the DeepSeek V4.1 Flash case, as shipped. - Jingyang Ridge: an ink-wash Water Margin boss fight (Wu Song and the tiger): read the pounce / swipe / tail-sweep tell, dodge into the safe lane, punish the recovery. - Rooftop Roast: fly a drone over a city block, collect five beans and land on the café roof to win a coupon; one SHOP object rebrands it for any local business. - Periscope Depth: lead torpedoes onto ships through a periscope; launches raise detection, and a destroyer contact forces a dive into a sonar depth-charge evasion. All four are single HTML files with no network requests, keyboard + touch controls, pause on P / Esc / tab hide, restart on R, and English / Chinese text by browser language. The default npm package is 26.81 MiB with all 26 templates (main alone is about 24.5 MiB), so the budget moves from 26 to 28 MiB. Recompressing template images only saved 0.3 MiB at a visible quality cost, so the images are left as reviewed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(game-studio): count only active play time and drop stale respawns after restart - Rooftop Roast and Jingyang Ridge measured time from a clock that kept running while paused, so a long pause ended Rooftop Roast with "time's up" right after resuming. - Periscope Depth queued a respawn 2.5 s after each sinking; restarting inside that window added the old round's ship to the new round. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(game-studio): show portrait games in the same 16:9 cards as landscape games Portrait (9:16) cards were three times taller than landscape cards, so a few portrait games filled most of the first screen. Both orientations now share one 16:9 grid: the portrait cover is shown whole in the middle over a blurred copy of itself, in the Super Agent game showcase and in Game Studio (which also marks them Portrait). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(game-studio): address review on the bundled fallback, Harbor Skirmish hosts and Jingyang locale - Without the local game service, bundled template cards used covers served by that service (404) and opened pages that load ./assets/ from a blob URL (broken artwork). The fallback now shows each card's genre artwork, and the 17 templates that load sibling assets ask for the local game service instead of opening a broken page. - Harbor Skirmish's inlined Three.js carried the XHTML namespace and a discourse.threejs.org warning URL, which the remix validator reports as external hosts. The namespace string is split and the warning text drops its scheme; behaviour is unchanged. - Jingyang Ridge picked Chinese for every non-English locale; it now uses /^zh/i like the other templates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(game-studio): let validate() skip XML namespace identifiers instead of splitting them createElementNS namespace URIs (XHTML, SVG, MathML, XLink, XML) are identifiers, never requested, and appear in bundled libraries such as Three.js, so validate() now skips them by exact match; a script loaded from www.w3.org is still reported. Harbor Skirmish keeps its original XHTML namespace literal. Its console warning keeps the scheme-less URL, with a comment saying why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: zhanghuihua <zhanghuihua@huihuideMacBook-Pro.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ba3aaf2f60 |
feat(game-studio): add Game Studio with local game service and MCP game tools (#767)
* feat(game-studio): add Game Studio tab, local game service and MCP game tools Game Studio page with template waterfall, My games sidebar, landscape/portrait choice and auto-open of Agent-created drafts; local game projects service with rooms, playtest, simulate and cover capture; openmotion_game_* MCP tools; openmotion-game handbook ported from the MIT higgsfield-ai/skills handbook; coop-3d and arcade-2d starter kits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(game-studio): register game tools, dedupe handbook provenance, fix search and code reload Register the openmotion_game_* tools in MCP counts, onboarding scenarios and tracking dimensions; keep them out of WebMCP. Move the shared MIT provenance note to PROVENANCE.md. Studio search now matches localized titles, and the Code tab reloads its source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(game-studio): harden game service and fix invite copy and code fullscreen Case-insensitive reserved paths and request-id saves; sandbox CSP for game documents; WebSocket fragment count, time and buffer limits; AST-based determinism check; single-player start for playtest and cover capture; atomic batch writes with rollback. Studio: clipboard-write for embedded games and Code-tab fullscreen on the stage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(game-studio): trim KayKit characters below 1 MiB for the storage policy Keep 12 common clips per character (meshes, skin and bones unchanged) so Knight.glb and Mage.glb stay ordinary Git files; update the character README and the 3D handbook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(game-studio): hand drafts to the user's Agent; derive the WebSocket test nonce Drafts show "Waiting for your Agent" until the Agent sets building. The draft page offers Copy instruction and Open in Codex (prefill only) with the full instruction: game id, brief and steps. GET /api/games/:id/handoff returns it for any workspace draft, including drafts created elsewhere and remixes; creation now includes the portrait layout in the instruction. Tests derive the RFC 6455 sample nonce at runtime so release scanning stays strict. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(game-studio): spin the detail status only while the Agent is building Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(game-studio): exercise all twelve game tools in the packaged MCP smoke test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(game-studio): vendor acorn so packaged builds can run the game rules sandbox Packaged builds ship without node_modules, so openmotion_game_simulate failed with "Cannot find module 'acorn'". Ship acorn 8.19.0 (MIT, license in the file header) under shared/vendor and import it relatively. Verified in a node_modules-free copy of the phase1 file list: create plus reference simulation wins at tick 809. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(game-studio): resolve browser and trailer dependencies from the host runtime root Packaged builds install npm dependencies under the data directory, so playtest, cover capture and trailer recording failed with "Cannot find module 'puppeteer-core'" and the trailer looked for HyperFrames in the plugin folder. Server and phase1 hosts now pass their runtime root; puppeteer, HyperFrames checks, the trailer's Phase1Service and render queue use it (source checkouts fall back to the plugin root). Verified in a node_modules-free phase1 file copy: playtest, cover, simulate, publish and a trailer through ready. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(game-studio): isolate catalog entries, smoke-test solo logic and run the game suite in CI Review follow-ups: - The catalog skips and reports a game folder it cannot read (an orphan or malformed game.json) instead of failing GET /api/games; create and remix remove their folder when a step fails, so a partial create no longer leaves an orphan. - Validation runs the bounded logic.js smoke check for every game with rules. Single-player games follow validateAction as live play does, the loop stops when the game ends, and a kit game missing logic.js is reported. Room checks stay multiplayer-only. - tests/game-projects.test.ts runs in the Distribution browser lane (Chrome and native export cases skip themselves when unavailable) and leaves the unscheduled list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(game-studio): stabilize scrolling and animate build indicator * fix(game-studio): validate runtime before browser discovery Resolve the requested runtime dependencies before detecting Chrome so missing-runtime diagnostics remain deterministic on Linux. Preserve all tests and emit failed Game Studio assertions as GitHub check annotations. * fix(game-studio): stop waiting for network silence during capture Wait for the document load and visible canvas while retaining room, startup and runtime assertions. Add a real polling regression that reproduces the 20-second navigation timeout and verifies successful background responses during capture. --------- Co-authored-by: zhanghuihua <zhanghuihua@huihuideMacBook-Pro.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: zhanghuihua <zhanghuihua@Mac.lan> Co-authored-by: stevenguotj <stevenguotj@stevengotjdeMBP.lan> |
||
|
|
4250e10dbb | feat(motion): replace legacy app with standalone OpenMotion |