@playcraft/skills 0.0.2
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 +333 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/skills.loader.d.ts +31 -0
- package/dist/src/skills.loader.d.ts.map +1 -0
- package/dist/src/skills.loader.js +200 -0
- package/dist/src/skills.loader.js.map +1 -0
- package/dist/src/skills.types.d.ts +44 -0
- package/dist/src/skills.types.d.ts.map +1 -0
- package/dist/src/skills.types.js +9 -0
- package/dist/src/skills.types.js.map +1 -0
- package/package.json +35 -0
- package/skills/2048_core.aigameplay/SKILL.md +123 -0
- package/skills/2048_core.aigameplay/manifest.json +159 -0
- package/skills/2048_core.aigameplay/ref/pgs-schema.json +194 -0
- package/skills/2048_core.aigameplay/ref/reducer.template.ts +189 -0
- package/skills/SKILL.md +46 -0
- package/skills/ad_compliance_rules.aiconfig/SKILL.md +85 -0
- package/skills/ad_compliance_rules.aiconfig/manifest.json +60 -0
- package/skills/agent_remix_orchestrator.aicomponent/SKILL.md +257 -0
- package/skills/agent_remix_orchestrator.aicomponent/manifest.json +12 -0
- package/skills/app_metadata.aiconfig/SKILL.md +53 -0
- package/skills/app_metadata.aiconfig/manifest.json +32 -0
- package/skills/appear_sfx.aiaudio/SKILL.md +59 -0
- package/skills/appear_sfx.aiaudio/manifest.json +45 -0
- package/skills/appear_sfx.aiaudio/ref/appear.mp3 +0 -0
- package/skills/arrow_move_error_sfx.aiaudio/SKILL.md +59 -0
- package/skills/arrow_move_error_sfx.aiaudio/manifest.json +45 -0
- package/skills/arrow_move_error_sfx.aiaudio/ref/arrow_move_error.mp3 +0 -0
- package/skills/arrow_path_data_format.aicomponent/SKILL.md +152 -0
- package/skills/arrow_path_data_format.aicomponent/manifest.json +57 -0
- package/skills/arrow_path_data_format.aicomponent/ref/LevelParser.ts +188 -0
- package/skills/arrow_path_data_format.aicomponent/ref/LevelTypes.ts +131 -0
- package/skills/arrow_pick_match_rules.aigameplay/SKILL.md +117 -0
- package/skills/arrow_pick_match_rules.aigameplay/manifest.json +105 -0
- package/skills/arrow_pick_match_rules.aigameplay/ref/pgs-schema.json +180 -0
- package/skills/asset_pipeline_scripts.aicomponent/SKILL.md +117 -0
- package/skills/asset_pipeline_scripts.aicomponent/manifest.json +17 -0
- package/skills/asset_pipeline_scripts.aicomponent/ref/gen-sprite.sh +105 -0
- package/skills/ball_sort.aigameplay/SKILL.md +109 -0
- package/skills/ball_sort.aigameplay/manifest.json +155 -0
- package/skills/ball_sort.aigameplay/ref/pgs-schema.json +192 -0
- package/skills/ball_sort.aigameplay/ref/reducer.template.ts +156 -0
- package/skills/basketball_shot.aigameplay/SKILL.md +94 -0
- package/skills/basketball_shot.aigameplay/manifest.json +150 -0
- package/skills/basketball_shot.aigameplay/ref/pgs-schema.json +229 -0
- package/skills/basketball_shot.aigameplay/ref/reducer.template.ts +189 -0
- package/skills/bg_music.aiaudio/SKILL.md +61 -0
- package/skills/bg_music.aiaudio/manifest.json +48 -0
- package/skills/bg_music.aiaudio/ref/bg.mp3 +0 -0
- package/skills/big_watermelon.aigameplay/SKILL.md +94 -0
- package/skills/big_watermelon.aigameplay/manifest.json +155 -0
- package/skills/big_watermelon.aigameplay/ref/pgs-schema.json +191 -0
- package/skills/big_watermelon.aigameplay/ref/reducer.template.ts +202 -0
- package/skills/block_puzzle.aigameplay/SKILL.md +121 -0
- package/skills/block_puzzle.aigameplay/manifest.json +154 -0
- package/skills/block_puzzle.aigameplay/ref/pgs-schema.json +170 -0
- package/skills/block_puzzle.aigameplay/ref/reducer.template.ts +182 -0
- package/skills/board_entity_sprite.aiimage/SKILL.md +255 -0
- package/skills/board_entity_sprite.aiimage/manifest.json +153 -0
- package/skills/board_entity_sprite.aiimage/ref/ProceduralCar.ts +357 -0
- package/skills/board_entity_sprite.aiimage/ref/car.png +0 -0
- package/skills/board_entity_sprite.aiimage/ref/car.webp +0 -0
- package/skills/bottom_ui_bar.aicomponent/SKILL.md +50 -0
- package/skills/bottom_ui_bar.aicomponent/manifest.json +31 -0
- package/skills/bottom_ui_bar.aicomponent/ref/GameBottomUI.ts +27 -0
- package/skills/bubble_shooter.aigameplay/SKILL.md +129 -0
- package/skills/bubble_shooter.aigameplay/manifest.json +181 -0
- package/skills/bubble_shooter.aigameplay/ref/pgs-schema.json +226 -0
- package/skills/bubble_shooter.aigameplay/ref/reducer.template.ts +228 -0
- package/skills/button_click_sfx.aiaudio/SKILL.md +59 -0
- package/skills/button_click_sfx.aiaudio/manifest.json +45 -0
- package/skills/button_click_sfx.aiaudio/ref/button_click.mp3 +0 -0
- package/skills/calm_piano.aiaudio/SKILL.md +68 -0
- package/skills/calm_piano.aiaudio/manifest.json +50 -0
- package/skills/camera_controller_3d.aicomponent/SKILL.md +100 -0
- package/skills/camera_controller_3d.aicomponent/manifest.json +52 -0
- package/skills/camera_controller_3d.aicomponent/ref/CameraController.ts +199 -0
- package/skills/camera_controller_3d.aicomponent/ref/OrbitControlsAdapter.ts +152 -0
- package/skills/candy_tile.aiimage/SKILL.md +62 -0
- package/skills/candy_tile.aiimage/manifest.json +49 -0
- package/skills/car_parking.aigameplay/SKILL.md +105 -0
- package/skills/car_parking.aigameplay/manifest.json +164 -0
- package/skills/car_parking.aigameplay/ref/pgs-schema.json +163 -0
- package/skills/car_parking.aigameplay/ref/reducer.template.ts +166 -0
- package/skills/castle.aiimage/SKILL.md +64 -0
- package/skills/castle.aiimage/manifest.json +48 -0
- package/skills/cheerful_ukulele.aiaudio/SKILL.md +72 -0
- package/skills/cheerful_ukulele.aiaudio/manifest.json +50 -0
- package/skills/click_sfx.aiaudio/SKILL.md +59 -0
- package/skills/click_sfx.aiaudio/manifest.json +45 -0
- package/skills/click_sfx.aiaudio/ref/click.mp3 +0 -0
- package/skills/combo_display.aicomponent/SKILL.md +45 -0
- package/skills/combo_display.aicomponent/manifest.json +31 -0
- package/skills/combo_display.aicomponent/ref/ComboManager.ts +362 -0
- package/skills/combo_display.aicomponent/ref/ComboSmallUI.ts +232 -0
- package/skills/combo_praise_text.aicomponent/SKILL.md +56 -0
- package/skills/combo_praise_text.aicomponent/manifest.json +34 -0
- package/skills/combo_praise_text.aicomponent/ref/ComboManager.ts +362 -0
- package/skills/countdown_timer.aicomponent/SKILL.md +44 -0
- package/skills/countdown_timer.aicomponent/manifest.json +35 -0
- package/skills/countdown_timer.aicomponent/ref/CountdownDisplay.ts +213 -0
- package/skills/cta_platform_config.aiconfig/SKILL.md +72 -0
- package/skills/cta_platform_config.aiconfig/manifest.json +56 -0
- package/skills/debug_overlay.aicomponent/SKILL.md +75 -0
- package/skills/debug_overlay.aicomponent/manifest.json +17 -0
- package/skills/debug_overlay.aicomponent/ref/DebugOverlay.ts +144 -0
- package/skills/desert.aiimage/SKILL.md +63 -0
- package/skills/desert.aiimage/manifest.json +49 -0
- package/skills/difficulty_curve_designer.aiconfig/SKILL.md +68 -0
- package/skills/difficulty_curve_designer.aiconfig/manifest.json +36 -0
- package/skills/digit_renderer.aicomponent/SKILL.md +43 -0
- package/skills/digit_renderer.aicomponent/manifest.json +25 -0
- package/skills/digit_renderer.aicomponent/ref/DigitRenderer.ts +237 -0
- package/skills/download_button.aicomponent/SKILL.md +44 -0
- package/skills/download_button.aicomponent/manifest.json +25 -0
- package/skills/download_button.aicomponent/ref/DownloadButton.ts +137 -0
- package/skills/draw_line_puzzle.aigameplay/SKILL.md +84 -0
- package/skills/draw_line_puzzle.aigameplay/manifest.json +152 -0
- package/skills/draw_line_puzzle.aigameplay/ref/pgs-schema.json +189 -0
- package/skills/draw_line_puzzle.aigameplay/ref/reducer.template.ts +194 -0
- package/skills/easy_to_hard.aiconfig/SKILL.md +52 -0
- package/skills/easy_to_hard.aiconfig/manifest.json +33 -0
- package/skills/eight_ball_pool.aigameplay/SKILL.md +104 -0
- package/skills/eight_ball_pool.aigameplay/manifest.json +152 -0
- package/skills/eight_ball_pool.aigameplay/ref/pgs-schema.json +205 -0
- package/skills/eight_ball_pool.aigameplay/ref/reducer.template.ts +198 -0
- package/skills/energetic_electronic.aiaudio/SKILL.md +69 -0
- package/skills/energetic_electronic.aiaudio/manifest.json +51 -0
- package/skills/fail_sfx.aiaudio/SKILL.md +59 -0
- package/skills/fail_sfx.aiaudio/manifest.json +44 -0
- package/skills/fail_sfx.aiaudio/ref/fail.mp3 +0 -0
- package/skills/figer_icon.aiimage/SKILL.md +58 -0
- package/skills/figer_icon.aiimage/manifest.json +48 -0
- package/skills/figer_icon.aiimage/ref/figer.png +0 -0
- package/skills/figer_icon.aiimage/ref/figer.webp +0 -0
- package/skills/forest.aiimage/SKILL.md +74 -0
- package/skills/forest.aiimage/manifest.json +48 -0
- package/skills/fruit_tile.aiimage/SKILL.md +68 -0
- package/skills/fruit_tile.aiimage/manifest.json +48 -0
- package/skills/game_over_panel.aicomponent/SKILL.md +47 -0
- package/skills/game_over_panel.aicomponent/manifest.json +61 -0
- package/skills/game_over_panel.aicomponent/ref/GameOverPanel.ts +74 -0
- package/skills/game_scene.aicomponent/SKILL.md +57 -0
- package/skills/game_scene.aicomponent/manifest.json +36 -0
- package/skills/game_scene.aicomponent/ref/Game.ts +748 -0
- package/skills/gameplay_balance_check.aivalidator/SKILL.md +69 -0
- package/skills/gameplay_balance_check.aivalidator/manifest.json +21 -0
- package/skills/gameplay_unit_test.aivalidator/SKILL.md +89 -0
- package/skills/gameplay_unit_test.aivalidator/manifest.json +17 -0
- package/skills/gameplay_unit_test.aivalidator/ref/gameplay.test.ts +202 -0
- package/skills/gameplay_unit_test.aivalidator/ref/vitest.config.ts +13 -0
- package/skills/grid_board_layout.aicomponent/SKILL.md +85 -0
- package/skills/grid_board_layout.aicomponent/manifest.json +69 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardLayout.ts +416 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardLayout3D.ts +125 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardLayoutMath.ts +85 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardRenderer3D.ts +298 -0
- package/skills/heart_lives.aicomponent/SKILL.md +42 -0
- package/skills/heart_lives.aicomponent/manifest.json +25 -0
- package/skills/heart_lives.aicomponent/ref/HeartDisplay.ts +96 -0
- package/skills/idle-breathe.aicomponent/SKILL.md +27 -0
- package/skills/idle-breathe.aicomponent/manifest.json +20 -0
- package/skills/idle-breathe.aicomponent/ref/phaser.js +25 -0
- package/skills/idle-breathe.aicomponent/ref/playcanvas.js +29 -0
- package/skills/jewel_tile.aiimage/SKILL.md +63 -0
- package/skills/jewel_tile.aiimage/manifest.json +49 -0
- package/skills/knife_hit.aigameplay/SKILL.md +103 -0
- package/skills/knife_hit.aigameplay/manifest.json +151 -0
- package/skills/knife_hit.aigameplay/ref/pgs-schema.json +202 -0
- package/skills/knife_hit.aigameplay/ref/reducer.template.ts +196 -0
- package/skills/left_right_parkour.aigameplay/SKILL.md +120 -0
- package/skills/left_right_parkour.aigameplay/manifest.json +165 -0
- package/skills/left_right_parkour.aigameplay/ref/pgs-schema.json +200 -0
- package/skills/left_right_parkour.aigameplay/ref/reducer.template.ts +194 -0
- package/skills/level_data_pack.aiconfig/SKILL.md +64 -0
- package/skills/level_data_pack.aiconfig/manifest.json +37 -0
- package/skills/level_data_validator.aivalidator/SKILL.md +85 -0
- package/skills/level_data_validator.aivalidator/manifest.json +17 -0
- package/skills/level_data_validator.aivalidator/ref/LevelValidator.ts +113 -0
- package/skills/level_lifecycle.aicomponent/SKILL.md +81 -0
- package/skills/level_lifecycle.aicomponent/manifest.json +87 -0
- package/skills/level_lifecycle.aicomponent/ref/LevelLifecycle.ts +235 -0
- package/skills/level_solvability_validator.aivalidator/SKILL.md +74 -0
- package/skills/level_solvability_validator.aivalidator/manifest.json +23 -0
- package/skills/level_solvability_validator.aivalidator/ref/LevelValidator.ts +186 -0
- package/skills/level_state.aicomponent/SKILL.md +55 -0
- package/skills/level_state.aicomponent/manifest.json +34 -0
- package/skills/level_state.aicomponent/ref/LevelDataManager.ts +26 -0
- package/skills/level_state.aicomponent/ref/LevelManager.ts +26 -0
- package/skills/loading_screen.aicomponent/SKILL.md +57 -0
- package/skills/loading_screen.aicomponent/manifest.json +43 -0
- package/skills/loading_screen.aicomponent/ref/LoadingUI.ts +339 -0
- package/skills/lose_result_panel.aiimage/SKILL.md +58 -0
- package/skills/lose_result_panel.aiimage/manifest.json +47 -0
- package/skills/lose_result_panel.aiimage/ref/lose.png +0 -0
- package/skills/lose_result_panel.aiimage/ref/lose.webp +0 -0
- package/skills/lose_sfx.aiaudio/SKILL.md +59 -0
- package/skills/lose_sfx.aiaudio/manifest.json +45 -0
- package/skills/lose_sfx.aiaudio/ref/lose.mp3 +0 -0
- package/skills/match-pop.aicomponent/SKILL.md +29 -0
- package/skills/match-pop.aicomponent/manifest.json +19 -0
- package/skills/match-pop.aicomponent/ref/phaser.js +30 -0
- package/skills/match-pop.aicomponent/ref/playcanvas.js +22 -0
- package/skills/match3_core.aigameplay/SKILL.md +125 -0
- package/skills/match3_core.aigameplay/manifest.json +107 -0
- package/skills/match3_core.aigameplay/ref/pgs-schema.json +154 -0
- package/skills/match3_core.aigameplay/ref/reducer.template.ts +191 -0
- package/skills/match_engine.aicomponent/SKILL.md +84 -0
- package/skills/match_engine.aicomponent/manifest.json +23 -0
- package/skills/match_engine.aicomponent/ref/MatchEngine.ts +75 -0
- package/skills/memory_match.aigameplay/SKILL.md +111 -0
- package/skills/memory_match.aigameplay/manifest.json +164 -0
- package/skills/memory_match.aigameplay/ref/pgs-schema.json +190 -0
- package/skills/memory_match.aigameplay/ref/reducer.template.ts +162 -0
- package/skills/merge_core.aigameplay/SKILL.md +112 -0
- package/skills/merge_core.aigameplay/manifest.json +154 -0
- package/skills/merge_core.aigameplay/ref/pgs-schema.json +202 -0
- package/skills/merge_core.aigameplay/ref/reducer.template.ts +179 -0
- package/skills/mistake_sfx.aiaudio/SKILL.md +59 -0
- package/skills/mistake_sfx.aiaudio/manifest.json +45 -0
- package/skills/mistake_sfx.aiaudio/ref/mistake.mp3 +0 -0
- package/skills/nomove_hint_overlay.aiimage/SKILL.md +58 -0
- package/skills/nomove_hint_overlay.aiimage/manifest.json +48 -0
- package/skills/nomove_hint_overlay.aiimage/ref/nomove_hint.png +0 -0
- package/skills/nomove_hint_overlay.aiimage/ref/nomove_hint.webp +0 -0
- package/skills/normal_dot.aiimage/SKILL.md +58 -0
- package/skills/normal_dot.aiimage/manifest.json +46 -0
- package/skills/normal_dot.aiimage/ref/normal_dot.png +0 -0
- package/skills/normal_dot.aiimage/ref/normal_dot.webp +0 -0
- package/skills/ocean.aiimage/SKILL.md +71 -0
- package/skills/ocean.aiimage/manifest.json +49 -0
- package/skills/particle-confetti.aicomponent/SKILL.md +32 -0
- package/skills/particle-confetti.aicomponent/manifest.json +21 -0
- package/skills/particle-confetti.aicomponent/ref/html5-spritesheet.js +17 -0
- package/skills/particle-confetti.aicomponent/ref/phaser.js +38 -0
- package/skills/particle-explosion.aicomponent/SKILL.md +37 -0
- package/skills/particle-explosion.aicomponent/manifest.json +24 -0
- package/skills/particle-explosion.aicomponent/ref/html5-spritesheet.js +40 -0
- package/skills/particle-explosion.aicomponent/ref/phaser.js +46 -0
- package/skills/particle-explosion.aicomponent/ref/playcanvas.js +33 -0
- package/skills/particle-trail.aicomponent/SKILL.md +25 -0
- package/skills/particle-trail.aicomponent/manifest.json +22 -0
- package/skills/particle-trail.aicomponent/ref/phaser.js +31 -0
- package/skills/path_animation.aicomponent/SKILL.md +82 -0
- package/skills/path_animation.aicomponent/manifest.json +77 -0
- package/skills/path_animation.aicomponent/ref/AnimationManager.ts +694 -0
- package/skills/path_animation.aicomponent/ref/AnimationManager3D.ts +317 -0
- package/skills/path_elimination_rules.aigameplay/SKILL.md +88 -0
- package/skills/path_elimination_rules.aigameplay/manifest.json +119 -0
- package/skills/path_elimination_rules.aigameplay/ref/pgs-schema.json +227 -0
- package/skills/path_input_handler.aicomponent/SKILL.md +87 -0
- package/skills/path_input_handler.aicomponent/manifest.json +97 -0
- package/skills/path_input_handler.aicomponent/ref/InputHandler.ts +714 -0
- package/skills/path_input_handler.aicomponent/ref/InputHandler3D.ts +204 -0
- package/skills/path_renderer.aicomponent/SKILL.md +101 -0
- package/skills/path_renderer.aicomponent/manifest.json +69 -0
- package/skills/path_renderer.aicomponent/ref/PathRenderer.ts +509 -0
- package/skills/path_renderer.aicomponent/ref/PathRenderer3D.ts +176 -0
- package/skills/path_renderer.aicomponent/ref/PathRenderers.ts +640 -0
- package/skills/phaser.aicomponent/SKILL.md +315 -0
- package/skills/phaser.aicomponent/manifest.json +156 -0
- package/skills/phaser.aicomponent/ref/BootScene.ts +29 -0
- package/skills/phaser.aicomponent/ref/GameConfig.ts +29 -0
- package/skills/phaser.aicomponent/ref/GameScene.ts +88 -0
- package/skills/phaser.aicomponent/ref/PreloaderScene.ts +78 -0
- package/skills/phaser.aicomponent/ref/SceneKeys.ts +7 -0
- package/skills/phaser.aicomponent/ref/SoundUtils.ts +21 -0
- package/skills/phaser.aicomponent/ref/UiLayout.ts +74 -0
- package/skills/phaser.aicomponent/ref/globals.d.ts +52 -0
- package/skills/phaser.aicomponent/ref/index.css +40 -0
- package/skills/phaser.aicomponent/ref/index.html +14 -0
- package/skills/phaser.aicomponent/ref/index.ts +48 -0
- package/skills/phaser.aicomponent/ref/main.ts +16 -0
- package/skills/phaser.aicomponent/ref/package.json +22 -0
- package/skills/phaser.aicomponent/ref/tsconfig.json +25 -0
- package/skills/phaser.aicomponent/ref/webpack.config.js +57 -0
- package/skills/phaser_scene_lifecycle.aicomponent/SKILL.md +63 -0
- package/skills/phaser_scene_lifecycle.aicomponent/manifest.json +33 -0
- package/skills/pick_and_match_rules.aigameplay/SKILL.md +113 -0
- package/skills/pick_and_match_rules.aigameplay/manifest.json +121 -0
- package/skills/pick_and_match_rules.aigameplay/ref/pgs-schema.json +354 -0
- package/skills/pin_pull.aigameplay/SKILL.md +110 -0
- package/skills/pin_pull.aigameplay/manifest.json +164 -0
- package/skills/pin_pull.aigameplay/ref/pgs-schema.json +201 -0
- package/skills/pin_pull.aigameplay/ref/reducer.template.ts +216 -0
- package/skills/playable_app_logo.aiimage/SKILL.md +58 -0
- package/skills/playable_app_logo.aiimage/manifest.json +47 -0
- package/skills/playable_app_logo.aiimage/ref/logo.png +0 -0
- package/skills/playable_app_logo.aiimage/ref/logo.webp +0 -0
- package/skills/playable_end_screen_layout.aicomponent/SKILL.md +75 -0
- package/skills/playable_end_screen_layout.aicomponent/manifest.json +24 -0
- package/skills/playable_guidance_layer.aicomponent/SKILL.md +89 -0
- package/skills/playable_guidance_layer.aicomponent/manifest.json +24 -0
- package/skills/playable_hud_layout.aicomponent/SKILL.md +96 -0
- package/skills/playable_hud_layout.aicomponent/manifest.json +24 -0
- package/skills/playable_scripts_build.aicomponent/SKILL.md +69 -0
- package/skills/playable_scripts_build.aicomponent/manifest.json +53 -0
- package/skills/playable_scripts_build.aicomponent/ref/builds.config.js +257 -0
- package/skills/playcraft-3d-flip-sprite/SKILL.md +336 -0
- package/skills/playcraft-3d-flip-sprite/renderer/flatten_glb.mjs +62 -0
- package/skills/playcraft-3d-flip-sprite/renderer/render.mjs +325 -0
- package/skills/playcraft-3d-flip-sprite/renderer/render_single.mjs +138 -0
- package/skills/playcraft-asset-management/SKILL.md +73 -0
- package/skills/playcraft-audio-generation/SKILL.md +126 -0
- package/skills/playcraft-build/SKILL.md +44 -0
- package/skills/playcraft-code-editor/SKILL.md +71 -0
- package/skills/playcraft-create-remix/SKILL.md +62 -0
- package/skills/playcraft-deploy/SKILL.md +59 -0
- package/skills/playcraft-image-generation/SKILL.md +148 -0
- package/skills/playcraft-image-processing/SKILL.md +216 -0
- package/skills/playcraft-platform-intro/SKILL.md +41 -0
- package/skills/playcraft-prefab/SKILL.md +98 -0
- package/skills/playcraft-project-management/SKILL.md +57 -0
- package/skills/playcraft-remix-workflow/SKILL.md +119 -0
- package/skills/playcraft-remix-workflow/references/xplatform.schema.json5 +31 -0
- package/skills/playcraft-save/SKILL.md +46 -0
- package/skills/playcraft-skill-recommender/SKILL.md +152 -0
- package/skills/playcraft-sprite-generation/SKILL.md +534 -0
- package/skills/playcraft-sprite-remix/SKILL.md +155 -0
- package/skills/playcraft-sprite-sheet/SKILL.md +97 -0
- package/skills/playtest_report.aivalidator/SKILL.md +103 -0
- package/skills/playtest_report.aivalidator/manifest.json +21 -0
- package/skills/preloader_scene.aicomponent/SKILL.md +58 -0
- package/skills/preloader_scene.aicomponent/manifest.json +43 -0
- package/skills/preloader_scene.aicomponent/ref/Preloader.ts +339 -0
- package/skills/progress_bar.aicomponent/SKILL.md +38 -0
- package/skills/progress_bar.aicomponent/manifest.json +25 -0
- package/skills/progress_bar.aicomponent/ref/ProgressDisplay.ts +140 -0
- package/skills/references/xplatform.schema.json5 +31 -0
- package/skills/responsive_2d_layout.aicomponent/SKILL.md +161 -0
- package/skills/responsive_2d_layout.aicomponent/manifest.json +43 -0
- package/skills/responsive_2d_layout.aicomponent/ref/UiLayout.ts +56 -0
- package/skills/run_context_state.aicomponent/SKILL.md +54 -0
- package/skills/run_context_state.aicomponent/manifest.json +40 -0
- package/skills/run_context_state.aicomponent/ref/RunContextRuntime.ts +30 -0
- package/skills/score-fly.aicomponent/SKILL.md +31 -0
- package/skills/score-fly.aicomponent/manifest.json +21 -0
- package/skills/score-fly.aicomponent/ref/phaser.js +26 -0
- package/skills/score-fly.aicomponent/ref/playcanvas.js +28 -0
- package/skills/score_goal.aiconfig/SKILL.md +46 -0
- package/skills/score_goal.aiconfig/manifest.json +33 -0
- package/skills/screen-flash.aicomponent/SKILL.md +30 -0
- package/skills/screen-flash.aicomponent/manifest.json +20 -0
- package/skills/screen-flash.aicomponent/ref/phaser.js +48 -0
- package/skills/screen-shake.aicomponent/SKILL.md +30 -0
- package/skills/screen-shake.aicomponent/manifest.json +19 -0
- package/skills/screen-shake.aicomponent/ref/phaser.js +23 -0
- package/skills/screen-shake.aicomponent/ref/playcanvas.js +44 -0
- package/skills/screw_puzzle.aigameplay/SKILL.md +116 -0
- package/skills/screw_puzzle.aigameplay/manifest.json +164 -0
- package/skills/screw_puzzle.aigameplay/ref/pgs-schema.json +235 -0
- package/skills/screw_puzzle.aigameplay/ref/reducer.template.ts +213 -0
- package/skills/settings_state.aicomponent/SKILL.md +61 -0
- package/skills/settings_state.aicomponent/manifest.json +33 -0
- package/skills/settings_state.aicomponent/ref/SettingsManager.ts +130 -0
- package/skills/slide_out_to_tray_animation.aicomponent/SKILL.md +64 -0
- package/skills/slide_out_to_tray_animation.aicomponent/manifest.json +58 -0
- package/skills/slide_out_to_tray_animation.aicomponent/ref/AnimationManager.ts +164 -0
- package/skills/slide_out_to_tray_animation.aicomponent/ref/AnimationManager3D.ts +198 -0
- package/skills/slide_out_to_tray_animation.aicomponent/ref/BezierUtils.ts +59 -0
- package/skills/slot_machine.aigameplay/SKILL.md +119 -0
- package/skills/slot_machine.aigameplay/manifest.json +166 -0
- package/skills/slot_machine.aigameplay/ref/pgs-schema.json +212 -0
- package/skills/slot_machine.aigameplay/ref/reducer.template.ts +212 -0
- package/skills/sniper_shot.aigameplay/SKILL.md +84 -0
- package/skills/sniper_shot.aigameplay/manifest.json +153 -0
- package/skills/sniper_shot.aigameplay/ref/pgs-schema.json +211 -0
- package/skills/sniper_shot.aigameplay/ref/reducer.template.ts +211 -0
- package/skills/solitaire.aigameplay/SKILL.md +101 -0
- package/skills/solitaire.aigameplay/manifest.json +151 -0
- package/skills/solitaire.aigameplay/ref/pgs-schema.json +200 -0
- package/skills/solitaire.aigameplay/ref/reducer.template.ts +176 -0
- package/skills/sound-effects/SKILL.md +46 -0
- package/skills/sound_utils.aicomponent/SKILL.md +52 -0
- package/skills/sound_utils.aicomponent/manifest.json +30 -0
- package/skills/sound_utils.aicomponent/ref/SoundUtils.ts +29 -0
- package/skills/sprite-animation-2d.aicomponent/SKILL.md +45 -0
- package/skills/sprite-animation-2d.aicomponent/manifest.json +28 -0
- package/skills/sprite-animation-2d.aicomponent/ref/html5.js +83 -0
- package/skills/sprite-animation-2d.aicomponent/ref/phaser.js +38 -0
- package/skills/sprite-animation-2d.aicomponent/ref/playcanvas.js +67 -0
- package/skills/sprite_entity_renderer.aicomponent/SKILL.md +148 -0
- package/skills/sprite_entity_renderer.aicomponent/manifest.json +17 -0
- package/skills/sprite_entity_renderer.aicomponent/ref/SpriteEntityRenderer.ts +126 -0
- package/skills/success_sfx.aiaudio/SKILL.md +59 -0
- package/skills/success_sfx.aiaudio/manifest.json +45 -0
- package/skills/success_sfx.aiaudio/ref/success.mp3 +0 -0
- package/skills/tap_blast.aigameplay/SKILL.md +116 -0
- package/skills/tap_blast.aigameplay/manifest.json +153 -0
- package/skills/tap_blast.aigameplay/ref/pgs-schema.json +208 -0
- package/skills/tap_blast.aigameplay/ref/reducer.template.ts +202 -0
- package/skills/theme_state.aicomponent/SKILL.md +53 -0
- package/skills/theme_state.aicomponent/manifest.json +33 -0
- package/skills/theme_state.aicomponent/ref/ThemeManager.ts +174 -0
- package/skills/theme_switcher_build.aicomponent/SKILL.md +62 -0
- package/skills/theme_switcher_build.aicomponent/manifest.json +38 -0
- package/skills/theme_switcher_build.aicomponent/ref/theme-index.ts +8 -0
- package/skills/theme_variant.aiconfig/SKILL.md +78 -0
- package/skills/theme_variant.aiconfig/manifest.json +39 -0
- package/skills/theme_variant.aiconfig/ref/ExampleTheme/index.ts +16 -0
- package/skills/theme_variant.aiconfig/ref/ExampleTheme/levelEasy.json +141 -0
- package/skills/threejs.aicomponent/SKILL.md +422 -0
- package/skills/threejs.aicomponent/manifest.json +166 -0
- package/skills/threejs.aicomponent/ref/AssetLoader.ts +158 -0
- package/skills/threejs.aicomponent/ref/BaseScene.ts +88 -0
- package/skills/threejs.aicomponent/ref/GameConfig.ts +47 -0
- package/skills/threejs.aicomponent/ref/MainScene.ts +170 -0
- package/skills/threejs.aicomponent/ref/PreloaderScene.ts +93 -0
- package/skills/threejs.aicomponent/ref/SceneKeys.ts +6 -0
- package/skills/threejs.aicomponent/ref/SceneManager.ts +69 -0
- package/skills/threejs.aicomponent/ref/ViewportManager.ts +62 -0
- package/skills/threejs.aicomponent/ref/globals.d.ts +74 -0
- package/skills/threejs.aicomponent/ref/index.css +80 -0
- package/skills/threejs.aicomponent/ref/index.html +20 -0
- package/skills/threejs.aicomponent/ref/index.ts +117 -0
- package/skills/threejs.aicomponent/ref/main.ts +10 -0
- package/skills/threejs.aicomponent/ref/package.json +23 -0
- package/skills/threejs.aicomponent/ref/tsconfig.json +24 -0
- package/skills/threejs.aicomponent/ref/webpack.config.js +61 -0
- package/skills/time_clear_goal.aiconfig/SKILL.md +46 -0
- package/skills/time_clear_goal.aiconfig/manifest.json +32 -0
- package/skills/time_icon.aiimage/SKILL.md +58 -0
- package/skills/time_icon.aiimage/manifest.json +47 -0
- package/skills/time_icon.aiimage/ref/time.png +0 -0
- package/skills/time_icon.aiimage/ref/time.webp +0 -0
- package/skills/top_ui_bar.aicomponent/SKILL.md +45 -0
- package/skills/top_ui_bar.aicomponent/manifest.json +27 -0
- package/skills/top_ui_bar.aicomponent/ref/GameTopUI.ts +229 -0
- package/skills/tower_defence.aigameplay/SKILL.md +117 -0
- package/skills/tower_defence.aigameplay/manifest.json +175 -0
- package/skills/tower_defence.aigameplay/ref/pgs-schema.json +247 -0
- package/skills/tower_defence.aigameplay/ref/reducer.template.ts +239 -0
- package/skills/tray_container.aicomponent/SKILL.md +143 -0
- package/skills/tray_container.aicomponent/manifest.json +58 -0
- package/skills/tray_container.aicomponent/ref/TrayRenderer.ts +155 -0
- package/skills/tray_container.aicomponent/ref/TrayRenderer3D.ts +281 -0
- package/skills/tray_container.aicomponent/ref/TrayRendererHtmlOverlay.ts +228 -0
- package/skills/tutorial_overlay.aicomponent/SKILL.md +46 -0
- package/skills/tutorial_overlay.aicomponent/manifest.json +34 -0
- package/skills/tutorial_overlay.aicomponent/ref/TutorialManager.ts +367 -0
- package/skills/tween-animation-2d.aicomponent/SKILL.md +35 -0
- package/skills/tween-animation-2d.aicomponent/manifest.json +28 -0
- package/skills/tween-animation-2d.aicomponent/ref/phaser.js +49 -0
- package/skills/tween-animation-2d.aicomponent/ref/playcanvas.js +36 -0
- package/skills/typescript_module_patterns.aicomponent/SKILL.md +209 -0
- package/skills/typescript_module_patterns.aicomponent/manifest.json +28 -0
- package/skills/typescript_module_patterns.aicomponent/ref/globals.d.ts +31 -0
- package/skills/ui-transition.aicomponent/SKILL.md +33 -0
- package/skills/ui-transition.aicomponent/manifest.json +19 -0
- package/skills/ui-transition.aicomponent/ref/phaser.js +45 -0
- package/skills/ux_flow_spec.aiconfig/SKILL.md +82 -0
- package/skills/ux_flow_spec.aiconfig/manifest.json +39 -0
- package/skills/wave_difficulty.aiconfig/SKILL.md +46 -0
- package/skills/wave_difficulty.aiconfig/manifest.json +33 -0
- package/skills/webpack_build.aicomponent/SKILL.md +204 -0
- package/skills/webpack_build.aicomponent/manifest.json +29 -0
- package/skills/webpack_build.aicomponent/ref/package.json +16 -0
- package/skills/webpack_build.aicomponent/ref/webpack.config.js +53 -0
- package/skills/win_anim_sfx.aiaudio/SKILL.md +59 -0
- package/skills/win_anim_sfx.aiaudio/manifest.json +46 -0
- package/skills/win_anim_sfx.aiaudio/ref/win_anim.mp3 +0 -0
- package/skills/win_dot.aiimage/SKILL.md +58 -0
- package/skills/win_dot.aiimage/manifest.json +47 -0
- package/skills/win_dot.aiimage/ref/win_dot.png +0 -0
- package/skills/win_dot.aiimage/ref/win_dot.webp +0 -0
- package/skills/win_result_panel.aiimage/SKILL.md +58 -0
- package/skills/win_result_panel.aiimage/manifest.json +47 -0
- package/skills/win_result_panel.aiimage/ref/win.png +0 -0
- package/skills/win_result_panel.aiimage/ref/win.webp +0 -0
- package/skills/word_connect.aigameplay/SKILL.md +86 -0
- package/skills/word_connect.aigameplay/manifest.json +154 -0
- package/skills/word_connect.aigameplay/ref/pgs-schema.json +212 -0
- package/skills/word_connect.aigameplay/ref/reducer.template.ts +186 -0
- package/src/index.ts +10 -0
- package/src/skills.loader.ts +225 -0
- package/src/skills.types.ts +42 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "win_result_panel.aiimage",
|
|
4
|
+
"bundleType": "aiimage",
|
|
5
|
+
"category": "visual",
|
|
6
|
+
"mode": "generative",
|
|
7
|
+
"label": {
|
|
8
|
+
"zh": "胜利结果面板",
|
|
9
|
+
"en": "Win result panel"
|
|
10
|
+
},
|
|
11
|
+
"tags": [
|
|
12
|
+
"visual",
|
|
13
|
+
"win",
|
|
14
|
+
"success",
|
|
15
|
+
"result-panel",
|
|
16
|
+
"game-over"
|
|
17
|
+
],
|
|
18
|
+
"bindingRoles": [
|
|
19
|
+
"successFeedbackPanel"
|
|
20
|
+
],
|
|
21
|
+
"generation": {
|
|
22
|
+
"kind": "image",
|
|
23
|
+
"prompt": "winning celebration panel for a mobile game, bright and exciting, trophy or star icons, positive energy",
|
|
24
|
+
"aspectRatio": "1:1",
|
|
25
|
+
"model": "google/imagen-3.0-generate-002",
|
|
26
|
+
"referenceImage": "ref/win.png",
|
|
27
|
+
"platformSkill": "playcraft-image-generation"
|
|
28
|
+
},
|
|
29
|
+
"result": {
|
|
30
|
+
"outputFile": "ref/win.webp",
|
|
31
|
+
"format": "webp",
|
|
32
|
+
"constraints": {
|
|
33
|
+
"minWidth": 600,
|
|
34
|
+
"minHeight": 400
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"binding": {
|
|
38
|
+
"role": "successFeedbackPanel",
|
|
39
|
+
"target": "assets/win.webp",
|
|
40
|
+
"type": "image-asset-reference"
|
|
41
|
+
},
|
|
42
|
+
"files": {
|
|
43
|
+
"skill": "SKILL.md",
|
|
44
|
+
"asset": "ref/win.webp",
|
|
45
|
+
"assetPng": "ref/win.png"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: word_connect.aigameplay
|
|
3
|
+
description: 单词连线玩法封包 - 字母网格滑动拼词、8方向连接、词库验证的 PGS 实现,支持计时和消除模式
|
|
4
|
+
triggers: 单词,word,connect,连线,字母,letter,拼词,spelling,grid,网格,滑动,swipe,词库,dictionary,找词,wordsearch
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# word_connect.aigameplay
|
|
8
|
+
|
|
9
|
+
单词连线玩法封包。实现字母网格滑词玩法的 PGS (PlayCraft Gameplay Schema, 玩法定义规范) JSON 和 reducer,玩家在字母方格中滑动手指,连接相邻字母(支持 8 方向)拼出目标单词。
|
|
10
|
+
|
|
11
|
+
## Recipe
|
|
12
|
+
|
|
13
|
+
- **玩法类型**:word_connect(单词连线)
|
|
14
|
+
- **参考文件**:
|
|
15
|
+
- `ref/pgs-schema.json`:PGS (PlayCraft Gameplay Schema, 玩法定义规范) 规则骨架(entities、rules、algorithm、testCases)
|
|
16
|
+
- `ref/reducer.template.ts`:reducer 接口约束模板(`init` / `dispatch` / `getState` + 分步函数)
|
|
17
|
+
- **核心规则**:
|
|
18
|
+
- `gridSize`: 5(5×5 字母网格,可配置覆盖)
|
|
19
|
+
- `directions`: 8(上下左右和四个斜方向均可连接)
|
|
20
|
+
- `allowDiagonal`: true(允许斜方向连线)
|
|
21
|
+
- `eliminateFoundLetters`: false(找到单词后默认不消除字母,可配置)
|
|
22
|
+
- `timedMode`: false(默认无时限,可配置开启倒计时)
|
|
23
|
+
- `minWordLength`: 3(单词最短 3 个字母)
|
|
24
|
+
- **PGS Agent 操作流程**:
|
|
25
|
+
1. 读取 `ref/pgs-schema.json` 作为规则骨架起点
|
|
26
|
+
2. 读取 `ref/reducer.template.ts` 了解接口约束
|
|
27
|
+
3. 实现 `reducer.ts`,导出 `init(config)`、`dispatch(state, action)`、`getState(state)` 以及**全部分步函数**
|
|
28
|
+
4. 运行 `ref/pgs-schema.json` 中的所有 `testCases`,全部通过后才算完成
|
|
29
|
+
5. 更新 manifest 的 `generation.pgsVersion` 和 `result.outputFile`
|
|
30
|
+
- **可 fork 变体**:
|
|
31
|
+
- 消除模式:开启 `eliminateFoundLetters`,找到单词后字母消失并补充
|
|
32
|
+
- 计时竞速:开启 `timedMode`,设置 60 秒内找到尽量多单词
|
|
33
|
+
- 主题词库:替换 `wordList` 为特定主题单词(动物、颜色、食物等)
|
|
34
|
+
|
|
35
|
+
## Result
|
|
36
|
+
|
|
37
|
+
- **产物文件**:`reducer.ts`
|
|
38
|
+
- **格式**:TypeScript,导出 `init(config)`、`dispatch(state, action)`、`getState(state)` + 分步函数接口
|
|
39
|
+
- **验证**:所有 testCases 必须通过
|
|
40
|
+
|
|
41
|
+
## 渲染集成(⚠️ 场景层必读)
|
|
42
|
+
|
|
43
|
+
### 设计原则:逻辑与动画分离
|
|
44
|
+
|
|
45
|
+
reducer 提供两套接口:
|
|
46
|
+
|
|
47
|
+
| 接口 | 适用场景 | 特点 |
|
|
48
|
+
|------|---------|------|
|
|
49
|
+
| `dispatch()` | 无头测试、AI 模拟、跳过动画 | 一步到位,只返回最终状态 |
|
|
50
|
+
| 分步函数 | **渲染层/GameScene** | 逐步执行,实时反馈滑动路径与验证结果 |
|
|
51
|
+
|
|
52
|
+
### 分步函数返回值与动画映射
|
|
53
|
+
|
|
54
|
+
| 分步函数 | 返回值 | 场景层动画 |
|
|
55
|
+
|---------|--------|-----------|
|
|
56
|
+
| `startTrace(row, col)` | `{ path, letters }` | 高亮起始格子,开始绘制连线 |
|
|
57
|
+
| `extendTrace(row, col)` | `{ path, letters, valid }` | 实时绘制连线到新格子,高亮选中格 |
|
|
58
|
+
| `completeTrace()` | `{ word, isValid, score }` | 验证结果:有效则播放消除动画,无效则闪红清除 |
|
|
59
|
+
| `validateWord(letters, wordList)` | `boolean` | 内部校验,不直接驱动动画 |
|
|
60
|
+
| `markWordFound(word, path)` | `{ foundWords, score }` | 标记格子为已找到,更新单词列表 UI |
|
|
61
|
+
| `checkWin()` | `{ win }` | 触发胜利动画和统计面板 |
|
|
62
|
+
|
|
63
|
+
## Binding
|
|
64
|
+
|
|
65
|
+
- **Binding Role**:`gameplayRule`
|
|
66
|
+
- **挂载目标**:`game/gameplay/word_connect/reducer.ts`
|
|
67
|
+
- **引用类型**:`gameplay-module-reference`
|
|
68
|
+
- **接口契约**:`init(config)` / `dispatch(action)` / `getState()` / `startTrace()` / `extendTrace()` / `completeTrace()` / `validateWord()` / `markWordFound()` / `checkWin()`
|
|
69
|
+
|
|
70
|
+
## Skill Definition
|
|
71
|
+
|
|
72
|
+
tools:
|
|
73
|
+
- bash
|
|
74
|
+
- write
|
|
75
|
+
- read
|
|
76
|
+
prompt_extension: |
|
|
77
|
+
You are implementing a word-connect grid gameplay module following the PGS specification.
|
|
78
|
+
Write the PGS JSON with entities (grid, word_list, found_words, current_path, score, timer), rules, algorithm, and testCases.
|
|
79
|
+
Implement the reducer.ts with:
|
|
80
|
+
- init/dispatch/getState (一体化接口,用于测试)
|
|
81
|
+
- startTrace/extendTrace/completeTrace/validateWord/markWordFound/checkWin (分步函数,用于渲染层驱动)
|
|
82
|
+
Adjacency check: a cell is adjacent if |dr| <= 1 && |dc| <= 1 and not the same cell.
|
|
83
|
+
Path validation: no cell can appear twice in the same trace.
|
|
84
|
+
Word validation: joined letters must exist in wordList (case-insensitive).
|
|
85
|
+
Run the testCases to verify the logic before finalizing.
|
|
86
|
+
Apply the Binding to wire the reducer into the game's gameplay module path.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "word_connect.aigameplay",
|
|
4
|
+
"bundleType": "aigameplay",
|
|
5
|
+
"category": "gameplay",
|
|
6
|
+
"mode": "fixed",
|
|
7
|
+
"label": {
|
|
8
|
+
"zh": "单词连线玩法",
|
|
9
|
+
"en": "Word Connect gameplay"
|
|
10
|
+
},
|
|
11
|
+
"tags": [
|
|
12
|
+
"gameplay",
|
|
13
|
+
"word",
|
|
14
|
+
"puzzle",
|
|
15
|
+
"grid",
|
|
16
|
+
"casual",
|
|
17
|
+
"education"
|
|
18
|
+
],
|
|
19
|
+
"bindingRoles": [
|
|
20
|
+
"gameplayRule"
|
|
21
|
+
],
|
|
22
|
+
"imports": [
|
|
23
|
+
{
|
|
24
|
+
"slot": "engine",
|
|
25
|
+
"pinAtomId": "phaser.aicomponent",
|
|
26
|
+
"edgeKind": "requires",
|
|
27
|
+
"bindAs": "engine"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"slot": "bgMusic",
|
|
31
|
+
"description": "背景循环音乐",
|
|
32
|
+
"bindAs": "bgm",
|
|
33
|
+
"required": false,
|
|
34
|
+
"edgeKind": "compatibleWith",
|
|
35
|
+
"matchBindingRoles": [
|
|
36
|
+
"bgMusic"
|
|
37
|
+
],
|
|
38
|
+
"allowedBundleTypes": [
|
|
39
|
+
"aiaudio"
|
|
40
|
+
],
|
|
41
|
+
"constraints": {
|
|
42
|
+
"loop": true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"slot": "background",
|
|
47
|
+
"description": "游戏背景图",
|
|
48
|
+
"bindAs": "bg",
|
|
49
|
+
"required": false,
|
|
50
|
+
"edgeKind": "compatibleWith",
|
|
51
|
+
"matchBindingRoles": [
|
|
52
|
+
"backgroundTexture"
|
|
53
|
+
],
|
|
54
|
+
"allowedBundleTypes": [
|
|
55
|
+
"aiimage"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"slot": "tutorial",
|
|
60
|
+
"description": "新手引导浮层",
|
|
61
|
+
"bindAs": "tutorial",
|
|
62
|
+
"required": false,
|
|
63
|
+
"edgeKind": "compatibleWith",
|
|
64
|
+
"matchBindingRoles": [
|
|
65
|
+
"tutorialOverlay"
|
|
66
|
+
],
|
|
67
|
+
"allowedBundleTypes": [
|
|
68
|
+
"aicomponent"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"slot": "winPanel",
|
|
73
|
+
"description": "通关反馈面板视觉",
|
|
74
|
+
"bindAs": "winPanel",
|
|
75
|
+
"required": false,
|
|
76
|
+
"edgeKind": "compatibleWith",
|
|
77
|
+
"matchBindingRoles": [
|
|
78
|
+
"successFeedbackPanel"
|
|
79
|
+
],
|
|
80
|
+
"allowedBundleTypes": [
|
|
81
|
+
"aiimage"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"slot": "losePanel",
|
|
86
|
+
"description": "失败反馈面板视觉",
|
|
87
|
+
"bindAs": "losePanel",
|
|
88
|
+
"required": false,
|
|
89
|
+
"edgeKind": "compatibleWith",
|
|
90
|
+
"matchBindingRoles": [
|
|
91
|
+
"failFeedbackPanel"
|
|
92
|
+
],
|
|
93
|
+
"allowedBundleTypes": [
|
|
94
|
+
"aiimage"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"slot": "endScreen",
|
|
99
|
+
"description": "可玩广告结算屏(含 CTA 按钮)",
|
|
100
|
+
"bindAs": "endScreen",
|
|
101
|
+
"required": false,
|
|
102
|
+
"edgeKind": "compatibleWith",
|
|
103
|
+
"matchBindingRoles": [
|
|
104
|
+
"playableEndScreenLayout"
|
|
105
|
+
],
|
|
106
|
+
"allowedBundleTypes": [
|
|
107
|
+
"aicomponent"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"generation": {
|
|
112
|
+
"kind": "pgs",
|
|
113
|
+
"pgsVersion": "1.0",
|
|
114
|
+
"gameplayType": "word_connect",
|
|
115
|
+
"rules": {
|
|
116
|
+
"gridSize": 5,
|
|
117
|
+
"directions": 8,
|
|
118
|
+
"allowDiagonal": true,
|
|
119
|
+
"eliminateFoundLetters": false,
|
|
120
|
+
"timedMode": false,
|
|
121
|
+
"minWordLength": 3
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"result": {
|
|
125
|
+
"outputFile": "reducer.ts",
|
|
126
|
+
"format": "typescript",
|
|
127
|
+
"constraints": {
|
|
128
|
+
"testCasesMustPass": true
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"binding": {
|
|
132
|
+
"role": "gameplayRule",
|
|
133
|
+
"target": "game/gameplay/word_connect/reducer.ts",
|
|
134
|
+
"type": "gameplay-module-reference",
|
|
135
|
+
"constraints": {
|
|
136
|
+
"interface": [
|
|
137
|
+
"init(config)",
|
|
138
|
+
"dispatch(action)",
|
|
139
|
+
"getState()",
|
|
140
|
+
"startTrace(state, row, col)",
|
|
141
|
+
"extendTrace(state, row, col)",
|
|
142
|
+
"completeTrace(state)",
|
|
143
|
+
"validateWord(letters, wordList)",
|
|
144
|
+
"markWordFound(state, word, path)",
|
|
145
|
+
"checkWin(state)"
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"files": {
|
|
150
|
+
"skill": "SKILL.md",
|
|
151
|
+
"pgsSchema": "ref/pgs-schema.json",
|
|
152
|
+
"reducerTemplate": "ref/reducer.template.ts"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "PGS (PlayCraft Gameplay Schema) 参考骨架 - 单词连线玩法。Agent 以此为起点编写或 fork 玩法规则。",
|
|
3
|
+
"version": "1.0",
|
|
4
|
+
"gameplayType": "word_connect",
|
|
5
|
+
"entities": {
|
|
6
|
+
"grid": {
|
|
7
|
+
"type": "2d-grid",
|
|
8
|
+
"description": "字母网格",
|
|
9
|
+
"fields": {
|
|
10
|
+
"rows": { "type": "number", "default": 5 },
|
|
11
|
+
"cols": { "type": "number", "default": 5 },
|
|
12
|
+
"cells": {
|
|
13
|
+
"type": "cell[][]",
|
|
14
|
+
"description": "二维数组,每个 cell = { letter: string, found: boolean },found 表示已作为某单词的一部分"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"wordList": {
|
|
19
|
+
"type": "string[]",
|
|
20
|
+
"description": "目标单词列表(全大写),玩家需要找出其中所有单词"
|
|
21
|
+
},
|
|
22
|
+
"foundWords": {
|
|
23
|
+
"type": "string[]",
|
|
24
|
+
"description": "已找到的单词列表"
|
|
25
|
+
},
|
|
26
|
+
"currentPath": {
|
|
27
|
+
"type": "cell-path",
|
|
28
|
+
"description": "当前正在滑动的路径",
|
|
29
|
+
"fields": {
|
|
30
|
+
"cells": { "type": "array", "item": "{ row: number, col: number }", "description": "路径经过的格子(按顺序)" },
|
|
31
|
+
"letters": { "type": "string", "description": "路径格子组成的字母串(实时更新)" }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"score": {
|
|
35
|
+
"type": "counter",
|
|
36
|
+
"initial": 0,
|
|
37
|
+
"description": "当前得分,每找到一个单词得 word.length * 10 分"
|
|
38
|
+
},
|
|
39
|
+
"timer": {
|
|
40
|
+
"type": "counter",
|
|
41
|
+
"description": "剩余时间(ms,仅 timedMode=true 时有效)"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"rules": {
|
|
45
|
+
"start_trace": {
|
|
46
|
+
"description": "玩家按下格子,开始连线路径",
|
|
47
|
+
"effect": "currentPath = { cells: [{ row, col }], letters: grid[row][col].letter }"
|
|
48
|
+
},
|
|
49
|
+
"extend_trace": {
|
|
50
|
+
"description": "玩家滑动到相邻格子,延伸路径",
|
|
51
|
+
"conditions": [
|
|
52
|
+
"目标格子与路径末尾格子相邻(|dr| ≤ 1 && |dc| ≤ 1,不含自身)",
|
|
53
|
+
"目标格子不在 currentPath.cells 中(同一路径不重复使用)"
|
|
54
|
+
],
|
|
55
|
+
"effect": "currentPath.cells.push({ row, col }); currentPath.letters += grid[row][col].letter"
|
|
56
|
+
},
|
|
57
|
+
"complete_word": {
|
|
58
|
+
"description": "玩家抬起手指,验证当前路径组成的单词",
|
|
59
|
+
"steps": [
|
|
60
|
+
"1. word = currentPath.letters(大写)",
|
|
61
|
+
"2. 若 word.length < minWordLength:视为无效,清除路径",
|
|
62
|
+
"3. 若 word 不在 wordList 中 且不在字典(若配置字典模式):无效,清除路径",
|
|
63
|
+
"4. 若 word 已在 foundWords 中:无效,清除路径",
|
|
64
|
+
"5. 否则:有效,markWordFound(word, path)"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"valid_word_reward": {
|
|
68
|
+
"description": "找到有效单词后奖励",
|
|
69
|
+
"effect": "foundWords.push(word); score += word.length * 10; 对应格子标记 found=true(eliminateFoundLetters 模式下移除并补充)"
|
|
70
|
+
},
|
|
71
|
+
"win_check": {
|
|
72
|
+
"description": "检查是否找到所有目标单词",
|
|
73
|
+
"condition": "foundWords.length >= wordList.length"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"algorithm": {
|
|
77
|
+
"description": "主流程:trace → validate → reward → win",
|
|
78
|
+
"steps": [
|
|
79
|
+
"1. 玩家触摸格子:startTrace(row, col)",
|
|
80
|
+
"2. 玩家滑动:extendTrace(row, col),实时检查相邻性和路径唯一性",
|
|
81
|
+
"3. 玩家抬手:completeTrace()",
|
|
82
|
+
" 3a. validateWord(currentPath.letters, wordList)",
|
|
83
|
+
" 3b. 有效:markWordFound(word, path),更新 score,检查 checkWin()",
|
|
84
|
+
" 3c. 无效:清除 currentPath",
|
|
85
|
+
"4. (计时模式)每帧:timer -= deltaMs,timer ≤ 0 且未胜利则 gameOver"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"winCondition": {
|
|
89
|
+
"type": "all_target_words_found",
|
|
90
|
+
"description": "找到 wordList 中的所有单词"
|
|
91
|
+
},
|
|
92
|
+
"loseCondition": {
|
|
93
|
+
"type": "timer_expired",
|
|
94
|
+
"description": "(计时模式)时间耗尽前未找到所有目标单词"
|
|
95
|
+
},
|
|
96
|
+
"testCases": [
|
|
97
|
+
{
|
|
98
|
+
"id": "tc_valid_word_found",
|
|
99
|
+
"description": "找到有效单词:路径拼出 wordList 中的单词,得分增加",
|
|
100
|
+
"initialState": {
|
|
101
|
+
"grid": {
|
|
102
|
+
"rows": 3, "cols": 3,
|
|
103
|
+
"cells": [
|
|
104
|
+
[{ "letter": "C", "found": false }, { "letter": "A", "found": false }, { "letter": "T", "found": false }],
|
|
105
|
+
[{ "letter": "D", "found": false }, { "letter": "O", "found": false }, { "letter": "G", "found": false }],
|
|
106
|
+
[{ "letter": "X", "found": false }, { "letter": "Y", "found": false }, { "letter": "Z", "found": false }]
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"wordList": ["CAT", "DOG"],
|
|
110
|
+
"foundWords": [],
|
|
111
|
+
"currentPath": { "cells": [], "letters": "" },
|
|
112
|
+
"score": 0
|
|
113
|
+
},
|
|
114
|
+
"actions": [
|
|
115
|
+
{ "type": "startTrace", "row": 0, "col": 0 },
|
|
116
|
+
{ "type": "extendTrace", "row": 0, "col": 1 },
|
|
117
|
+
{ "type": "extendTrace", "row": 0, "col": 2 },
|
|
118
|
+
{ "type": "completeTrace" }
|
|
119
|
+
],
|
|
120
|
+
"expectedState": {
|
|
121
|
+
"foundWords": ["CAT"],
|
|
122
|
+
"score": 30,
|
|
123
|
+
"currentPath.cells.length": 0,
|
|
124
|
+
"win": false
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": "tc_invalid_word_rejected",
|
|
129
|
+
"description": "无效单词:路径拼出的字母不在 wordList 中,路径被清除,分数不变",
|
|
130
|
+
"initialState": {
|
|
131
|
+
"grid": {
|
|
132
|
+
"rows": 3, "cols": 3,
|
|
133
|
+
"cells": [
|
|
134
|
+
[{ "letter": "X", "found": false }, { "letter": "Y", "found": false }, { "letter": "Z", "found": false }],
|
|
135
|
+
[{ "letter": "D", "found": false }, { "letter": "O", "found": false }, { "letter": "G", "found": false }],
|
|
136
|
+
[{ "letter": "C", "found": false }, { "letter": "A", "found": false }, { "letter": "T", "found": false }]
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"wordList": ["CAT", "DOG"],
|
|
140
|
+
"foundWords": [],
|
|
141
|
+
"currentPath": { "cells": [], "letters": "" },
|
|
142
|
+
"score": 10
|
|
143
|
+
},
|
|
144
|
+
"actions": [
|
|
145
|
+
{ "type": "startTrace", "row": 0, "col": 0 },
|
|
146
|
+
{ "type": "extendTrace", "row": 0, "col": 1 },
|
|
147
|
+
{ "type": "extendTrace", "row": 0, "col": 2 },
|
|
148
|
+
{ "type": "completeTrace" }
|
|
149
|
+
],
|
|
150
|
+
"expectedState": {
|
|
151
|
+
"foundWords": [],
|
|
152
|
+
"score": 10,
|
|
153
|
+
"currentPath.cells.length": 0
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"id": "tc_all_words_found_win",
|
|
158
|
+
"description": "全部找到:找到所有目标单词后游戏胜利",
|
|
159
|
+
"initialState": {
|
|
160
|
+
"grid": {
|
|
161
|
+
"rows": 3, "cols": 3,
|
|
162
|
+
"cells": [
|
|
163
|
+
[{ "letter": "C", "found": false }, { "letter": "A", "found": false }, { "letter": "T", "found": false }],
|
|
164
|
+
[{ "letter": "D", "found": false }, { "letter": "O", "found": false }, { "letter": "G", "found": false }],
|
|
165
|
+
[{ "letter": "X", "found": false }, { "letter": "Y", "found": false }, { "letter": "Z", "found": false }]
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
"wordList": ["CAT", "DOG"],
|
|
169
|
+
"foundWords": ["CAT"],
|
|
170
|
+
"currentPath": { "cells": [], "letters": "" },
|
|
171
|
+
"score": 30
|
|
172
|
+
},
|
|
173
|
+
"actions": [
|
|
174
|
+
{ "type": "startTrace", "row": 1, "col": 0 },
|
|
175
|
+
{ "type": "extendTrace", "row": 1, "col": 1 },
|
|
176
|
+
{ "type": "extendTrace", "row": 1, "col": 2 },
|
|
177
|
+
{ "type": "completeTrace" }
|
|
178
|
+
],
|
|
179
|
+
"expectedState": {
|
|
180
|
+
"foundWords": ["CAT", "DOG"],
|
|
181
|
+
"score": 60,
|
|
182
|
+
"win": true,
|
|
183
|
+
"gameOver": false
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"id": "tc_non_adjacent_rejected",
|
|
188
|
+
"description": "非相邻格子:尝试滑向不相邻的格子,路径不延伸",
|
|
189
|
+
"initialState": {
|
|
190
|
+
"grid": {
|
|
191
|
+
"rows": 3, "cols": 3,
|
|
192
|
+
"cells": [
|
|
193
|
+
[{ "letter": "C", "found": false }, { "letter": "A", "found": false }, { "letter": "T", "found": false }],
|
|
194
|
+
[{ "letter": "D", "found": false }, { "letter": "O", "found": false }, { "letter": "G", "found": false }],
|
|
195
|
+
[{ "letter": "X", "found": false }, { "letter": "Y", "found": false }, { "letter": "Z", "found": false }]
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
"wordList": ["CAT"],
|
|
199
|
+
"foundWords": [],
|
|
200
|
+
"currentPath": { "cells": [{ "row": 0, "col": 0 }], "letters": "C" },
|
|
201
|
+
"score": 0
|
|
202
|
+
},
|
|
203
|
+
"actions": [
|
|
204
|
+
{ "type": "extendTrace", "row": 2, "col": 2 }
|
|
205
|
+
],
|
|
206
|
+
"expectedState": {
|
|
207
|
+
"currentPath.cells.length": 1,
|
|
208
|
+
"currentPath.letters": "C"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
}
|