Skip to content

fix(templates): enforce consumed 3D config - #49

Closed
wh000wh000 wants to merge 9 commits into
leigest519:mainfrom
wh000wh000:feat/threed-v1-2-config-contract
Closed

fix(templates): enforce consumed 3D config#49
wh000wh000 wants to merge 9 commits into
leigest519:mainfrom
wh000wh000:feat/threed-v1-2-config-contract

Conversation

@wh000wh000

Copy link
Copy Markdown

结论

threed_basic v1.2 removes dead 3D configuration and makes the builder contract require every emitted config leaf to have a runtime consumer. A real POST-produced game verifies the versioned template path end to end.

Production evidence

Sample Purpose Result
three-js-prism-causeway-3d-v1-2-slug-pri (3a179ad6fa430dc3) First v1.2 production run Build, WebGL/non-black smoke, ESC, 6/6 keyboard autopilot, and v2-accept passed; exposed protocol split-brain
three-js-crystal-switchback-3d-v1-2-5-sc (8a7e3739cc6d0e80) Run after protocol root-cause fix Build, smoke, ESC, 5/5 keyboard completion, and v2-accept passed; CollisionResolver.ts and InputController.ts are byte-identical to this branch's templates

Root cause and change

The production classifier/GDD used a versioned worktree, while scaffold and Phase 5 still referenced the canonical OpenGame checkout. That allowed a generated game to consume stale templates and rewrite CollisionResolver.

This PR keeps the frozen-layer change small:

  • removes unconsumed screenSize leaves from both 3D config fragments;
  • documents the existing config-consumer invariant in the three threed_basic builder manuals;
  • specializes generate_gdd guidance for 3D while preserving the prior Phaser reminder verbatim;
  • adds one focused test for 3D guidance and the unchanged Phaser path.

The protocol-side root-cause fix is in non-Git /Users/admin/Desktop/opengame-kimi/agent/opengame.md: scaffold paths now honor GAME_TEMPLATES_DIR/GAME_DOCS_DIR, Phase 3 reads the workspace asset protocol, and Phase 4 requires zero dead 3D config. It cannot be represented honestly in this repository's Git diff.

Verification

Gate Result
npm run build --workspace=packages/core PASS
npm test --workspace=packages/core PASS: 151 files, 3166 passed, 2 skipped
Targeted generate-gdd tests PASS: 3/3
make check in opengame-kimi PASS: 6/6 protocol tools consistent
opengame-kimi MCP selftest PASS
core3d build + WebGL/non-black/console-zero smoke PASS
merged core3d + threed_basic build/self-check PASS
config consumer audit PASS: 0 dead keys in core3d and threed_basic
Crystal production game PASS: build, smoke, ESC resume, 5/5 completion, v2-accept
Phaser neon-flotilla regression PASS with explicit Enter: WebGL/non-black, console zero, ESC pause/resume

Frozen-layer delta

Path Change
agent-test/templates/core3d/src/gameConfig.json Remove dead screenSize object
agent-test/templates/modules/threed_basic/src/gameConfig.json Remove dead screenSize overrides
agent-test/docs/modules/threed_basic/{design_rules,template_api,threed_basic}.md Require config leaves to map to runtime consumers
packages/core/src/tools/generate-gdd.ts 3D-specific merge reminder; Phaser behavior retained
packages/core/src/tools/generate-gdd.test.ts Minimal regression check

Risk and rollback

Risk is limited to builder guidance and deletion of proven-unused 3D config. Phaser output is covered by an explicit regression test and real smoke. Roll back the three Conventional Commits independently in reverse order if needed.

Upstream dependency: this iteration builds on the 3D v1/v1.1 series tracked in upstream PRs #47 and #48.

蝉息 and others added 9 commits August 4, 2026 17:17
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.
feat(3d): add threed_basic v1 production path
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.
feat(templates): add threed_basic manual collision
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.
@wh000wh000

Copy link
Copy Markdown
Author

Superseded by #57, which rebases the complete threed_basic v1 milestone onto current origin/main and excludes unrelated fork-only changes.

@wh000wh000 wh000wh000 closed this Aug 6, 2026
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