Skip to content

feat(3d): ship threed_basic v1 milestone - #57

Open
wh000wh000 wants to merge 39 commits into
leigest519:mainfrom
wh000wh000:feat/threed-basic-v1-milestone
Open

feat(3d): ship threed_basic v1 milestone#57
wh000wh000 wants to merge 39 commits into
leigest519:mainfrom
wh000wh000:feat/threed-basic-v1-milestone

Conversation

@wh000wh000

Copy link
Copy Markdown

结论

封装 threed_basic v1:在不修改 Phaser 2D 路线的前提下,补齐 3D 分类、three.js 模板、品类模块、GDD/资产协议和生成期验收合同。

本 PR 从 origin/main@c54307e 干净汇聚,只包含 3D 相关提交;不夹带 fork main 上的 PixelForge 对接、文本清理或本地错题记录。

能力矩阵

能力 v1 状态 证据
3D 分类 PASS three.js 迷宫漫游threed_basic;2D 横版/俯视仍分别为 platformer/top_down
3D 工程骨架 PASS three.js 0.179.1 + TypeScript + Vite;DOM Title/HUD/Pause/Complete/Over
3D 品类层 PASS camera-relative 键鼠输入、手写圆碰撞、SceneMap、灯光/雾效默认值
玩法规划 PASS GDD 强制 cue→action→decision→state→feedback→repeat、胜负/恢复、三段升级与最终代码对账
图像资产 PASS 复用 generate_game_assets;贴图/天空盒/ billboard;1024² 与路径 manifest 纪律
可玩验收 PASS WebGL/非黑、ESC、正常输入胜负/恢复/重开、配置消费与最终真值合同
物理/3D 模型/触屏 OUT v1 明确不做,未引入依赖或死扩展路径

clean 毕业局

结果
POST fe5f5b79e862e336 / lunar-beacon-keeper-v1-clean-v
classify / GDD 原生各一次成功;未人工重跑
核心循环 信标驻圈点亮、限时续燃、月晶路线取舍、雾潮伤害与安全区恢复
三段升级 Beat 2 01:00、Beat 3 02:00 实际进入;压力间隔 45→33.75→22.5s
独立试玩 WIN 00:37、idle LOSE 00:51、伤血 98→65 后恢复 100、胜负重开 PASS
媒体纪律 5 PNG + 5 audio,独立文件 + manifest 相对路径;正式 Base64/Data URL = 0
机器行 g44v-lunar-beacon-keeper-3d-v1-milestonegraduation_valid=true

验收

结果
root build / typecheck / lint PASS
root test:ci CLI 3117 pass / 8 skip;core 3172 pass / 2 skip;SDK 198 pass;scripts 8 pass
core3d build PASS
collision/runtime selfchecks PASS
core3d official smoke WebGL、非黑屏、console/page/request/lifecycle error 0、ESC PASS
clean V build、3D contract、strict config、asset-pack、official smoke、三类普通输入试玩、v2-accept PASS
2D 回归 fox-grove-platformerneon-flotillav2-accept 均 PASS(既有 WARN 保持)
MCP / protocol 6 tools selftest PASS;protocol=6 registered=6 consistent=True
diff hygiene git diff --check PASS;40 files,+4295/-24;2D Phaser 文件 0 diff

前端对接清单

合同 / 当前状态
建局 POST /v1/games,body {prompt, slug?},202 后保存 id
状态 GET /v1/games/{id};只按 status + exit + error 判终态,不以 final_text 冒充完成
进度 REST events?after_id=N&limit=M;或 WS events/live?after_id=N,游标使用 DB event id
用量 GET /v1/games/{id}/usage,分 agent/MCP/media/wall-clock
文件 GET /v1/games/{id}/filesraw=1 仅文本,不是游戏静态托管
试玩 当前没有正式 preview URL/静态产物端点;前端合并前需由控制面明确提供 dist 托管或受控 preview proxy
P1 风险 WS terminalStatus 当前未包含 timeout,超时局不会发送 end;进入前端联调前必须在控制面修复
开发边界 WS CheckOrigin=true 仅适合本机开发;部署前随鉴权/CORS 收紧

