@craft_eco/craft-mcp 0.1.25 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -10
- package/bin/craft-mcp.mjs +10 -8
- package/dist-server/game-workflow/bundle-files.mjs +43 -0
- package/dist-server/game-workflow/engines.mjs +13 -6
- package/dist-server/game-workflow/project-bundles.mjs +90 -0
- package/dist-server/game-workflow/project-context.mjs +91 -0
- package/dist-server/game-workflow/projects.mjs +16 -4
- package/dist-server/game-workflow/publication-materials.mjs +18 -20
- package/dist-server/game-workflow/publications.mjs +15 -17
- package/dist-server/game-workflow/publish-capture.mjs +21 -57
- package/dist-server/integrations/config.mjs +71 -0
- package/dist-server/integrations/files.mjs +54 -0
- package/dist-server/integrations/hosts.mjs +30 -0
- package/dist-server/integrations/install.mjs +86 -0
- package/dist-server/integrations/runtime.mjs +71 -0
- package/dist-server/mcp/publication-page.mjs +18 -50
- package/dist-server/mcp/publish-panel.mjs +28 -35
- package/dist-server/mcp/server.mjs +17 -14
- package/dist-server/preview/preview-launcher.mjs +9 -2
- package/dist-server/preview/preview-start.mjs +2 -2
- package/dist-server/upstream/publication-transport.mjs +19 -19
- package/package.json +10 -2
- package/resources/craft-create/SKILL.md +14 -0
- package/resources/craft-game-maker/SKILL.md +77 -71
- package/resources/craft-game-maker/js.md +10 -10
- package/resources/craft-game-maker/js3d.md +13 -13
- package/resources/game_visual_qa.mjs +1149 -1149
- package/resources/js/bundle.json +93 -0
- package/resources/js/context/AGENTS.md +15 -102
- package/resources/js/context/knowledge/AigcWiring.md +5 -196
- package/resources/js/context/knowledge/AssetUrl.md +5 -20
- package/resources/js/context/knowledge/Layout.md +7 -0
- package/resources/js/context/knowledge/Lifecycle.md +6 -27
- package/resources/js/context/skills/aigc-generate/SKILL.md +6 -141
- package/resources/js/context/skills/asset-search/SKILL.md +5 -62
- package/resources/js/context/skills/asset-search/references/resource-config.md +9 -0
- package/resources/js/context/skills/export-config/SKILL.md +7 -19
- package/resources/js/context/skills/export-config/scripts/export-config.mjs +3 -45
- package/resources/js/context/skills/index.json +30 -0
- package/resources/js/context/skills/visual-qa/SKILL.md +6 -28
- package/resources/js/project/README.md +4 -96
- package/resources/js/project/package.json +1 -2
- package/resources/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/js/{context/skills/export-config/scripts → project/scripts/config-export}/sync-asset-controls.mjs +1 -37
- package/resources/js/project/scripts/config-export.mjs +10 -34
- package/resources/js3d/bundle.json +104 -0
- package/resources/js3d/context/AGENTS.md +16 -85
- package/resources/js3d/context/knowledge/AigcWiring.md +9 -0
- package/resources/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/js3d/context/knowledge/CodingGuide/Pitfalls.md +9 -67
- package/resources/js3d/context/knowledge/Layout.md +7 -0
- package/resources/js3d/context/knowledge/Runtime.md +5 -30
- package/resources/js3d/context/skills/aigc-integration/SKILL.md +6 -164
- package/resources/js3d/context/skills/asset-search/SKILL.md +5 -171
- package/resources/js3d/context/skills/asset-search/references/resource-config.md +6 -94
- package/resources/js3d/context/skills/asset-usage-audit/SKILL.md +6 -82
- package/resources/js3d/context/skills/export-config/SKILL.md +7 -11
- package/resources/js3d/context/skills/export-config/scripts/export-config.mjs +3 -55
- package/resources/js3d/context/skills/index.json +42 -0
- package/resources/js3d/context/skills/performance-audit/SKILL.md +8 -153
- package/resources/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/js3d/project/README.md +4 -103
- package/resources/js3d/project/package.json +1 -2
- package/resources/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/sync-scene-assets.mjs +3 -28
- package/resources/js3d/project/scripts/config-export.mjs +12 -34
- package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts +8 -0
- package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/build-failure.js +39 -0
- package/vendor/agent-cli/dist/src/artifacts/build-failure.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts +5 -0
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js +45 -0
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js +2 -1
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts +2 -0
- package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/prepare.js +7 -2
- package/vendor/agent-cli/dist/src/artifacts/prepare.js.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts +2 -0
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js +27 -16
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts +14 -0
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js +119 -0
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/static.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/static.js +20 -6
- package/vendor/agent-cli/dist/src/artifacts/static.js.map +1 -1
- package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/cli/process-protocol.js +24 -2
- package/vendor/agent-cli/dist/src/cli/process-protocol.js.map +1 -1
- package/vendor/agent-cli/dist/src/cli/process-steering.d.ts +21 -0
- package/vendor/agent-cli/dist/src/cli/process-steering.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/process-steering.js +66 -0
- package/vendor/agent-cli/dist/src/cli/process-steering.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.js +1 -1
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.js.map +1 -1
- package/vendor/agent-cli/dist/src/index.d.ts +4 -1
- package/vendor/agent-cli/dist/src/index.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/index.js +3 -0
- package/vendor/agent-cli/dist/src/index.js.map +1 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts +29 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js +18 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/client.d.ts +10 -0
- package/vendor/agent-cli/dist/src/session/client.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/client.js +15 -5
- package/vendor/agent-cli/dist/src/session/client.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/link-session.d.ts +3 -0
- package/vendor/agent-cli/dist/src/session/link-session.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/link-session.js +14 -1
- package/vendor/agent-cli/dist/src/session/link-session.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/process-observability.d.ts +3 -0
- package/vendor/agent-cli/dist/src/session/process-observability.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/process-observability.js +11 -0
- package/vendor/agent-cli/dist/src/session/process-observability.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/process-request.d.ts +3 -2
- package/vendor/agent-cli/dist/src/session/process-request.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/process-request.js +27 -9
- package/vendor/agent-cli/dist/src/session/process-request.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/run-start-body.d.ts +1 -0
- package/vendor/agent-cli/dist/src/session/run-start-body.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/run-start-body.js +8 -3
- package/vendor/agent-cli/dist/src/session/run-start-body.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/run-steer.d.ts +42 -0
- package/vendor/agent-cli/dist/src/session/run-steer.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-steer.js +205 -0
- package/vendor/agent-cli/dist/src/session/run-steer.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/types.d.ts +6 -0
- package/vendor/agent-cli/dist/src/shared/types.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts +21 -0
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.js +102 -0
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/context-program.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/tools/context-program.js +3 -0
- package/vendor/agent-cli/dist/src/tools/context-program.js.map +1 -1
- package/resources/js/context/.role/AGENTS_DESIGN.md +0 -9
- package/resources/js/context/agents/aigc-asset.md +0 -168
- package/resources/js/context/knowledge/AigcEnabled.md +0 -49
- package/resources/js/context/knowledge/FrontendComponents.md +0 -17
- package/resources/js/context/knowledge/MobileAdaptation.md +0 -73
- package/resources/js/context/knowledge/MobileAdapted.md +0 -36
- package/resources/js/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +0 -114
- package/resources/js/context/knowledge/Multiplayer/OverviewKnowledge.md +0 -115
- package/resources/js/context/knowledge/Multiplayer/StateSyncKnowledge.md +0 -392
- package/resources/js/context/knowledge/PlatformServices.md +0 -190
- package/resources/js/context/knowledge/ProjectDisplayConfig.md +0 -35
- package/resources/js/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +0 -242
- package/resources/js/context/knowledge/Ui.md +0 -11
- package/resources/js/context/knowledge/UiEditorCompat.md +0 -21
- package/resources/js/context/rules/MultiplayerCapability.md +0 -23
- package/resources/js/context/rules/MultiplayerRoomEntryUX.md +0 -63
- package/resources/js/context/rules/PlatformBoundaryModules.md +0 -44
- package/resources/js/context/rules/preview_ready.md +0 -8
- package/resources/js/context/skills/aigc-generate/knowledge/audio.md +0 -39
- package/resources/js/context/skills/aigc-generate/knowledge/batch-replace.md +0 -26
- package/resources/js/context/skills/aigc-generate/knowledge/character2d.md +0 -132
- package/resources/js/context/skills/aigc-generate/knowledge/non-stepwise-aigc.md +0 -53
- package/resources/js/context/skills/aigc-generate/knowledge/texture-prop.md +0 -52
- package/resources/js/context/skills/aigc-generate/knowledge/texture-scene.md +0 -191
- package/resources/js/context/skills/aigc-generate/knowledge/texture-ui.md +0 -55
- package/resources/js/context/skills/asset-search/scripts/asset_display.mjs +0 -62
- package/resources/js/context/skills/asset-search/scripts/config.json +0 -5
- package/resources/js/context/skills/asset-search/scripts/provided_assets.mjs +0 -125
- package/resources/js/context/skills/asset-search/scripts/search.mjs +0 -760
- package/resources/js/context/skills/asset-search/scripts/sprite_source_materializer.mjs +0 -657
- package/resources/js/context/skills/asset-search/strategies/anim2d.md +0 -42
- package/resources/js/context/skills/asset-search/strategies/audio.md +0 -34
- package/resources/js/context/skills/asset-search/strategies/effect2d.md +0 -31
- package/resources/js/context/skills/asset-search/strategies/texture-prop.md +0 -22
- package/resources/js/context/skills/asset-search/strategies/ui-common.md +0 -40
- package/resources/js/context/skills/asset-search/strategies/ui-style.md +0 -28
- package/resources/js/context/skills/export-config/scripts/translate-asset-titles.mjs +0 -161
- package/resources/js/context/skills/lightgame-runtime-adapt/SKILL.md +0 -93
- package/resources/js/context/skills/lightgame-runtime-adapt/project/game-runtime.json +0 -7
- package/resources/js/context/skills/lightgame-runtime-adapt/project/package.json +0 -22
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +0 -5
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +0 -208
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +0 -37
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +0 -227
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +0 -31
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +0 -272
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform.d.mts +0 -79
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform.mjs +0 -29
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/release.json +0 -22
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/cli.mjs +0 -16
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/project.d.mts +0 -4
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/project.mjs +0 -50
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +0 -3
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/vite.mjs +0 -72
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/assets.d.mts +0 -24
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/assets.mjs +0 -2
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/astc.d.mts +0 -10
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/astc.mjs +0 -1
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/config-export.mjs +0 -37
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/refresh-runtime.mjs +0 -50
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/cli.mjs +0 -20
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/config.d.mts +0 -19
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/config.mjs +0 -1
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/installed.json +0 -6
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/project.d.mts +0 -6
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/project.mjs +0 -77
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/vite.d.mts +0 -2
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/vite.mjs +0 -34
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/ui-stage.ts +0 -156
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/viewport.ts +0 -249
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/main.ts +0 -87
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/platform.ts +0 -2
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/screenUi.ts +0 -185
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/style.css +0 -294
- package/resources/js/context/skills/lightgame-runtime-adapt/project/tsconfig.json +0 -20
- package/resources/js/context/skills/lightgame-runtime-adapt/project/vite.config.ts +0 -5
- package/resources/js/context/skills/lightgame-runtime-adapt/scripts/install-template.mjs +0 -159
- package/resources/js/context/skills/mobile-adaptation/SKILL.md +0 -277
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +0 -50
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +0 -862
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +0 -92
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-primitives.ts +0 -254
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +0 -245
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +0 -135
- package/resources/js/context/skills/mobile-adaptation/references/input-config.md +0 -342
- package/resources/js/context/skills/mobile-adaptation/references/verification.md +0 -140
- package/resources/js/context/skills/mobile-adaptation/references/web-audio.md +0 -11
- package/resources/js/context/skills/mobile-compat-qa/SKILL.md +0 -53
- package/resources/js/context/skills/mobile-compat-qa/references/startup-diagnosis.md +0 -23
- package/resources/js/context/skills/mobile-compat-qa/references/web-lifecycle.md +0 -20
- package/resources/js/context/skills/mobile-compat-qa/references/web-performance.md +0 -19
- package/resources/js/context/skills/optimization-suggestions/SKILL.md +0 -89
- package/resources/js/context/skills/platform-services/SKILL.md +0 -101
- package/resources/js/context/skills/platform-services/assets/modules/MultiplayerManager.ts +0 -465
- package/resources/js/context/skills/platform-services/assets/modules/eventBus.ts +0 -57
- package/resources/js/context/skills/platform-services/assets/modules/identity/qq-ai-game-sdk.min.js +0 -5
- package/resources/js/context/skills/platform-services/assets/modules/identity/qq-session.mjs +0 -208
- package/resources/js/context/skills/platform-services/assets/modules/identity/shared.mjs +0 -37
- package/resources/js/context/skills/platform-services/assets/modules/leaderboard.d.mts +0 -39
- package/resources/js/context/skills/platform-services/assets/modules/leaderboard.mjs +0 -1
- package/resources/js/context/skills/platform-services/assets/modules/log.ts +0 -35
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/clockSync.ts +0 -61
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/dsClient.ts +0 -52
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/payloadCodec.ts +0 -30
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/roomHttp.ts +0 -89
- package/resources/js/context/skills/platform-services/assets/modules/multiplayer/types.ts +0 -47
- package/resources/js/context/skills/platform-services/assets/modules/platform-service.d.mts +0 -31
- package/resources/js/context/skills/platform-services/assets/modules/platform-service.mjs +0 -272
- package/resources/js/context/skills/platform-services/assets/modules/save.d.mts +0 -49
- package/resources/js/context/skills/platform-services/assets/modules/save.mjs +0 -1
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/main.mjs +0 -7
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +0 -264
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +0 -39
- package/resources/js/context/skills/platform-services/references/SERVER_GUIDE.md +0 -139
- package/resources/js/context/skills/platform-services/references/api_reference.md +0 -18
- package/resources/js/context/skills/platform-services/references/leaderboard_playbook.md +0 -96
- package/resources/js/context/skills/platform-services/scripts/install.mjs +0 -148
- package/resources/js/context/skills/resolution-adaptation/SKILL.md +0 -47
- package/resources/js/context/skills/resolution-adaptation/assets/display/ui-stage.ts +0 -156
- package/resources/js/context/skills/resolution-adaptation/assets/display/viewport.ts +0 -249
- package/resources/js/context/skills/resolution-adaptation/assets/example/main.ts +0 -98
- package/resources/js/context/skills/resolution-adaptation/assets/example/ui-tokens.css +0 -200
- package/resources/js/context/skills/resolution-adaptation/references/audit.md +0 -31
- package/resources/js/context/skills/resolution-adaptation/references/device-safe-area.md +0 -40
- package/resources/js/context/skills/resolution-adaptation/references/game-ui-occlusion.md +0 -18
- package/resources/js/context/skills/resolution-adaptation/references/layout-rules.md +0 -15
- package/resources/js/context/skills/resolution-adaptation/references/troubleshooting.md +0 -34
- package/resources/js/context/skills/resolution-adaptation/references/viewport-api.md +0 -38
- package/resources/js/context/skills/resolution-adaptation/references/world-resize.md +0 -55
- package/resources/js/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +0 -448
- package/resources/js/context/skills/scene-editor-compat/SKILL.md +0 -94
- package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.assets.json +0 -13
- package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.scene-editor.json +0 -6
- package/resources/js/context/skills/scene-editor-compat/assets/example/src/game/sceneAdapter.ts +0 -25
- package/resources/js/context/skills/scene-editor-compat/assets/example/src/scenes/main.scene.json +0 -18
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/release.json +0 -7
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.d.mts +0 -42
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.mjs +0 -144
- package/resources/js/context/skills/scene-editor-compat/docs/contract.md +0 -330
- package/resources/js/context/skills/scene-editor-compat/docs/resource-sync.md +0 -64
- package/resources/js/context/skills/scene-editor-compat/docs/runtime-state.md +0 -28
- package/resources/js/context/skills/scene-editor-compat/docs/terrain-contract.md +0 -47
- package/resources/js/context/skills/scene-editor-compat/docs/visual-contract.md +0 -64
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.assets.json +0 -38
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.scene-editor.json +0 -9
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneAdapter.ts +0 -59
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneBlockers.ts +0 -30
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneFileAssets.ts +0 -66
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/Main.Scene.ts +0 -20
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/SceneTypes.ts +0 -26
- package/resources/js/context/skills/scene-editor-compat/references/contract.md +0 -73
- package/resources/js/context/skills/scene-editor-compat/scripts/apply_scene_marker.py +0 -162
- package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_contract.py +0 -853
- package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_resource_urls.py +0 -173
- package/resources/js/context/skills/scene-editor-compat/scripts/scene-editor.mjs +0 -427
- package/resources/js/context/skills/scene-editor-compat/version.json +0 -1
- package/resources/js/context/skills/ui-editor-compat/SKILL.md +0 -48
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +0 -35
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +0 -74
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/hud.css +0 -60
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +0 -45
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +0 -265
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/release.json +0 -7
- package/resources/js/context/skills/ui-editor-compat/references/contract.md +0 -132
- package/resources/js/context/skills/ui-editor-compat/scripts/editor-contract.mjs +0 -327
- package/resources/js/context/skills/ui-editor-compat/scripts/project-files.mjs +0 -80
- package/resources/js/context/skills/ui-editor-compat/scripts/ui-editor.mjs +0 -84
- package/resources/js/context/skills/version-update/SKILL.md +0 -192
- package/resources/js/context/skills/version-update/scripts/check_runtime_refs.mjs +0 -129
- package/resources/js/context/skills/version-update/scripts/feature_snapshot.mjs +0 -159
- package/resources/js/context/skills/version-update/scripts/update_feature_version.mjs +0 -157
- package/resources/js/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
- package/resources/js/context/version/version.json +0 -1
- package/resources/js/project/SPEC/assist/.gitkeep +0 -0
- package/resources/js/project/SPEC/guide/.gitkeep +0 -0
- package/resources/js/project/SPEC/plan/.gitkeep +0 -0
- package/resources/js/project/SPEC/readme.md +0 -6
- package/resources/js/project/SPEC/res/.gitkeep +0 -0
- package/resources/js/project/SPEC/task-item/.gitkeep +0 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/config.d.mts +0 -19
- package/resources/js/project/runtime/lightgame/1.0.0/platform/config.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +0 -39
- package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +0 -227
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +0 -25
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.d.mts +0 -79
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.mjs +0 -29
- package/resources/js/project/runtime/lightgame/1.0.0/platform/save.d.mts +0 -49
- package/resources/js/project/runtime/lightgame/1.0.0/platform/save.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/release.json +0 -37
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/cli.mjs +0 -2
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.d.mts +0 -8
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.mjs +0 -2
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +0 -3
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.mjs +0 -8
- package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.d.mts +0 -24
- package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.mjs +0 -2
- package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.d.mts +0 -10
- package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.d.mts +0 -20
- package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +0 -21
- package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/input.d.mts +0 -17
- package/resources/js/project/runtime/lightgame/1.0.0/tools/input.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/three.d.mts +0 -40
- package/resources/js/project/runtime/lightgame/1.0.0/tools/three.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.d.mts +0 -10
- package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.mjs +0 -1
- package/resources/js/project/runtime/lightgame/1.0.0/tools/video.d.mts +0 -8
- package/resources/js/project/runtime/lightgame/1.0.0/tools/video.mjs +0 -1
- package/resources/js/project/scripts/refresh-runtime.mjs +0 -50
- package/resources/js/project/vendor/core-manager-js/package.json +0 -33
- package/resources/js/project/vendor/core-manager-js/src/.versions.json +0 -42
- package/resources/js/project/vendor/core-manager-js/src/CoreManagerPlugin.ts +0 -41
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AssetRef.ts +0 -93
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcFirstImageFile.ts +0 -203
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcTextureLoader.ts +0 -106
- package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.test.ts +0 -25
- package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.ts +0 -21
- package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.test.ts +0 -65
- package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.ts +0 -340
- package/resources/js/project/vendor/core-manager-js/src/configManager/FeatureConfig.ts +0 -87
- package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.d.mts +0 -92
- package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.mjs +0 -271
- package/resources/js/project/vendor/core-manager-js/src/index.ts +0 -31
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputConfig.ts +0 -81
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.test.ts +0 -43
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.ts +0 -32
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.test.ts +0 -141
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.ts +0 -20
- package/resources/js/project/vendor/core-manager-js/src/inputManager/KeyboardProvider.ts +0 -183
- package/resources/js/project/vendor/core-manager-js/src/inputManager/TouchProvider.ts +0 -304
- package/resources/js/project/vendor/core-manager-js/src/inputManager/VirtualJoystick.ts +0 -351
- package/resources/js/project/vendor/core-manager-js/src/inputManager/_internal/InputManagerImpl.ts +0 -180
- package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64 +0 -13
- package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64.d.ts +0 -14
- package/resources/js/project/vendor/core-manager-js/src/inputManager/input_config.example.json +0 -68
- package/resources/js/project/vendor/core-manager-js/src/logManager/DebugConsole.ts +0 -433
- package/resources/js/project/vendor/core-manager-js/src/logManager/LogCapture.ts +0 -118
- package/resources/js/project/vendor/core-manager-js/src/logManager/LogManager.ts +0 -444
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCapture.ts +0 -485
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.test.ts +0 -66
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.ts +0 -149
- package/resources/js/project/vendor/core-manager-js/src/logManager/icons.b64 +0 -9
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/AssetUrlResolver.ts +0 -29
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.test.ts +0 -88
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.ts +0 -122
- package/resources/js/project/vendor/core-manager-js/src/runtime.ts +0 -24
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterEntity.ts +0 -318
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.test.ts +0 -151
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.ts +0 -235
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.test.ts +0 -98
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.ts +0 -94
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectEntity.ts +0 -209
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.test.ts +0 -106
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.ts +0 -341
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.test.ts +0 -68
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.ts +0 -236
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.test.ts +0 -22
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.ts +0 -29
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteEntity.test.ts +0 -197
- package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiContracts.ts +0 -9
- package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiKit.ts +0 -555
- package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.test.ts +0 -112
- package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.ts +0 -178
- package/resources/js/project/vendor/core-manager-js/src/uiManager/ui-base.css +0 -246
- package/resources/js/project/vendor/core-manager-js/src/videoManager/VideoManager.ts +0 -139
- package/resources/js/project/vendor/core-manager-js/tsconfig.json +0 -15
- package/resources/js/project/vendor/run.sh +0 -4
- package/resources/js/project/version/craft_feature_version.json +0 -42
- package/resources/js/project/version/project_feature_version.json +0 -11
- package/resources/js3d/context/.role/AGENTS_DESIGN.md +0 -9
- package/resources/js3d/context/knowledge/3D/PoseInterpolationKnowledge.md +0 -75
- package/resources/js3d/context/knowledge/CodingGuide/SceneEditableGuide.md +0 -42
- package/resources/js3d/context/knowledge/FrontendComponents.md +0 -19
- package/resources/js3d/context/knowledge/MobileAdaptation.md +0 -73
- package/resources/js3d/context/knowledge/MobileAdapted.md +0 -36
- package/resources/js3d/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +0 -114
- package/resources/js3d/context/knowledge/Multiplayer/OverviewKnowledge.md +0 -117
- package/resources/js3d/context/knowledge/Multiplayer/StateSyncKnowledge.md +0 -430
- package/resources/js3d/context/knowledge/PlatformServices.md +0 -190
- package/resources/js3d/context/knowledge/ProjectDisplayConfig.md +0 -35
- package/resources/js3d/context/knowledge/SceneEditorCompat.md +0 -35
- package/resources/js3d/context/knowledge/StepByStep.md +0 -21
- package/resources/js3d/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +0 -242
- package/resources/js3d/context/knowledge/UiEditorCompat.md +0 -21
- package/resources/js3d/context/rules/MultiplayerCapability.md +0 -27
- package/resources/js3d/context/rules/MultiplayerRoomEntryUX.md +0 -63
- package/resources/js3d/context/rules/PlatformBoundaryModules.md +0 -44
- package/resources/js3d/context/rules/preview_ready.md +0 -8
- package/resources/js3d/context/skills/aigc-integration/assets/sprite-sheet-player.mjs +0 -70
- package/resources/js3d/context/skills/aigc-integration/callback.md +0 -77
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/README.md +0 -23
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/audio-aigc-knowledge.md +0 -38
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/character2d-aigc-knowledge.md +0 -72
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/staticmesh-aigc-knowledge.md +0 -33
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-prop-aigc-knowledge.md +0 -36
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-scene-aigc-knowledge.md +0 -37
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-ui-aigc-knowledge.md +0 -35
- package/resources/js3d/context/skills/asset-search/references/sprite-sheets.md +0 -58
- package/resources/js3d/context/skills/asset-search/scripts/asset_display.mjs +0 -62
- package/resources/js3d/context/skills/asset-search/scripts/config.json +0 -235
- package/resources/js3d/context/skills/asset-search/scripts/manifest_pipeline.mjs +0 -905
- package/resources/js3d/context/skills/asset-search/scripts/preflight.mjs +0 -79
- package/resources/js3d/context/skills/asset-search/scripts/provided_assets.mjs +0 -74
- package/resources/js3d/context/skills/asset-search/scripts/search.mjs +0 -637
- package/resources/js3d/context/skills/asset-search/scripts/sprite_source_materializer.mjs +0 -667
- package/resources/js3d/context/skills/asset-search/strategies/anim2d.md +0 -42
- package/resources/js3d/context/skills/asset-search/strategies/effect2d.md +0 -31
- package/resources/js3d/context/skills/asset-usage-audit/references/case-tidewater-zoo.md +0 -89
- package/resources/js3d/context/skills/asset-usage-audit/references/optimization-playbook.md +0 -143
- package/resources/js3d/context/skills/asset-usage-audit/references/usage-model.md +0 -90
- package/resources/js3d/context/skills/export-config/scripts/translate-asset-titles.mjs +0 -161
- package/resources/js3d/context/skills/game-art-style/SKILL.md +0 -60
- package/resources/js3d/context/skills/game-art-style/assets/previews/cartoon.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/comic.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/cozy.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/cyber.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/horror.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/lowpoly.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/paper.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/voxel.png +0 -0
- package/resources/js3d/context/skills/game-art-style/references/art-parameters-lite.md +0 -38
- package/resources/js3d/context/skills/game-art-style/references/construction.md +0 -111
- package/resources/js3d/context/skills/game-art-style/references/materials-textures.md +0 -105
- package/resources/js3d/context/skills/game-art-style/references/sources.md +0 -25
- package/resources/js3d/context/skills/game-art-style/references/styles/cartoon.md +0 -175
- package/resources/js3d/context/skills/game-art-style/references/styles/comic.md +0 -168
- package/resources/js3d/context/skills/game-art-style/references/styles/cozy.md +0 -191
- package/resources/js3d/context/skills/game-art-style/references/styles/cyber.md +0 -165
- package/resources/js3d/context/skills/game-art-style/references/styles/horror.md +0 -173
- package/resources/js3d/context/skills/game-art-style/references/styles/lowpoly.md +0 -185
- package/resources/js3d/context/skills/game-art-style/references/styles/paper.md +0 -181
- package/resources/js3d/context/skills/game-art-style/references/styles/voxel.md +0 -189
- package/resources/js3d/context/skills/game-art-style/references/user-style-document.md +0 -88
- package/resources/js3d/context/skills/mobile-adaptation/SKILL.md +0 -301
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +0 -104
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +0 -933
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +0 -92
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-primitives.ts +0 -254
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +0 -245
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +0 -257
- package/resources/js3d/context/skills/mobile-adaptation/references/input-config.md +0 -342
- package/resources/js3d/context/skills/mobile-adaptation/references/verification.md +0 -140
- package/resources/js3d/context/skills/mobile-adaptation/references/web-audio.md +0 -11
- package/resources/js3d/context/skills/mobile-compat-qa/SKILL.md +0 -53
- package/resources/js3d/context/skills/mobile-compat-qa/references/startup-diagnosis.md +0 -23
- package/resources/js3d/context/skills/mobile-compat-qa/references/web-form-input.md +0 -10
- package/resources/js3d/context/skills/mobile-compat-qa/references/web-lifecycle.md +0 -20
- package/resources/js3d/context/skills/mobile-compat-qa/references/web-performance.md +0 -19
- package/resources/js3d/context/skills/optimization-suggestions/SKILL.md +0 -74
- package/resources/js3d/context/skills/performance-audit/references/case-notes.md +0 -93
- package/resources/js3d/context/skills/performance-audit/references/rules.md +0 -183
- package/resources/js3d/context/skills/platform-services/SKILL.md +0 -101
- package/resources/js3d/context/skills/platform-services/assets/modules/MultiplayerManager.ts +0 -465
- package/resources/js3d/context/skills/platform-services/assets/modules/eventBus.ts +0 -57
- package/resources/js3d/context/skills/platform-services/assets/modules/identity/qq-ai-game-sdk.min.js +0 -5
- package/resources/js3d/context/skills/platform-services/assets/modules/identity/qq-session.mjs +0 -208
- package/resources/js3d/context/skills/platform-services/assets/modules/identity/shared.mjs +0 -37
- package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.d.mts +0 -39
- package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.mjs +0 -1
- package/resources/js3d/context/skills/platform-services/assets/modules/log.ts +0 -35
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/clockSync.ts +0 -61
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/dsClient.ts +0 -52
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/payloadCodec.ts +0 -30
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/roomHttp.ts +0 -89
- package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/types.ts +0 -47
- package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.d.mts +0 -31
- package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.mjs +0 -272
- package/resources/js3d/context/skills/platform-services/assets/modules/save.d.mts +0 -49
- package/resources/js3d/context/skills/platform-services/assets/modules/save.mjs +0 -1
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/main.mjs +0 -7
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +0 -264
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +0 -39
- package/resources/js3d/context/skills/platform-services/references/SERVER_GUIDE.md +0 -139
- package/resources/js3d/context/skills/platform-services/references/api_reference.md +0 -18
- package/resources/js3d/context/skills/platform-services/references/leaderboard_playbook.md +0 -96
- package/resources/js3d/context/skills/platform-services/scripts/install.mjs +0 -148
- package/resources/js3d/context/skills/resolution-adaptation/SKILL.md +0 -46
- package/resources/js3d/context/skills/resolution-adaptation/assets/display/ui-stage.ts +0 -156
- package/resources/js3d/context/skills/resolution-adaptation/assets/display/viewport.ts +0 -239
- package/resources/js3d/context/skills/resolution-adaptation/assets/example/main.ts +0 -129
- package/resources/js3d/context/skills/resolution-adaptation/assets/example/ui-tokens.css +0 -188
- package/resources/js3d/context/skills/resolution-adaptation/references/audit.md +0 -31
- package/resources/js3d/context/skills/resolution-adaptation/references/device-safe-area.md +0 -40
- package/resources/js3d/context/skills/resolution-adaptation/references/game-ui-occlusion.md +0 -18
- package/resources/js3d/context/skills/resolution-adaptation/references/layout-rules.md +0 -15
- package/resources/js3d/context/skills/resolution-adaptation/references/troubleshooting.md +0 -34
- package/resources/js3d/context/skills/resolution-adaptation/references/viewport-api.md +0 -38
- package/resources/js3d/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +0 -448
- package/resources/js3d/context/skills/scene-editor-compat/SKILL.md +0 -599
- package/resources/js3d/context/skills/scene-editor-compat/references/bundle-contract.md +0 -141
- package/resources/js3d/context/skills/scene-editor-compat/references/editor-integration.md +0 -92
- package/resources/js3d/context/skills/scene-editor-compat/references/scene-data-format.md +0 -125
- package/resources/js3d/context/skills/scene-editor-compat/references/slots-rules.md +0 -113
- package/resources/js3d/context/skills/scene-editor-compat/scripts/scene-editor.mjs +0 -1187
- package/resources/js3d/context/skills/threejs-game-quality/SKILL.md +0 -53
- package/resources/js3d/context/skills/threejs-game-quality/agents/openai.yaml +0 -4
- package/resources/js3d/context/skills/threejs-game-quality/references/01-build.md +0 -94
- package/resources/js3d/context/skills/threejs-game-quality/references/02-avoid.md +0 -50
- package/resources/js3d/context/skills/threejs-game-quality/references/03-detect.md +0 -105
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-by-genre.md +0 -147
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-distance.md +0 -79
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-sources.md +0 -56
- package/resources/js3d/context/skills/threejs-game-quality/references/character-motion-face.md +0 -51
- package/resources/js3d/context/skills/threejs-game-quality/references/parameter-contract.md +0 -55
- package/resources/js3d/context/skills/threejs-game-quality/references/refine-existing.md +0 -78
- package/resources/js3d/context/skills/threejs-game-quality/references/rendering-stability.md +0 -84
- package/resources/js3d/context/skills/threejs-game-quality/references/runtime-tools.md +0 -120
- package/resources/js3d/context/skills/threejs-game-quality/scripts/package.json +0 -4
- package/resources/js3d/context/skills/threejs-game-quality/scripts/runtime-audit.js +0 -238
- package/resources/js3d/context/skills/ui-editor-compat/SKILL.md +0 -59
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +0 -35
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +0 -61
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/hud.css +0 -60
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +0 -45
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +0 -265
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/release.json +0 -7
- package/resources/js3d/context/skills/ui-editor-compat/references/contract.md +0 -110
- package/resources/js3d/context/skills/ui-editor-compat/scripts/editor-contract.mjs +0 -327
- package/resources/js3d/context/skills/ui-editor-compat/scripts/project-files.mjs +0 -80
- package/resources/js3d/context/skills/ui-editor-compat/scripts/ui-editor.mjs +0 -84
- package/resources/js3d/context/skills/version-update/SKILL.md +0 -191
- package/resources/js3d/context/skills/version-update/scripts/check_runtime_refs.mjs +0 -129
- package/resources/js3d/context/skills/version-update/scripts/feature_snapshot.mjs +0 -159
- package/resources/js3d/context/skills/version-update/scripts/update_feature_version.mjs +0 -157
- package/resources/js3d/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
- package/resources/js3d/context/version/version.json +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.d.mts +0 -19
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +0 -39
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +0 -227
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +0 -25
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.d.mts +0 -79
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.mjs +0 -30
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.d.mts +0 -49
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/release.json +0 -39
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/cli.mjs +0 -2
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.d.mts +0 -8
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.mjs +0 -2
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +0 -3
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.mjs +0 -7
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.d.mts +0 -24
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.mjs +0 -2
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.d.mts +0 -10
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.d.mts +0 -20
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +0 -21
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.d.mts +0 -26
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.mjs +0 -351
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.d.mts +0 -17
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.d.mts +0 -40
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.d.mts +0 -10
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.mjs +0 -1
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.d.mts +0 -8
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.mjs +0 -1
- package/resources/js3d/project/scripts/refresh-runtime.mjs +0 -50
- package/resources/js3d/project/vendor/core-manager-three/package.json +0 -12
- package/resources/js3d/project/vendor/core-manager-three/src/index.ts +0 -2
- package/resources/js3d/project/vendor/run.sh +0 -4
- package/resources/js3d/project/version/craft_feature_version.json +0 -42
- package/resources/js3d/project/version/project_feature_version.json +0 -11
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.d.ts +0 -7
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.js +0 -145
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.js.map +0 -1
- /package/resources/js/{context/skills/export-config/scripts → project/scripts/config-export}/assert-asset-wiring.mjs +0 -0
- /package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/assert-asset-wiring.mjs +0 -0
- /package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/sync-asset-controls.mjs +0 -0
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# 项目显示配置
|
|
2
|
-
|
|
3
|
-
项目根 `${CRAFT_PROJECT_DIR}/game.config.json` 保存设计偏好,供外部容器优先加载与显示。`designResolution` 表达首选展示宽高,`orientation` 表达首选朝向。项目通过自动适配落实布局与取景,运行时尺寸与朝向以容器实测为准。
|
|
4
|
-
|
|
5
|
-
## 格式与推荐档位
|
|
6
|
-
|
|
7
|
-
写标准 JSON:`designResolution.width`、`designResolution.height` 为正整数;宽大于等于高时 `orientation` 为 `landscape`,否则为 `portrait`。示例数值须替换为当前选定值:
|
|
8
|
-
|
|
9
|
-
```json
|
|
10
|
-
{
|
|
11
|
-
"designResolution": { "width": 1920, "height": 1080 },
|
|
12
|
-
"orientation": "landscape"
|
|
13
|
-
}
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
已有明确宽高时使用原值;需要按设备与朝向推断时,从下表选择,无依据默认 `1920×1080`。
|
|
17
|
-
|
|
18
|
-
| 设备 | 首选宽高 |
|
|
19
|
-
|---|---|
|
|
20
|
-
| PC | `1920×1080` |
|
|
21
|
-
| 手机横屏 | `2400×1080` |
|
|
22
|
-
| 手机竖屏 | `1080×2400` |
|
|
23
|
-
| 平板 | `1440×1080` |
|
|
24
|
-
|
|
25
|
-
## 读取、补建与维护
|
|
26
|
-
|
|
27
|
-
开始实现或迭代前读取配置:已有有效配置沿用;用户明确改变显示偏好时,更新相应宽高与朝向。临时预览尺寸或窗口变化不作为偏好依据,也不回写配置。
|
|
28
|
-
|
|
29
|
-
文件缺失时自动补建,按以下优先级取值:
|
|
30
|
-
|
|
31
|
-
1. 本项目最新明确的用户显示偏好。
|
|
32
|
-
2. 旧显示配置中的显式设计宽高,如项目根 `projectDisplayInfo.json`。
|
|
33
|
-
3. 需求文档中的目标设备与朝向,按上表选择。
|
|
34
|
-
|
|
35
|
-
补建仅写该文件,保留旧显示配置、入口、依赖与适配接线,不触发旧项目迁移。
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
# MultiplayerManager 知识(platform-services 的 multiplayer 模块)
|
|
2
|
-
|
|
3
|
-
> **TL;DR**:联网玩法能力单例。大厅走平台 Room HTTP(`create` / `list` / `join` / `leave` / `describe`),DS 只经网关 `ds-proxy` 用 `@colyseus/sdk` 连;对业务只暴露 `createRoom` / `joinRoom` / `leaveRoom` / `sendPose` / `sendEvent` / `onEvent`。**由 `platform-services` 只安装 `multiplayer` 模块**到 `src/skill-modules/platform-services/`(带上身份文件,不装排行榜、不装云存档)。不要从 `runtime/lightgame/1.0.0` 引入,也不要再复制到 `src/subsystem/multiplayerManager/`。日志与事件总线是同目录的 `log.ts` / `eventBus.ts`。跨玩法通用:实时对战 / 棋牌 / 派对 / 合作生存共用一份。业务代码只调本单例,禁止越层直接 `import { Client } from '@colyseus/sdk'`,也禁止自己拼 `/api/room/*` 请求。
|
|
4
|
-
>
|
|
5
|
-
> 房间内的服端逻辑不在本模板里,写在项目 `ds/`(见 `${CRAFT_CONTEXT_DIR}/skills/platform-services/references/SERVER_GUIDE.md`)。平台边界先读 `${CRAFT_CONTEXT_DIR}/knowledge/Multiplayer/OverviewKnowledge.md`;状态 owner、通道与权威判断见 `${CRAFT_CONTEXT_DIR}/knowledge/Multiplayer/StateSyncKnowledge.md`;业务 System 与 Scene 生命周期见 `${CRAFT_CONTEXT_DIR}/knowledge/Multiplayer/GameplaySystemKnowledge.md`。
|
|
6
|
-
|
|
7
|
-
## ⚠️ 关键约束(写玩法 System 前必读)
|
|
8
|
-
|
|
9
|
-
1. **`onStateField` / `onEvent` / `bus.on('mp-*')` MUST 出现在 `createRoom` / `joinRoom` 之前**。连接在这两个方法内部完成、进房瞬间同步已有玩家与 state;晚绑定错过首次回调。
|
|
10
|
-
2. **由 `onStateField` 订阅托管的字段只由回调写**。DS 是权威 owner,state 根字段在连接时携带当前值,禁止在 `enter()` / 生命周期钩子里对这类字段做默认赋值(会覆盖订阅刚拿到的真实值);本地生命周期只重置 UI 缓存、计时器等纯本地态。
|
|
11
|
-
|
|
12
|
-
## 涉及文件
|
|
13
|
-
|
|
14
|
-
- 模块源:`context/skills/platform-services/assets/modules/` 的 `MultiplayerManager.ts`、`log.ts`、`eventBus.ts` 和内部实现目录 `multiplayer/`(Room HTTP、连 DS、时钟标定、编解码、类型),与身份文件同一 `multiplayer` 组
|
|
15
|
-
- 落地后:上述文件与身份文件(`platform-service.mjs`、`identity/` 等)都在 `src/skill-modules/platform-services/`。玩法需要的监听直接加在 `MultiplayerManager.ts` 的 `_attachRoom()`(见下「`onStateField` 订阅跨连接保留」「player 级只转发 `data`」两条)。重装会覆盖为当前版本,改过的文件备份为同目录 `.previous`,重装后按项目实际代码合入再删备份,见 `platform-services` 的「修改与重装」
|
|
16
|
-
- 平台底座:同目录 `./platform-service.mjs` 的 `PlatformServiceManager`,`api` 也从它的 `getApi()` 读。不要改回 `runtime/lightgame/1.0.0`
|
|
17
|
-
- 日志 / 事件总线:同目录 `log.ts`(`Log.scope(tag)`)和 `eventBus.ts`(`bus`)。业务 `import { bus }` 订阅,不要改安装文件去换自己的总线
|
|
18
|
-
- SDK:`@colyseus/sdk@0.17.43`(版本不可改)
|
|
19
|
-
- 落地方式:`node "${CRAFT_CONTEXT_DIR}/skills/platform-services/scripts/install.mjs" --project "${CRAFT_PROJECT_DIR}" --modules multiplayer`。只装联机和身份,不装 `leaderboard` / `save`。`src/subsystem/multiplayerManager/` 旧副本按 `${CRAFT_CONTEXT_DIR}/rules/PlatformBoundaryModules.md` 处理
|
|
20
|
-
- 服端配套:项目 `ds/`(`main.mjs` + `rooms/`),由安装 `multiplayer` 写入骨架:工程没有 `ds/` 时写一份,已有不覆盖。服务端约束见 `${CRAFT_CONTEXT_DIR}/skills/platform-services/references/SERVER_GUIDE.md`
|
|
21
|
-
|
|
22
|
-
## 启动接入
|
|
23
|
-
|
|
24
|
-
`1.1.0` 的 `src/platform.ts` 只转出预览桥,不挂身份。联机只装 `multiplayer`(安装器会带上身份文件,不会带上排行榜或云存档)。不要从 `runtime/lightgame/1.0.0/platform/platform-service.mjs` import。在游戏入口、`connectPreview` / `preview.markReady()` 之前调用一次 `void PlatformServiceManager.init()`,再调用 `MultiplayerManager.init`。漏掉身份 `init()` 时,点建房约 5 秒后报「联机服务暂时不可用」。`init()` 幂等。仍在用 `1.0.0` 身份或 `src/subsystem/multiplayerManager/` 旧副本的工程,按 `${CRAFT_CONTEXT_DIR}/rules/PlatformBoundaryModules.md` 处理,不要两套混用。
|
|
25
|
-
|
|
26
|
-
```ts
|
|
27
|
-
import { MultiplayerManager } from './skill-modules/platform-services/MultiplayerManager';
|
|
28
|
-
import { PlatformServiceManager } from './skill-modules/platform-services/platform-service.mjs';
|
|
29
|
-
|
|
30
|
-
void PlatformServiceManager.init();
|
|
31
|
-
MultiplayerManager.init({
|
|
32
|
-
roomName: 'sync', // 须与 ds/main.mjs 的 rooms key 一致
|
|
33
|
-
maxPlayers: 8, // 必须与 ds/ maxClients、玩法人数三者相同
|
|
34
|
-
});
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
`MultiplayerManager.init` 幂等、同步、不建连接,只记开房参数。**不需要也不接受 `endpoint`**:网关地址由模板从 `PlatformServiceManager.getApi()` 推导(见「关键行为」)。无平台上下文时所有大厅方法返 `NO_PLATFORM`,业务不 crash。
|
|
38
|
-
|
|
39
|
-
## 类型签名
|
|
40
|
-
|
|
41
|
-
```ts
|
|
42
|
-
export type MpState = 'idle' | 'connecting' | 'in-room' | 'left' | 'error';
|
|
43
|
-
|
|
44
|
-
export interface MpInitConfig {
|
|
45
|
-
roomName?: string; // 进程内房间名(= ds/main.mjs 的 rooms key),**不是** room_id;默认 'sync'
|
|
46
|
-
maxPlayers?: number; // 必须与 maxClients、玩法人数相同;默认 8
|
|
47
|
-
title?: string; // 开房标题,留空由平台填 'Room'。**固定模板自动生成**(如 `${getPlayerName()}的房间`),禁止玩家输入,见 rules/MultiplayerRoomEntryUX.md
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface RoomBrief {
|
|
51
|
-
roomId: string;
|
|
52
|
-
title: string;
|
|
53
|
-
playerCount: number;
|
|
54
|
-
maxPlayers: number;
|
|
55
|
-
status: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface MpResult<T = undefined> {
|
|
59
|
-
ok: boolean;
|
|
60
|
-
code: string; // 'OK' 或见下方结果码表
|
|
61
|
-
message: string;
|
|
62
|
-
data?: T;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface MpEnterOptions {
|
|
66
|
-
keepSeat?: boolean; // 默认 false:CONNECT_FAILED 时模板 leaveRoom
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface MultiplayerManagerApi {
|
|
70
|
-
init(config?: MpInitConfig): void;
|
|
71
|
-
|
|
72
|
-
getState(): MpState;
|
|
73
|
-
getRoomId(): string;
|
|
74
|
-
getLastRoomId(): string; // 断线后 getRoomId() 已空,重连用这个或 mp-disconnect 的 roomId
|
|
75
|
-
getSessionId(): string; // 本机同步实体的唯一 key
|
|
76
|
-
getPeers(): string[]; // 远端 sessionId 列表(不含自己)
|
|
77
|
-
isConnected(): boolean;
|
|
78
|
-
|
|
79
|
-
getServerNow(): number; // 标定后的「当前服务端时钟」估计 = Date.now() + offset(做快照纠偏时算 age 用)
|
|
80
|
-
getClockOffset(): number; // 本机时钟与 DS 时钟的偏移(ms);未标定时为 0
|
|
81
|
-
|
|
82
|
-
listRooms(): Promise<MpResult<RoomBrief[]>>;
|
|
83
|
-
createRoom(options?: MpEnterOptions): Promise<MpResult<{ roomId: string }>>;
|
|
84
|
-
joinRoom(roomId: string, options?: MpEnterOptions): Promise<MpResult<{ roomId: string }>>;
|
|
85
|
-
describeRoom(roomId: string): Promise<MpResult<RoomBrief>>;
|
|
86
|
-
leaveRoom(): Promise<void>;
|
|
87
|
-
|
|
88
|
-
sendPose(pose: unknown): MpResult; // 持续态 → state.set
|
|
89
|
-
sendEvent(type: string, data?: unknown): MpResult; // 一次性事件 → pub
|
|
90
|
-
onEvent(handler: (from: string, type: string, data: Record<string, unknown>) => void): () => void;
|
|
91
|
-
|
|
92
|
-
/** 监听 state 根字段;字段名由 ds/ 的 Schema 决定。可在连接前注册。 */
|
|
93
|
-
onStateField(field: string, handler: (value: any, previous: any) => void): () => void;
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## bus 事件表
|
|
98
|
-
|
|
99
|
-
| 事件名 | 参数 | 触发时机 |
|
|
100
|
-
|---|---|---|
|
|
101
|
-
| `mp-state-change` | `(next, prev)` | `MpState` 变化 |
|
|
102
|
-
| `mp-peer-join` | `(sessionId)` | state.players 新增远端玩家(不含自己)。**连上 DS 的瞬间会对已在房的每个玩家各补发一次**,所以订阅必须早于 `createRoom` / `joinRoom`,否则后进房的人看不到先到的人 |
|
|
103
|
-
| `mp-peer-leave` | `(sessionId)` | state.players 移除远端玩家 |
|
|
104
|
-
| `mp-peer-pose` | `(sessionId, pose)` | 远端玩家 `data` 字段变化,已解成对象 |
|
|
105
|
-
| `mp-state-field` | `(field, value, previous)` | state 根字段变化(需先 `onStateField` 订阅该字段) |
|
|
106
|
-
| `mp-event` | `(from, type, data)` | 收到 `evt`;`from === ''` 表示这条来自 DS 自己而不是某个客户端 |
|
|
107
|
-
| `mp-room-closed` | `(reason)` | DS 声明本局结束(空房 / 结算)。**不要重连** |
|
|
108
|
-
| `mp-disconnect` | `(code, roomId)` | 网络异常断开(code 1009 = 单包超 4KB)。带 `roomId` 供重 `join`;主动 `leaveRoom()` **不会**触发 |
|
|
109
|
-
| `mp-error` | `(code, message)` | Colyseus `onError` |
|
|
110
|
-
|
|
111
|
-
**监听清理**:Scene / System 生命周期结束时 `bus.off(name, handler)` 显式解绑;`onEvent` 返回的 off 函数要另外调。
|
|
112
|
-
|
|
113
|
-
**订阅生命周期比 Scene 长(务必读完这段)**:`mp-*` 是玩法 System 在进房时绑的,而主内容 Scene `create()` 起始处若调 `bus.removeAllListeners()` 做状态清场,会把它们一并清掉,System 自己感知不到。大厅 → 房间 → 对局每切一次场景就断一次,之后对手加入、准备、行动全部收不到,**且不报任何错**。所以联网玩法 System 必须提供幂等重绑入口,并由每个清空 bus 的 Scene 在 `create()` 里紧接着调用一次。完整职责与时序见 `${CRAFT_CONTEXT_DIR}/knowledge/Multiplayer/GameplaySystemKnowledge.md`。
|
|
114
|
-
|
|
115
|
-
## 用法示例
|
|
116
|
-
|
|
117
|
-
**大厅进出(只许这一套,不要另写状态机)**
|
|
118
|
-
|
|
119
|
-
```ts
|
|
120
|
-
async function refreshLobby() {
|
|
121
|
-
const list = await MultiplayerManager.listRooms();
|
|
122
|
-
if (!list.ok) {
|
|
123
|
-
if (list.code === 'NO_PLATFORM') hideOnline();
|
|
124
|
-
else setHint(list.message);
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
setHint('');
|
|
128
|
-
renderAllRooms(list.data ?? []); // 满员也画,标「已满」、不可加入
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
async function enter(kind: 'create' | 'join', roomId?: string) {
|
|
132
|
-
const res = kind === 'create'
|
|
133
|
-
? await MultiplayerManager.createRoom()
|
|
134
|
-
: await MultiplayerManager.joinRoom(roomId!);
|
|
135
|
-
if (res.ok) showBattle();
|
|
136
|
-
else if (res.code === 'ROOM_FULL' || res.code === 'NOT_FOUND') void refreshLobby();
|
|
137
|
-
else setHint(res.message); // CONNECT_FAILED 时模板已 leaveRoom
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
bus.on('mp-disconnect', (_code, roomId) => {
|
|
141
|
-
const id = roomId || MultiplayerManager.getLastRoomId();
|
|
142
|
-
if (!id) return backToLobby();
|
|
143
|
-
void MultiplayerManager.joinRoom(id).then((r) => { if (!r.ok) backToLobby(); });
|
|
144
|
-
});
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
`listRooms()` 只是一次快照,**没有推送**。大厅 Scene/System 必须在停留期间定时再调(建议 2~3 秒),离开大厅停表;接线细节见 `${CRAFT_CONTEXT_DIR}/knowledge/Multiplayer/GameplaySystemKnowledge.md`。
|
|
148
|
-
|
|
149
|
-
`createRoom` / `joinRoom` 内部已经把「占座 + 连 DS」一起做完,返回 `ok` 即可直接收发。DS 连不上时默认 `leaveRoom()`,不要业务自己再占座。
|
|
150
|
-
|
|
151
|
-
**同步:上报自身 + 收远端**
|
|
152
|
-
|
|
153
|
-
```ts
|
|
154
|
-
// 上报本机数据;上限 20Hz,不要放进每帧 update
|
|
155
|
-
MultiplayerManager.sendPose({ x: Math.round(x), y: Math.round(y), a: alive ? 1 : 0 });
|
|
156
|
-
|
|
157
|
-
bus.on('mp-peer-pose', (sid: string, pose: any) => {
|
|
158
|
-
this._peers.set(sid, { x: Number(pose?.x) || 0, y: Number(pose?.y) || 0 });
|
|
159
|
-
});
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
**订阅 state 根字段**(字段名由 `ds/rooms/*Schema.mjs` 决定)
|
|
163
|
-
|
|
164
|
-
```ts
|
|
165
|
-
// 可在 enter() 之前注册;连上或重连后自动重绑,字段已有值时立即回调一次
|
|
166
|
-
const offPhase = MultiplayerManager.onStateField('phase', (value: string) => {
|
|
167
|
-
// 按玩法处理
|
|
168
|
-
});
|
|
169
|
-
// System.leave() 里 offPhase()
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
**一次性事件:发送与接收**
|
|
173
|
-
|
|
174
|
-
```ts
|
|
175
|
-
MultiplayerManager.sendEvent('take_item', { itemId });
|
|
176
|
-
|
|
177
|
-
const off = MultiplayerManager.onEvent((from, type, data) => {
|
|
178
|
-
// from === '' 表示这条来自 DS;否则是某个客户端(自己发的回声已过滤)
|
|
179
|
-
});
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
## 关键行为
|
|
183
|
-
|
|
184
|
-
- **`api` 从身份单例的 `getApi()` 读**:连 DS 必须拿 api 的 host 原文拼 `wss://…/api/ds-proxy/{port}`,`request()`(POST 拿响应体、path 被正则限死)顶不了,所以身份单例提供 `getApi()`。Craft 宿主(`runtime-init`)和 QQ 轻游(URL 上的 `api` / `app_id` / `qq_test` + 换票)的 api 都由单例统一给出,模板不再自己监听 `runtime-init`,业务代码也不要监听。token / app_id / player_id / 身份 / `request` 同样一律从 `src/skill-modules/platform-services/platform-service.mjs` 读。
|
|
185
|
-
- **大厅接口会先等平台握手结算**:`PlatformServiceManager` 在 `pending` 期间 `getAppId()` 恒为空,模板会等 `state-change`(上限 6s)再判定。所以大厅 Scene 在 `create()` 里直接 `listRooms()` 是安全的,不会因为首屏快于 `runtime-init` 就误报"当前环境不支持联机"。
|
|
186
|
-
- **DS 连接只走网关**:endpoint 由 `api` 推导为 `wss://{host}{prefix}/api/ds-proxy/{connect.port}`,`host` 参数在 `urlBuilder` 里每次补——Colyseus 会丢掉 endpoint 上的 query,写在 URL 里无效。
|
|
187
|
-
- **连接自带重试**:DS 可能刚被拉起还没 listen,最多 10 次、退避 500–1000ms。全失败返 `CONNECT_FAILED`。
|
|
188
|
-
- **`leaveRoom` 顺序固定**:先断 Colyseus 再 HTTP `leave`。反了会让大厅座位残留。HTTP `leave` 不杀 DS,空房由 `ds/` 自己 `end('empty')` 回收。
|
|
189
|
-
- **`joinRoom` 幂等**:同一账号重复 join 同一房返回同一座位,所以断线重连就是拿 `mp-disconnect` 带回的 `roomId` 重 `join`(三种断开路径见 `${CRAFT_CONTEXT_DIR}/knowledge/Multiplayer/StateSyncKnowledge.md`)。
|
|
190
|
-
- **主动退出不误报断线**:`leaveRoom()` 内部先解绑再断连,不会发 `mp-disconnect`;否则监听里写自动重连会变成死循环。
|
|
191
|
-
- **连 DS 失败默认释放座位**:`CONNECT_FAILED` 表示 HTTP 已占座、WS 没连上。模板默认 `leaveRoom()`。需要占着座重试时传 `{ keepSeat: true }`,再用 `getLastRoomId()` / `joinRoom`。
|
|
192
|
-
- **单包 4KB 在发送前拦**:`sendPose` / `sendEvent` 超限直接丢弃 + `warn` + 返 `PAYLOAD_TOO_LARGE`,因为发出去会被断连(code 1009)。按字节算(`TextEncoder`),中文一字 3 字节。**超限的正确解法是砍精度或砍字段,不是拆包**。
|
|
193
|
-
- **`onStateField` 订阅跨连接保留**:可在 `enter()` 之前注册,连上、重连后自动重绑;字段已有值时立即回调一次,所以后进房的人不需要 DS 补发这类数据。⚠️ **这仅对标量根字段(string/number/boolean)成立**——`onStateField` 底层是 `$(room.state).listen(field)`,对 **MapSchema / ArraySchema 容器**只在引用被整体替换时触发,**收不到条目增删与嵌套字段变化**;容器型根字段要么在 `src/skill-modules/platform-services/MultiplayerManager.ts` 的 `_attachRoom()` 里、紧挨 `players.onAdd` 补 `$(room.state).seats.onAdd/onRemove`(条目字段再 `$(seat).listen(...)`),用 `bus.emit` 自定义的 `mp-` 事件交给业务(`_attachRoom()` 连上、重连都会执行,不用另外重绑),要么就别用容器、改用标量 JSON 字符串(见 `${CRAFT_CONTEXT_DIR}/skills/platform-services/references/SERVER_GUIDE.md`「三条路怎么选」)。**不要推定「seats 这种容器也不用补发」**——那会像本次故障一样只能自己发明一套绕路方案。
|
|
194
|
-
- **player 级只转发 `data`**:模板监听的是 `players[sid].data` 这一个字段。若玩法要在 player 上建真 schema 字段(血量单独增量等),在 `MultiplayerManager.ts` 的 `_attachRoom()` 里、`players.onAdd` 回调中紧挨 `$(player).listen('data', ...)` 补 `$(player).listen('<字段>', ...)`,用 `bus.emit` 自定义的 `mp-` 事件交给业务。
|
|
195
|
-
- **`sessionId` 才是实体 key**:不要用 `player_id`——同账号双开是两个 session。
|
|
196
|
-
- **回声已过滤**:自己 `pub` 的事件回来时被跳过(`from === 自己`);`from === ''` 的是 DS 自己发的。
|
|
197
|
-
- **`sendEvent` / `sendPose` 在线上只有两个消息名**:分别是 `pub` 和 `state.set`,`type` 是 `pub` 的载荷字段而不是 Colyseus 消息名。DS 侧必须 `onMessage('pub')` 收再按 `payload.type` 分流;写 `onMessage('ready')` 之类永远收不到,且两端都不报错。**`payload.data` 是 JSON 字符串(模板发送前已 `JSON.stringify`),要取业务字段必须先 `JSON.parse(payload.data || "{}")`;直读 `payload.<字段>` 恒为 `undefined`,经 `Number()` 变 `NaN` 后被校验分支静默丢弃。**
|
|
198
|
-
- **自己的 `data` 不回推给自己**:`mp-peer-pose` 只发远端。本机的准备态 / 血量要在玩法 System 里自己存一份给 UI 读,别等 DS 绕回来。
|
|
199
|
-
- **永不 throw**:所有对外方法要么返 `{ ok, code, message }`,要么静默丢弃 + `Log.warn`(模板自带 `log.ts`);业务层无需 try/catch。
|
|
200
|
-
|
|
201
|
-
## 结果码
|
|
202
|
-
|
|
203
|
-
| 码 | 来源 | 说明 |
|
|
204
|
-
|---|---|---|
|
|
205
|
-
| `OK` | — | 成功 |
|
|
206
|
-
| `NO_PLATFORM` | 本地 | 无平台身份。按 `message` 分两种:`当前环境不支持联机` = 确认没有平台(独立预览,或 5s 内没收到 `runtime-init` 已转 `noop`);`平台连接未就绪,请稍后重试` = 握手尚未结算就调了大厅接口(模板已先等最多 6s,正常极少见) |
|
|
207
|
-
| `INVALID_ARGUMENT` | 本地 / 平台 | 参数缺失或非法(如缺 `?config=version_id`、`roomId` 为空) |
|
|
208
|
-
| `PAYLOAD_TOO_LARGE` | 本地 | 单包超 4KB,已丢弃未发送 |
|
|
209
|
-
| `NOT_IN_ROOM` | 本地 | 未连接 DS 时调 `sendPose` / `sendEvent` |
|
|
210
|
-
| `CONNECT_FAILED` | 本地 | 占座成功但 DS 连接重试耗尽;默认已 leaveRoom |
|
|
211
|
-
| `NOT_FOUND` | 平台 | 房间不存在或已关闭 |
|
|
212
|
-
| `ROOM_FULL` | 平台 | 满员 |
|
|
213
|
-
| `DS_ALLOC_FAILED` | 平台 | DS 资源不足,提示稍后重试 |
|
|
214
|
-
| `AUTH_FAILED` | 平台 | 票据失效,需重新握手 |
|
|
215
|
-
| `INTERNAL_ERROR` | 平台 / 本地 | 平台内部错误,或返回体缺 `room_id` / `connect` |
|
|
216
|
-
|
|
217
|
-
平台侧的码来自 Room HTTP 响应的 `data.result`,模板原样透传,未来平台加新枚举无需改模板。
|
|
218
|
-
|
|
219
|
-
## AI 代码检查清单
|
|
220
|
-
|
|
221
|
-
- **只用本单例 API**:业务代码禁止 `import { Client } from '@colyseus/sdk'`、禁止直接触碰 Colyseus 原生 `Room` 对象、禁止自己拼 `/api/room/*` 或 `/api/ds-proxy/*`。
|
|
222
|
-
- **`@colyseus/sdk` 版本不可改**:`0.17.43` 与平台 DS 壳(`@colyseus/core@0.17.49`)配套;换 `colyseus.js@0.16` 会握手失败。
|
|
223
|
-
- **`@colyseus/sdk` 是平台预装,直接 import,禁止自己装或造替身**:模板 `package.json` 声明它只为锁版本,包体由平台镜像提供,`import { Client, getStateCallbacks, type Room } from '@colyseus/sdk'` 直接可用。预览 / 构建沙箱只读、`npm install` 装不上是正常的——**不要执行 npm i / npm install、不要写 stub 或 shim 替身、不要改 `vite.config.ts` 的 `resolve.alias` 把它指向本地文件**。若 import 报找不到,是平台解析问题,停下如实报错,绝不自建兜底实现绕过(那会让联机在打包后连不上真 DS,报 CONNECT_FAILED)。
|
|
224
|
-
- **消息名两端各写一份**:DS 壳只物化 `ds/`,`src/` 与 `ds/` 之间没有 import 通路,靠命名一致维系;不要试图建共享目录。
|
|
225
|
-
- **`maxPlayers` === `maxClients` === 玩法人数**:配大了会诱导抄 64;配小了 `joinOrCreate` 会在同进程另开一间房,两拨人互相看不见。
|
|
226
|
-
- **bus 监听要对称解绑**:`bus.on('mp-*', h)` 必须配 `bus.off('mp-*', h)`;`onEvent` 的返回值要在 `leave()` 里调用。
|
|
227
|
-
- **订阅早于进房、切场景后重绑**:`_bindEvents()` 放在 `createRoom` / `joinRoom` **之前**;每个 `bus.removeAllListeners()` 的下一行调 `rebindEvents()`。这两条是"能进房但完全不同步"的头号成因。
|
|
228
|
-
- **DS 侧只 `onMessage('pub')` / `onMessage('state.set')`**:自定义 type 走 `pub` 载荷分流,不要注册成 Colyseus 消息名。
|
|
229
|
-
- **pub 业务字段先 parse 再取**:DS 侧从 pub 载荷取业务字段前先 `JSON.parse(payload.data || "{}")`;`payload` 顶层只有 `type` / `data`,直读顶层字段恒 `undefined` → `NaN` → 校验分支静默丢弃,两端都不报错。
|
|
230
|
-
- **结果码要分类处理**:`ROOM_FULL` / `NOT_FOUND` → 刷新列表;`DS_ALLOC_FAILED` / `CONNECT_FAILED` → "稍后重试";`AUTH_FAILED` → 重新握手;`NO_PLATFORM` → 隐藏联机入口。
|
|
231
|
-
- **上报要节流**:`sendPose` 由玩法 tick 调,**上限 20Hz**(服端 `patchRate` 默认 50ms,更快的上行会被下一次 patch 覆盖),不要放进 `update()` 每帧发。
|
|
232
|
-
- **三种"断开"分开处理**:`mp-disconnect` 重 `join`、`mp-room-closed` 走结算、主动 `leaveRoom()` 什么都不做;混在一个分支里必然出现"结算完又自动进房"。
|
|
233
|
-
- **不做本地预测的兜底**:本模板不提供预测 / 回滚 / 插值,需要平滑得玩法 System 自己做。(`getServerNow()`/`getClockOffset()` 是**时钟测量设施**,不是预测,不违背这条——辨析见下节。)
|
|
234
|
-
- **`getServerNow()` 不放进每帧/`update()`**:它只读已标定好的偏移、极便宜,可随便调;但驱动它的 ping **每 3s 一次**,别去改快、别为「更准」而每帧发 ping(毫无收益、纯占上行)。
|
|
235
|
-
|
|
236
|
-
## 时钟标定设施:`getServerNow()` / `getClockOffset()`
|
|
237
|
-
|
|
238
|
-
这两个 API 只做一件事:**测出本机时钟与 DS 时钟差多少**,好让客户端把「服务端 t 时刻的旧快照」外推到当前时刻。**只有做「本地权威同款模拟 + 快照纠偏」(收端形态 C,见客户端 `${CRAFT_CONTEXT_DIR}/knowledge/Multiplayer/StateSyncKnowledge.md`)的连续运动玩法才用得上**;形态 A(收 pose→lerp)和纯回合玩法用不到,可以完全无视。
|
|
239
|
-
|
|
240
|
-
- **怎么用**:DS 写快照时带上服务端单调时钟 `snap.t`(两端契约,见 `${CRAFT_CONTEXT_DIR}/skills/platform-services/references/SERVER_GUIDE.md`「与客户端的接口对应」)。收端算快照年龄 `age = getServerNow() − snap.t`,按 age 把权威态外推到当下,再和本地当前值比阈值纠偏。**别用「到达时刻 − snap.t」**——那把单向延迟当 0。
|
|
241
|
-
- **怎么标定(模板内部,无需业务关心)**:连上房后每 3s 发一次 ping(走 pub 契约、type=`ping`),DS 定向回 pong 带 `st`(服务端当前时钟);模板按**最小 RTT 样本**更新 `offset = st − (t + rtt/2)`,`getServerNow()` 返回 `Date.now() + offset`。取最小 RTT 是为了滤掉抖动大的样本。未标定或没接 DS ping 时 `offset = 0`、`getServerNow() ≈ Date.now()`(退化成「不补偿」,不会更糟)。
|
|
242
|
-
- **为什么它能进模板、不违背「模板不做插值/预测/回滚」**:这是**测量**,不是**纠偏**。它测的是两端时钟差——一个与任何具体玩法都无关的物理量,和 `getSessionId()`/`getRoomId()` 同属「客观事实查询」层。真正的插值 / 外推 / 回滚(拿这个 age 去改物体位置)仍然在**玩法层**做、仍然不进模板。把「测时钟差」和「用时钟差纠偏」分成两层,正是让形态 C 可实现、又不把玩法逻辑焊进平台边界模板的办法。
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# 屏幕 UI
|
|
2
|
-
|
|
3
|
-
`PlayScene.create` 已 `mountScreenUi()`,挂在 `this.screenUi`。坐标是逻辑像素(短边 1080,长边随窗口变),不是固定 1920×1080。
|
|
4
|
-
|
|
5
|
-
场上按钮:`button('hud', { label, rect, onClick })`。`rect` 是设计坐标 `{ x, y, width, height }`(位置和可点范围)。文案:`text(host, { text })`。
|
|
6
|
-
|
|
7
|
-
弹层:`panel(options?)` 返回 `{ root, setOpen }`,内容挂 `root`。主按钮就是下一步(开始、过关、失败、再来一局等,这类与游戏核心主流程上有关的步骤)用 `panel()`。点完还要回到场上(商店、图鉴、属性卡等这类游戏过程中的弹窗)用 `panel({ close: true })`。点单位弹出的卡可带 `rect`,并用 `scrim: false`。没有关闭入口,玩家卡在弹层里。世界里的精灵、花盆:`setInteractive` 加在那张图上。
|
|
8
|
-
|
|
9
|
-
按钮皮改 `src/style.css` 的 `--hud-btn-fill`、`--hud-btn-ink`、`--hud-btn-edge`,弹层底板改 `--hud-panel-fill`。漏改则盖住场景却不像这局。
|
|
10
|
-
|
|
11
|
-
看图 `click` 的 `target` 与按钮 `label` 相同。画布实体用 `qa:` 或 `x/y`。
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# `ui_editor_compat`(项目是否已接入 UI 编辑器)
|
|
2
|
-
|
|
3
|
-
`SPEC/plan/dev-config.json` 的布尔字段。平台进入界面编辑器前的弹窗读它,判断当前项目是否已经用 `ui-editor-compat` 改写过。缺省或不是 `true` 时一律当 `false`。
|
|
4
|
-
|
|
5
|
-
`true` 表示现有屏幕 UI 已改写成编辑器可回读的 Layout/Logic,且之后新增的屏幕 UI 也按同一形态写。
|
|
6
|
-
|
|
7
|
-
## 谁写、谁读
|
|
8
|
-
|
|
9
|
-
- **首次开发写入 `false`**:随 `${CRAFT_CONTEXT_DIR}/knowledge/AigcEnabled.md`「落盘」一起写。不得按用户原话写成 `true`。
|
|
10
|
-
- **改成 `true`**:只由 `ui-editor-compat` 的 `mark` 在检查通过并成功写入本字段时。写入失败则字段保持原值。禁止手改;跑该脚本不算手改。
|
|
11
|
-
- **改 `dev-config.json` 其它键**:读出整份再写回,不得丢掉或覆盖本字段。
|
|
12
|
-
- **每次新增或改写屏幕 UI 前读**(首轮和迭代都读,不只开工一次)。文件缺失或不是 `true` 则当 `false`。`true` 则加载 `ui-editor-compat`,按该 skill 的 Layout/Logic 直接写,不要先写原生 DOM 再转换。非 `true` 则用普通 DOM,不得自主加载该 skill。
|
|
13
|
-
- 禁止再从对话猜「这个项目能不能用 UI 编辑器」。
|
|
14
|
-
|
|
15
|
-
## 首次接入
|
|
16
|
-
|
|
17
|
-
仅当用户明确要求把 UI 导入/接入编辑器、按编辑器格式改写、或点名 `ui-editor-compat` 时,才加载该 skill 做一次性转换。转换未完成时本字段保持 `false`。
|
|
18
|
-
|
|
19
|
-
## 已接入之后
|
|
20
|
-
|
|
21
|
-
字段为 `true` 时,本轮只要改到屏幕 UI 就加载该 skill,按 Layout/Logic 写新界面或改已有界面;写完再 `mark`。
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: 多人联机是本平台已支持能力——禁止答复「环境不支持联机」或擅自回退单机
|
|
3
|
-
always: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# 多人联机能力声明(强制)
|
|
7
|
-
|
|
8
|
-
本平台**支持多人联机**(Colyseus 状态同步)。客户端和权威服务端骨架都由 `platform-services` 只安装 `multiplayer` 得到:客户端进 `src/skill-modules/platform-services/`,工程没有 `ds/` 时同时写入 `${CRAFT_PROJECT_DIR}/ds/` 骨架(带上身份文件,不装排行榜和云存档;见 `knowledge/PlatformServices.md`,不要从 `runtime/lightgame/1.0.0` 引入)。
|
|
9
|
-
|
|
10
|
-
## 禁止的答复
|
|
11
|
-
|
|
12
|
-
- 禁止告知用户「当前运行环境没有联机能力」「没有房间服务器 / 实时通信服务」「没有权威服务端」「不支持断线检测 / 重连 / 房间回收」——这些全部已实现,事实源见 `${CRAFT_CONTEXT_DIR}/skills/platform-services/references/SERVER_GUIDE.md`。
|
|
13
|
-
- 禁止把联机需求直接判「不可实现」并回退单机版、或只做「联机界面原型 / 本地 AI 模拟第二名玩家」。
|
|
14
|
-
- **不要以 `src/` 里没有联网代码、`package.json` 里没有 colyseus 依赖为据判定不支持**:这是集成前的正常状态。联机客户端随 `platform-services --modules multiplayer` 安装,`@colyseus/sdk` 由平台预装。
|
|
15
|
-
- **DS 由平台自动拉起**,不需要用户上传 DS 包、注册 DS 版本、配置部署地址或提供数据库。禁止要求用户去控制台做部署动作。
|
|
16
|
-
|
|
17
|
-
## 正确路径
|
|
18
|
-
|
|
19
|
-
1. 命中联机需求(多人同房、跨端共享局面 / 行动顺序 / 胜负、房间列表、邀请、断线重连)→ 先读 `${CRAFT_CONTEXT_DIR}/knowledge/Multiplayer/OverviewKnowledge.md` 的「能力边界与降级路由」表分诊。该表是联机能力的**唯一事实源**,✅ / ⚠️ / ❌ 三档结论以它为准;判 ⚠️/❌ 的先与用户对齐替代形态,不硬生成跑不起来的版本。
|
|
20
|
-
2. 决定状态 owner、同步契约、权威边界、后加入恢复 → `${CRAFT_CONTEXT_DIR}/knowledge/Multiplayer/StateSyncKnowledge.md`。
|
|
21
|
-
3. 集成客户端 → `${CRAFT_CONTEXT_DIR}/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md`,用 `platform-services` 只安装 `multiplayer`(落地纪律见 `PlatformBoundaryModules.md`)。
|
|
22
|
-
4. 编写服务端 Room / Schema → `${CRAFT_CONTEXT_DIR}/skills/platform-services/references/SERVER_GUIDE.md`。
|
|
23
|
-
5. 大厅与进房 UI → 只允许「创建房间 + 房间列表 + 加入房间」,**禁止房间名 / 房间号 / 邀请码输入框**,房间名用固定模板自动生成,见 `MultiplayerRoomEntryUX.md`。
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: 联机进房交互只有「创建房间 + 房间列表 + 加入房间」一套——禁止房间名 / 房间号 / 邀请码输入框,房间名用固定模板自动生成
|
|
3
|
-
always: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# 联机进房交互门禁(强制)
|
|
7
|
-
|
|
8
|
-
联机进房**只允许**这一套:**创建房间** → **房间列表** → **点列表项加入**。
|
|
9
|
-
|
|
10
|
-
## 硬禁止
|
|
11
|
-
|
|
12
|
-
- **禁止任何输入框**:房间名输入框、房间号 / 房号 / 邀请码输入框、数字键盘输码页,一律不做。自由文本输入是平台功能红线,数字房号同样禁止。
|
|
13
|
-
- **禁止按名称或号码查找房间**:不做「输入房间名 → 本地 `listRooms()` 里匹配」,也不做「输入房号 → 拼 `roomId` 直接加入」。平台**不保证 `title` 唯一、不支持按 `title` 查房**。
|
|
14
|
-
- **禁止邀请码 / 邀请链接 / 好友邀请进房**。
|
|
15
|
-
- `joinRoom(roomId)` 的 `roomId` **只能来自 `listRooms()` 返回的 `RoomBrief.roomId`**,不得由玩家输入或手工拼接。
|
|
16
|
-
|
|
17
|
-
用户口头要求「输房号进房」「自己给房间起名」时:改用房间列表方案,并明确告知本版不做输码与自定义房名。
|
|
18
|
-
|
|
19
|
-
## 房间名:固定模板,自动生成
|
|
20
|
-
|
|
21
|
-
`createRoom()` **无参**,房间名在 `init()` 时就已确定——模板设计上没有「玩家输入后再创建」的位置。
|
|
22
|
-
|
|
23
|
-
用平台下发的玩家名拼固定模板:
|
|
24
|
-
|
|
25
|
-
```ts
|
|
26
|
-
// ✅ 启动时一次确定,玩家不参与
|
|
27
|
-
MultiplayerManager.init({
|
|
28
|
-
roomName: 'sync',
|
|
29
|
-
maxPlayers: 8,
|
|
30
|
-
title: `${PlatformServiceManager.getPlayerName() || '玩家'}的房间`,
|
|
31
|
-
});
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
```ts
|
|
35
|
-
// ❌ 让玩家输入房名
|
|
36
|
-
const title = await showInputDialog('给你的房间起个名字');
|
|
37
|
-
MultiplayerManager.init({ title });
|
|
38
|
-
|
|
39
|
-
// ❌ 让玩家输入房号加入
|
|
40
|
-
const code = await showInputDialog('输入 4 位房间号');
|
|
41
|
-
MultiplayerManager.joinRoom(code);
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
`getPlayerName()` 为空时用 `'玩家'` 兜底,不弹输入框问名字。
|
|
45
|
-
|
|
46
|
-
## 大厅 UI 该长什么样
|
|
47
|
-
|
|
48
|
-
`listRooms()` 返回的 `RoomBrief { roomId, title, playerCount, maxPlayers, status }` 已足够渲染完整大厅,不需要任何输入控件:
|
|
49
|
-
|
|
50
|
-
- 一个「创建房间」按钮
|
|
51
|
-
- 一个房间列表,渲染 `listRooms()` 的**全部** `items`,每项显示 `title` 与 `playerCount / maxPlayers`
|
|
52
|
-
- 未满员:整项可点击加入。满员:标「已满」、不可加入。禁止 `filter(r => r.playerCount < r.maxPlayers)` 把满员房藏掉
|
|
53
|
-
- 列表**必做定时自动刷新**(大厅停留期间约每 2~3 秒;平台列表无推送);离开大厅即停止。可附带手动刷新按钮,但不能只靠手动
|
|
54
|
-
- 无可加入房间时突出「创建房间」入口,**不要**画输码页或搜索框
|
|
55
|
-
- 空列表也要更新 UI(含「暂无房间」),禁止用空签名跳过渲染、禁止把「正在连接」hint 留到握手结束之后
|
|
56
|
-
|
|
57
|
-
## 两阶段进房(强制)
|
|
58
|
-
|
|
59
|
-
HTTP `create` / `join` 只占座并拉起 DS;进对局还要 Colyseus 连上。`createRoom` / `joinRoom` 在 `CONNECT_FAILED` 时**默认已 `leaveRoom()`**。业务失败只提示,禁止只回大厅不退房。需要占座重试时显式传 `{ keepSeat: true }`。
|
|
60
|
-
|
|
61
|
-
`maxPlayers`、`ds/` 的 `maxClients`、玩法人数三者必须相同。
|
|
62
|
-
|
|
63
|
-
重连只用 `mp-disconnect` 的 `roomId` 或 `getLastRoomId()`。`onLeave` 之后 `getRoomId()` 已空,禁止拿它重连。
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: 平台边界模块的落地纪律——身份、排行榜、云存档、多人同步都由 platform-services 按需安装,模块不可用时必须停下报告阻塞,禁止手写替代实现
|
|
3
|
-
always: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# 平台边界模块门禁(强制)
|
|
7
|
-
|
|
8
|
-
平台边界模块封装的不是可从工程代码推断的逻辑,而是**平台协议边界**——连接重试节奏、`room_closed` / 断线监听、`uid` 的 uint32 值域、DS 收尾时序等。这些约束在工程代码里没有任何可参照的痕迹,Agent 无法凭代码反推。
|
|
9
|
-
|
|
10
|
-
## 落地方式
|
|
11
|
-
|
|
12
|
-
身份、排行榜、云存档、多人同步都由 `platform-services` 安装到 `src/skill-modules/platform-services/`。只装这次要用的模块:
|
|
13
|
-
|
|
14
|
-
- `identity`:身份
|
|
15
|
-
- `leaderboard`:排行榜,附带身份文件,不含云存档和联机
|
|
16
|
-
- `save`:云存档,附带身份文件,不含排行榜和联机
|
|
17
|
-
- `multiplayer`:`MultiplayerManager.ts`、`log.ts`、`eventBus.ts` 和 `multiplayer/`,附带身份文件,不含排行榜和云存档
|
|
18
|
-
|
|
19
|
-
不传 `--modules` 时只装 `identity`。装出来的文件可按玩法修改;重装会覆盖为当前版本,改过的文件备份为同目录 `.previous`,重装后按项目实际代码合入,见 `platform-services` 的「修改与重装」。不要改从 `runtime/lightgame/1.0.0/platform/` 引入。`1.0.0` 里的同名模块和 `src/subsystem/multiplayerManager/` 旧副本,只留给业务代码仍在 import 它们的旧工程。旧副本目录还在、但没有任何 import 时,删掉它再按 `multiplayer` 安装。给仍在用 `1.0.0` 身份的工程新增联机即算迁移:入口改从安装出来的 `platform-service.mjs` 导入身份;同时在用 `1.0.0` 排行榜 / 云存档的,同一步装对应模块并改 import,不两套并存。模块缺失或安装失败时停下报告,不要手抄一份。用法见 `${CRAFT_CONTEXT_DIR}/knowledge/PlatformServices.md` 与 `${CRAFT_CONTEXT_DIR}/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md`。`ds/` 骨架也由安装 `multiplayer` 写入:工程没有 `ds/` 时写一份,已有不覆盖,之后归工程所有。服务端约束见 `${CRAFT_CONTEXT_DIR}/skills/platform-services/references/SERVER_GUIDE.md`。
|
|
20
|
-
|
|
21
|
-
## 硬约束
|
|
22
|
-
|
|
23
|
-
- 需要哪个能力就只安装哪个模块,不改动安装文件里封装的边界行为。
|
|
24
|
-
- **安装失败或 skill 缺失**(skill 缺失、沙箱镜像故障 `system skill mirror digest mismatch`、写入失败(目标是符号链接、路径越界、磁盘错误)、文件缺失等)→ **必须停下来,报告阻塞**,明确说明是哪个模块拿不到、卡在何处。**禁止手写替代实现。** 安装器报 `Unmerged backup` 不属于这一类:按「修改与重装」合入备份后重装。
|
|
25
|
-
- **禁止在报告里谎报状态**:既然没落地,就必须说"未落地/被阻塞",不得一边手写了替代件、一边声称"未创建替代模块"。
|
|
26
|
-
- 不要从旧 runtime 抄 `.mjs`、改 alias,或改去 import `runtime/lightgame/1.0.0`。不要把联机再复制到 `src/subsystem/multiplayerManager/`。
|
|
27
|
-
- **禁止手写换票或排行/存档 HTTP**(含自己调 `game-session` / `qq-game-session` / `/api/leaderboard/*` / `/api/cloudsave/*`)。只用安装出来的 `platform-service` / `LeaderboardManager` / `SaveManager`。
|
|
28
|
-
- **排行榜 `boardKey`:** `configure` / `report` / `query`(及用到的 batch、updateDisplay)必须同一常量;新代码禁止省略。详情见 `${CRAFT_CONTEXT_DIR}/skills/platform-services/references/leaderboard_playbook.md`。
|
|
29
|
-
- **装了 `leaderboard` 或 `save`:** `getPlatformService({ initTimeoutMs: 20000 }).init()`。排行身份未就绪时提供【重新加载游戏】,身份有效时查榜失败可重查;重复 `whenReady()` / `init()` 不会重新换票。云存档首次云读档及重试云读写前确认身份就绪(或 `active` 后再读);`OK` + `source === 'local'` 不是云成功。
|
|
30
|
-
|
|
31
|
-
## 为什么禁止手写(这不是保守,是手写必然缺边界)
|
|
32
|
-
|
|
33
|
-
手写替代件会缺掉一批**无法从工程代码自证**的平台边界约束。已发生的实例(js2d 工程模板故障后 Agent 手写 `multiplayerManager` / `platformServiceManager`),手写件同时缺失以下四条,且每条都零报错、正常游玩测不到:
|
|
34
|
-
|
|
35
|
-
- **无连接重试**:刚开房头一两秒 DS 还没 listen,客户端首次连接会失败,需按节奏重试——手写件直接放弃。
|
|
36
|
-
- **不监听 `room_closed` / 断线**:DS 收尾时 `broadcast("room_closed")`,客户端要据此给出关闭码;手写件不听,玩家只拿到空 `onError`。
|
|
37
|
-
- **`uid` 恒为 0**:平台在场名单要 uint32 `uid`,手写件不接 `parseJoinUid`,上报恒 0,平台解在场名单失败。
|
|
38
|
-
- **`requestClose` 未定义 / 收尾时序缺失**:空房收不了尾。
|
|
39
|
-
|
|
40
|
-
这四条 Agent 自己无从验证——所以门禁停在"禁止手写",而不是"手写时记得补齐这四条"(补的前提是知道有这四条,而这正是它推不出来的)。
|
|
41
|
-
|
|
42
|
-
## 用户坚持要继续时
|
|
43
|
-
|
|
44
|
-
若用户明确要求在模板不可用的情况下继续,**必须逐条列出无法自证的边界假设**(至少上述连接重试 / `room_closed` 与断线监听 / `uid` 值域 / 收尾时序四类),说明手写件在这些点上必然是猜测、线上大概率静默失效,再由用户决定是否承担。不得默默手写后当作正常交付。
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# 音频 AIGC 生成(仅 BGM / 循环氛围)
|
|
2
|
-
|
|
3
|
-
本模板只服务 `audio_role=bgm` 与 `ambience`。**不要用本模板写音效**:打击、跳跃、收集、
|
|
4
|
-
胜负、点击一律不提交 AIGC,由业务程序合成。
|
|
5
|
-
|
|
6
|
-
## 维度
|
|
7
|
-
|
|
8
|
-
### 【氛围】
|
|
9
|
-
听觉场景、空间感、情绪基调。常用值:
|
|
10
|
-
- 史诗宏大,庄严,管弦乐
|
|
11
|
-
- 神秘探索,空灵,回响
|
|
12
|
-
- 紧张刺激,急促,打击乐
|
|
13
|
-
- 轻松欢快,明亮,跳跃
|
|
14
|
-
- 压抑阴森,低沉,失真
|
|
15
|
-
|
|
16
|
-
### 【风格】
|
|
17
|
-
音乐风格、乐器、音色特征。常用值:
|
|
18
|
-
- 管弦乐,交响,史诗配乐
|
|
19
|
-
- 电子,合成器,8-bit 芯片音乐
|
|
20
|
-
- 民谣,原声吉他,口琴
|
|
21
|
-
- 环境氛围,pad,drone
|
|
22
|
-
|
|
23
|
-
### 【声音描述】
|
|
24
|
-
旋律走向、配器层次、节奏与循环方式。
|
|
25
|
-
尽量具体:主导乐器、鼓点疏密、是否无缝循环、高潮与铺垫如何交替。不要写单次触发的拟音事件。
|
|
26
|
-
|
|
27
|
-
### 【不要什么】
|
|
28
|
-
负面提示词。排除不想要的声音特征。
|
|
29
|
-
|
|
30
|
-
## 最终输出
|
|
31
|
-
|
|
32
|
-
按维度拼接,格式 `【维度名】内容`,维度间用换行分隔。
|
|
33
|
-
|
|
34
|
-
### 示例
|
|
35
|
-
|
|
36
|
-
【氛围】轻松欢快的冒险基调,明亮跳跃,适合长时间循环
|
|
37
|
-
【风格】电子,合成器,8-bit 芯片音乐,主旋律清晰
|
|
38
|
-
【声音描述】轻快的方波主旋律配简单鼓机循环,中段加一层琶音垫底,首尾衔接可无缝循环,约两分钟
|
|
39
|
-
【不要什么】不要人声,不要对白,不要突然静音,不要写成短促音效
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# 迭代替换已有槽位
|
|
2
|
-
|
|
3
|
-
> 用户在已有项目上明确要求生成 / 替换图或音乐时执行。首轮不要读本文件。
|
|
4
|
-
> 造清单、提示词与提交由 `aigc-asset` 子代理负责,本文件只管**定位要替换哪些槽位**。
|
|
5
|
-
|
|
6
|
-
迭代与首轮的清单来源正好相反:代码已经在了,**每个能换资产的位置都已经写成了 `@slot`**,
|
|
7
|
-
所以清单从代码里读,不从设计文档推。本文件做的就是把这些槽位筛成一份待替换清单。
|
|
8
|
-
|
|
9
|
-
**1. 定位。** `grep -rn "@slot" src/` 拿到全部槽位。
|
|
10
|
-
|
|
11
|
-
**2. 过滤。** 取 `texture-ui` / `texture-scene` / `texture-prop` / `audio` / `character2d`。
|
|
12
|
-
`effect2d` 跳过。`audio` 只替换 `bgm` / `ambience`。已经带第三段 URL 的跳过,除非用户点名重做。
|
|
13
|
-
散布类小装饰保持直绘。没有 `character2d` 槽就不要补动作。
|
|
14
|
-
|
|
15
|
-
**3. 让 aigc-asset 生成。** 把过滤后的槽位清单写进 objective,`name` 用 `slot_name`:
|
|
16
|
-
|
|
17
|
-
```json
|
|
18
|
-
{"handoff":{"objective":"迭代替换:只为下列已有槽位生成,name 用槽位名。\nuiHud.gem_icon | texture-ui | 绿宝石图标\ngameScene.bg | texture-scene | 主场景背景"}}
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
会出序列帧的角色,在 objective 里写明该角色立绘的槽位名,让它用
|
|
22
|
-
`derive_first_frame_from` 指向。
|
|
23
|
-
|
|
24
|
-
**4. 播报。** 按它回报的名单向用户列清单(格式见 SKILL「SOP 1」),然后立刻去写代码。
|
|
25
|
-
|
|
26
|
-
**5. 接线。** 见 `${CRAFT_CONTEXT_DIR}/knowledge/AigcWiring.md`。失败槽第三段留空。交付说明列出没做的槽位及原因。接线后 `npm run config:export` → 加载 `visual-qa` → 调用 `game_visual_qa`。
|