zizi 99b6c82dec feat(runner-v2): P1 王蓝莓上引擎=游戏宿主装载契约 spike 实(mini-desktop real 引擎 5 门全过)
Runner v2 全弧第一相(HJ-RUNNER-ARC-001 / P1):用王蓝莓把"上层游戏宿主装载契约"
从零 spike 到"引擎真掌帧 + 游戏美术与引擎粒子同屏可玩",解锁 P2 泛化 / P3 生成。

契约与共享件
- 新增装载契约 game-runtime/src/core/game-host.d.ts(第9类 additive·暂名):
  GameHostBootContext / GameInstance / GameHostFactory;游戏=纯模块工厂,零引擎 import,
  能力经下层 ctx.getEngine()(受控面 6 项零改),绘制面 render(g) 的 g=引擎 mainContext
- makeEngineCaps 闭包提升为可 import 模块 host-dev/engine-caps.js(createEngineCaps):
  host-dev/ref/未来生成游戏共用;engineMode 短路 / __engineCalls 探针 / null-engine 语义逐行不变

王蓝莓 real 通道(games/wanglanmei-ref)
- 增 ?engine=real:主循环从浏览器 RAF 改挂 engineInit 五回调(掌帧唯一源=引擎);
  游戏美术绘制面从 #game 改引擎 mainContext(同屏合并);bundle 延后到 setupReal 内以
  mainContext 建(getContext2d 闭包快照修);保 ?engine=stub 逐像素确定性回滚
- game-shop.js 抽为独立 GameHostFactory(零引擎 import,P3 生成 agent 可复制范本)
- entry.js 动态 import('littlejsengine')=node-import-safe ∧ esbuild iife 入包两全
- 驱动 e2e-input.cdp.cjs real 改造:禁 stepFrames 手摇(防双掌帧),真触摸+轮询;
  门②同屏像素判据(暖色 warmHits ∧ 引擎粒子 brightHits 同张 #game-engine)

真机验收(mini-desktop real 引擎,5 门)
引擎掌帧 dFrame=31∈[20,45] / 同屏 warmHits=682∧brightHits=13028 同张 #game-engine /
particles.spawnEmitter+synthSfx call-ID 运行时真调引擎 / CDP 517 真触摸跑通整局
(第1天接待18·营收¥79.9·连击9) / console 零错;本机 88 单测全绿(含修复 4 红+补回归)
证据:games/wanglanmei-ref/evidence/p1-real/(e2e-evidence.json pass=true + 5 截图肉眼复核)

诚实 caveat:门② brightHits 在结算屏混入亮 UI,同屏合并由 warmHits(美术落引擎画布)+
call-ID(粒子真调引擎)+ 引擎架构(粒子渲同一 mainContext)三证成立,非阻断。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 18:32:50 +00:00

7 lines
1.7 KiB
JSON

{"seq":0,"anchor":"t_boot","tMono":0,"buildSha":"","pluginSet":["audio-music","collision","gamefeel","palette-post","particles-juice","physics-lite","runtime-probe","save-progress"],"prevHash":"428bfee0","hash":"aaca40e4","extra":{"by":"ref-host","stage":"pre-init","engineMode":"real"},"warning":null}
{"seq":1,"anchor":"t_plugins_ready","tMono":0,"buildSha":"","pluginSet":["audio-music","collision","gamefeel","palette-post","particles-juice","physics-lite","runtime-probe","save-progress"],"prevHash":"aaca40e4","hash":"71ff4c61","extra":{"initialized":7,"ok":true},"warning":null}
{"seq":2,"anchor":"t_game_init","tMono":0,"buildSha":"","pluginSet":["audio-music","collision","gamefeel","palette-post","particles-juice","physics-lite","runtime-probe","save-progress"],"prevHash":"71ff4c61","hash":"3c4297be","extra":{"assetsLoaded":13,"assetsTotal":13,"loopProofOk":true},"warning":null}
{"seq":3,"anchor":"t_first_paint","tMono":0,"buildSha":"","pluginSet":["audio-music","collision","gamefeel","palette-post","particles-juice","physics-lite","runtime-probe","save-progress"],"prevHash":"3c4297be","hash":"9f2c7a57","extra":{"frame":1},"warning":null}
{"seq":4,"anchor":"t_input_bound","tMono":16.667,"buildSha":"","pluginSet":["audio-music","collision","gamefeel","palette-post","particles-juice","physics-lite","runtime-probe","save-progress"],"prevHash":"9f2c7a57","hash":"321fb8ee","extra":{"stage":"registered","type":"pointerdown"},"warning":null}
{"seq":5,"anchor":"t_game_start","tMono":16.667,"buildSha":"","pluginSet":["audio-music","collision","gamefeel","palette-post","particles-juice","physics-lite","runtime-probe","save-progress"],"prevHash":"321fb8ee","hash":"470c61d2","extra":{"mode":"play","engineMode":"real"},"warning":null}