冻结层 DA(相对 origin/main@c54307e

分组 文件
classifier packages/core/src/tools/game-type-classifier.ts + test
GDD producer packages/core/src/tools/generate-gdd.ts + test
image normalization packages/core/src/tools/generate-assets.ts + test
core3d agent-test/templates/core3d/**
threed_basic agent-test/templates/modules/threed_basic/**agent-test/docs/modules/threed_basic/**
shared docs agent-test/docs/asset_protocol.mdagent-test/docs/debug_protocol.md

完整文件级清单由本 PR 的 40-file diff 提供。没有修改 Go 控制面、workspace/engine/store、MCP 挂载、2D Phaser 模板。

HACK-IT 提醒

模板不内置某一种玩法的示例短句;分类器测试提供 3D/2D 最小句例,GDD 规则提供通用机制合同。这样避免把“信标/收集/某个测试局”固化成默认答案。

后续边界

本 PR 只关闭 v1。物理、3D 模型、触屏和 v2 玩法扩展不在此 PR;应在 v1 合并与前端 P1 接缝修复后另开版本。

蝉息 added 30 commits August 6, 2026 17:13
Add the frozen classifier/GDD contract for a minimal three.js archetype while preserving every existing Phaser route. Includes regression fixtures for explicit 3D, 2D platformer, and 2D top-down prompts.
Provide the core3d skeleton, threed_basic gameplay layer, pinned npm lockfile, and builder-facing manuals. The template keeps DOM lifecycle screens and the three-key ESC fallback while limiting assets to the existing image pipeline.
Keep the player on authored floor patches and outside explicit static obstacle circles without introducing a physics dependency. Substepped resolution prevents high-delta tunnelling and the self-check covers road, obstacle, and slide behavior.
Teach the builder to preserve the pure XZ resolver, explicit collision radii, and v1 no-physics boundary so generated games consume the new capability instead of bypassing it.
The three.js renderer sizes from its container and never consumes the inherited 2D reference dimensions. Removing the unused leaves gives both standalone core3d and threed_basic a zero-dead-config baseline.
Generated v1.1 code duplicated fog, pickup, and count values. Make the builder keep one canonical path per runtime value, remove superseded aliases, and record the leaf-to-consumer map in GDD completion notes.
The universal GDD reminder contradicted threed_basic zero-dead-config rules by forbidding deletion of inherited fields. Keep the Phaser reminder unchanged while requiring consumed, single-source leaves for 3D.
A generated v1.3 game shipped teleport and time mutation hooks solely to make verification easy. Freeze the existing probe surface and require completion evidence through real browser input so acceptance measures gameplay instead of a debug backdoor.
A real v1.4 game showed repeated Escape events can toggle pause multiple times and end screens can resume gameplay. Ignore keyboard repeats and lock the runtime after completion or failure.
Real-browser review found the core3d shell requests an undeclared favicon. Ship a tiny standalone SVG and reference it relatively, keeping binary data out of editable HTML.
The star-lamp maze GDD weakened an explicit sequential objective into unordered collection to match the scaffold. Add a threed_basic-only fidelity rule so private GameScene state may implement the requested mechanic without widening the public API or changing Phaser prompts.
Document that ordered objectives remain ordered and should use minimal private GameScene state instead of being reinterpreted as the scaffold's unordered pickup loop.
Prevent generated acceptance criteria from strengthening declared win conditions or relying on instrumented artifacts, so production evidence reflects the shipped game.
Keep real media out of generated source and session context, and require complete playthrough evidence from the final uninstrumented artifact.
Prevent generation sessions from reading screenshots as Base64; automated checks use smoke and visible DOM while human review opens the reported file path.
Align W movement with the three.js camera forward vector and make in-page restart dispose input listeners plus scene-owned GPU resources. The source-level self-check locks both contracts without adding runtime test hooks.
Phase 6 changes must correct stale values and consumers in the GDD body instead of leaving contradictory appendices. Document the restart resource-ownership contract exposed by the template fix.
The core shell still used the opposite Z sign for the camera-right vector. Lock both components in the runtime contract self-check so yawed movement cannot regress independently.
v1.9 production still named runtime state and texture behavior that did not exist. Require unstable implementation details to be copied from the final consumer or removed, so the GDD cannot invent a plausible second truth.
Some providers ignore the requested image size and returned 1254x1254 files for a 1024x1024 contract. Normalize backgrounds, sprites, and animation frames immediately before writing so asset-pack paths always point at the requested canvas without exposing inline media.
Generated games replaced correct camera movement and disposal despite the scaffold already providing both. Make those shell sections immutable in v1 and keep media references path-only, with the existing runtime self-check pinning the manual contract.
Generated completion notes blamed a dispose defect on a frozen template whose protected block was already correct. Require path, SHA-256, and diff evidence so production feedback cannot promote a self-authored transient edit into a pipeline defect.
Generated GDDs can claim reconciliation while retaining stale tuning aliases or spawn yaw values. Require direct final source/config and SceneMap comparison before completion.
The pre-commit formatter changed an unrelated table while committing the source-truth rule. Restore the untouched lines so the final review diff stays scoped.
Generated GDDs retained stale renderConfig instructions and claimed a camera-far consumer that did not exist. Require final values and a named runtime leaf so production reviews can reject those false claims.
Mathematical overlap let generated routes pass while leaving player-radius corridors and finish triggers on collision boundaries. Define measurable clearance and target-center rules, and pin final config descriptions to their real consumers.
The 3D GDD producer hard-coded a single-route collectible plan, so generated games could only reskin movement and pickup. Require verbs, pressure, feedback, escalation, win/lose states, and runtime consumers while leaving Phaser guidance untouched.
The module manual defined threed_basic as collect-everything on one route, which prevented the builder from planning distinct play. Define the minimal core-loop contract and allow only semantic SceneMap arrays and path-referenced image keys with real consumers.
A mandatory lose state would contradict peaceful game requests. Keep the gameplay contract strict while allowing an explicitly declared no-fail tension and progression response.
Repeated generated games mislabeled camera far as config-backed and proved only one side of a claimed route choice. Put those checks in the shared GDD producer so later games must ground camera ownership and branch coverage in final code.
蝉息 added 9 commits August 6, 2026 17:13
The first non-collection game claimed a committed fast/safe choice while only exercising one route. Require intended and forbidden adjacency checks plus final play coverage for every branch.
A prose-only core loop can combine individually plausible timings and resource values into an unwinnable game. Require winning and losing traces with derived deadlines, state deltas, and authored-event closure before a 3D design is called playable.
Make the builder derive route timing and state deltas from final authored data, then reconcile event totals and terminal states after tuning. This keeps build and smoke from standing in for actual playability.
Prevent inferred or substitute play traces from being reported as exact-strategy acceptance evidence. Preserve the existing no-op behavior for 2D archetypes.
Keep feasibility evidence honest across arbitrary 3D mechanics by separating derived traces from exact observed playthroughs and carrying state through escalation thresholds.
Generated 3D games can make SceneMap array lengths and config count leaves co-own the same value while using the config only in an equality assertion. State the single-truth rule at GDD production so counts remain authored data unless gameplay consumes a separate threshold.
Create the DOM HUD before GameScene emits its constructor-time progress event. This prevents generated games from overwriting a real initial total with the UIScene default and locks the ordering with the existing runtime contract self-check.
Make the ordering guard mutation-honest by requiring both UIScene.show and GameScene construction to exist in the expected order; deleting either anchor can no longer pass through indexOf(-1).
Disable hidden reasoning for the dedicated GDD request so a reasoning model cannot consume the entire response budget and return empty content. Keep a 32K document ceiling and pin the accepted creative temperature; cover the emitted request contract with a focused test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant