diff --git a/expansion-packs/bmad-wechat-mini-game-dev/checklists/game-design-checklist.md b/expansion-packs/bmad-wechat-mini-game-dev/checklists/game-design-checklist.md index 8b5baaf9..e6c765e6 100644 --- a/expansion-packs/bmad-wechat-mini-game-dev/checklists/game-design-checklist.md +++ b/expansion-packs/bmad-wechat-mini-game-dev/checklists/game-design-checklist.md @@ -81,15 +81,16 @@ - [ ] **UI Conventions:** The UI follows WeChat's design guidelines and feels native to the platform. - [ ] **Authorization Prompts:** User authorization for login, user info, etc., is handled gracefully and triggered by user interaction (e.g., a button press). - [ ] **Navigation:** The game's navigation is intuitive and doesn't conflict with WeChat's native navigation gestures. +- [ ] **Aspect Ratio:** The UI is responsive and handles various screen aspect ratios gracefully. ### Social Features - [ ] **Sharing:** - [ ] Share triggers are well-placed and contextually relevant. - - [ ] Share content (images, titles) is engaging. + - [ ] Share content (images, titles) is engaging and customized. - [ ] Rewards for sharing are clearly communicated and correctly implemented. - [ ] **Leaderboards (OpenDataContext):** - - [ ] The OpenDataContext is implemented correctly and performs well. + - [ ] The OpenDataContext is implemented correctly and performs well, even with many friends. - [ ] Leaderboard data is displayed clearly and updates as expected. - [ ] **Inviting Friends:** - [ ] The invitation flow is simple and intuitive. @@ -98,20 +99,21 @@ ### Platform Limitations and Performance - [ ] **Package Size:** The initial package size is under the 4MB limit. -- [ ] **Subpackages:** Subpackages are used effectively for non-essential assets. -- [ ] **Performance:** The game meets its performance targets on a range of target devices. -- [ ] **API Usage:** The game uses WeChat APIs correctly and handles potential failures gracefully. +- [ ] **Subpackages:** Subpackages are used effectively for non-essential assets, and preloading is implemented where necessary. +- [ ] **Performance:** The game meets its performance targets (e.g., 60 FPS) on a range of target devices. +- [ ] **API Usage:** The game uses WeChat APIs correctly and handles potential failures and version differences gracefully. +- [ ] **Privacy Compliance:** All user data requests are compliant with the latest WeChat privacy policy. ### Monetization - [ ] **Rewarded Ads:** - [ ] Ad placements are logical and don't feel overly intrusive. - - [ ] The rewards for watching ads are valuable to the player. + - [ ] The rewards for watching ads are valuable and clearly communicated to the player. - [ ] **Banner Ads:** - - [ ] Banner ads don't obstruct important UI elements. + - [ ] Banner ads don't obstruct important UI elements or gameplay. - [ ] **In-App Purchases (IAP):** - - [ ] The IAP flow is smooth and secure. - - [ ] The value proposition for IAPs is clear to the player. + - [ ] The IAP flow is smooth, secure, and easy to understand. + - [ ] The value proposition for all IAPs is clear and compelling to the player. ## Technical Implementation Readiness diff --git a/expansion-packs/bmad-wechat-mini-game-dev/data/bmad-kb.md b/expansion-packs/bmad-wechat-mini-game-dev/data/bmad-kb.md index e6b87904..2488e990 100644 --- a/expansion-packs/bmad-wechat-mini-game-dev/data/bmad-kb.md +++ b/expansion-packs/bmad-wechat-mini-game-dev/data/bmad-kb.md @@ -148,37 +148,71 @@ mini-game-project/ ## Game Development Team Roles -### Game Designer (Alex) +### `game-po` (Product Owner) +- **Primary Focus**: Game vision, strategy, and profitability. +- **Key Outputs**: Project Brief, prioritized feature backlog, monetization strategy. +- **Specialties**: Market research, user-centered design, business goals. -- **Primary Focus**: Game mechanics, player experience, design documentation -- **Key Outputs**: Game Brief, Game Design Document, Level Design Framework -- **Specialties**: Brainstorming, game balance, player psychology, creative direction +### `game-pm` (Project Manager) +- **Primary Focus**: Project execution, timelines, and resource management. +- **Key Outputs**: Project plan, risk assessment, status reports. +- **Specialties**: Agile/Scrum methodologies, dependency management. -### Game Developer (Maya) +### `game-designer` +- **Primary Focus**: Game mechanics, player experience, and design documentation. +- **Key Outputs**: Game Design Document (GDD), level design framework. +- **Specialties**: Brainstorming, game balance, player psychology. -- **Primary Focus**: WeChat Mini-Game implementation, technical excellence, performance -- **Key Outputs**: Working game features, optimized code, technical architecture -- **Specialties**: JavaScript/TypeScript, WeChat Mini-Game APIs, performance optimization +### `game-orchestrator` +- **Primary Focus**: Technical vision and architecture. +- **Key Outputs**: Game Architecture Document, technical standards. +- **Specialties**: System design, performance optimization, WeChat platform architecture. -### Game Scrum Master (Jordan) +### `game-sm` (Scrum Master) +- **Primary Focus**: Story creation, development planning, and agile process facilitation. +- **Key Outputs**: Detailed implementation stories, sprint planning. +- **Specialties**: Story breakdown, developer handoffs, process optimization. -- **Primary Focus**: Story creation, development planning, agile process -- **Key Outputs**: Detailed implementation stories, sprint planning, quality assurance -- **Specialties**: Story breakdown, developer handoffs, process optimization +### `game-developer` +- **Primary Focus**: WeChat Mini-Game implementation, code quality, and performance. +- **Key Outputs**: Working game features, optimized code. +- **Specialties**: JavaScript/TypeScript, WeChat Mini-Game APIs. -## WeChat Mini-Game Platform Considerations +### `game-qa` (Quality Assurance) +- **Primary Focus**: Testing, bug detection, and quality gates. +- **Key Outputs**: Test plans, bug reports, performance analysis. +- **Specialties**: Manual and automated testing, performance profiling. -### API Usage +### `game-analyst` +- **Primary Focus**: Data analysis and player behavior insights. +- **Key Outputs**: Analytics reports, A/B test results, retention analysis. +- **Specialties**: SQL, data visualization, game analytics KPIs. -- Correctly use `wx.login`, `wx.getUserInfo`, etc. -- Implement sharing and invitation features using `wx.shareAppMessage`. -- Use Open Data Context for leaderboards and other social features. +## Agent-Specific WeChat Platform Considerations -### Performance and Limitations +### `game-po` +- **Focus**: Understand the WeChat ecosystem to inform the product strategy. +- **Actions**: Analyze successful WeChat mini-games, define a monetization strategy that leverages WeChat's ad and IAP APIs, and prioritize social features that drive engagement on the platform. -- Be mindful of the package size limit. Use subpackages for larger games. -- Optimize image and audio assets to reduce file size. -- Understand the limitations of the rendering context (e.g., no WebGL for 2D canvas). +### `game-designer` +- **Focus**: Design games that feel native to the WeChat platform. +- **Actions**: Incorporate WeChat's social features (sharing, leaderboards) into the core game loop, design UI that works well with WeChat's navigation, and create mechanics that are suited for short, mobile play sessions. + +### `game-orchestrator` +- **Focus**: Design a technical architecture that is optimized for the WeChat Mini-Game runtime. +- **Actions**: Plan for the 4MB initial package size limit by designing a subpackage strategy, choose the right data storage solution (local storage vs. cloud database), and design the integration with the OpenDataContext. + +### `game-developer` +- **Focus**: Implement features using WeChat's specific APIs and best practices. +- **Actions**: Use the `wx.login` API for authentication, implement the ad APIs for monetization, use the OpenDataContext for social features, and write efficient code that performs well on mobile devices. + +### `game-qa` +- **Focus**: Test the game on a wide range of devices and network conditions. +- **Actions**: Use the WeChat DevTools for debugging and performance profiling, test on both iOS and Android devices, and specifically test the functionality of social sharing and ad placements. + +### `game-analyst` +- **Focus**: Use WeChat's analytics tools to gather insights. +- **Actions**: Track key metrics like retention, session length, and conversion rates using the platform's built-in analytics or third-party tools. Analyze the performance of social features and monetization strategies. ### Success Metrics for WeChat Mini-Games diff --git a/expansion-packs/bmad-wechat-mini-game-dev/templates/game-architecture-tmpl.yaml b/expansion-packs/bmad-wechat-mini-game-dev/templates/game-architecture-tmpl.yaml index 9878dfba..8726ca0c 100644 --- a/expansion-packs/bmad-wechat-mini-game-dev/templates/game-architecture-tmpl.yaml +++ b/expansion-packs/bmad-wechat-mini-game-dev/templates/game-architecture-tmpl.yaml @@ -197,11 +197,16 @@ sections: **Key APIs:** - `wx.shareAppMessage` for sharing game content with friends. - - **OpenDataContext:** For displaying leaderboards and other social data. + - **OpenDataContext:** For displaying leaderboards and other social data. The OpenDataContext runs in an isolated environment. Communication is handled via `wx.getOpenDataContext().postMessage()`. + + **OpenDataContext Structure:** + - A separate `opendata` directory with its own `project.config.json` and `index.js`. + - `index.js` will listen for messages (e.g., `{command: 'updateScore', score: 100}`) and render the leaderboard to a shared canvas. **Files to Create:** - `js/wechat-social.js` - - `opendata/index.js` (for OpenDataContext logic) + - `opendata/index.js` + - `opendata/project.config.json` - id: wechat-cloud-services title: WeChat Cloud Services @@ -209,26 +214,54 @@ sections: **Purpose:** Utilize WeChat's cloud capabilities for backend services. **Services to Use:** - - **Cloud Functions:** For serverless backend logic (e.g., handling payments, validating data). + - **Cloud Functions:** For serverless backend logic. - **Cloud Database:** For storing user data and game state. - - **Cloud Storage:** For storing user-generated content or large assets. - **Architecture:** - - Define the structure of the cloud database collections. - - List the cloud functions to be created and their purposes. + **Example Architecture:** + - **Database Collections:** + - `users`: `{ _id: 'openid', nickname: 'string', avatarUrl: 'string', highScore: 'number' }` + - `scores`: `{ _id: 'uuid', openid: 'string', score: 'number', timestamp: 'date' }` + - **Cloud Functions:** + - `onLogin`: Takes a login code, gets the user's `openid`, and returns user data from the `users` collection. + - `saveScore`: Saves a new score to the `scores` collection and updates the user's `highScore` in the `users` collection. - id: subpackage-planning title: Subpackage Planning template: | **Purpose:** Manage the game's package size and optimize loading times. - **Main Package:** - - Core game logic, essential assets, and the initial loading screen. + **Main Package (under 4MB):** + - Core game logic (`js/` directory). + - Initial loading screen assets. + - Essential UI components. **Subpackages:** - - **package-levels:** Contains assets and data for additional levels. - - **package-high-res-assets:** Contains high-resolution assets for high-end devices. - - **package-extra-features:** Contains code for non-essential features. + - **`packageLevels`**: Contains assets and data for levels 1-10. + - **`packageBosses`**: Contains assets and logic for boss battles. + + **Preloading:** + - Use `wx.loadSubpackage()` to preload subpackages in the background during gameplay to ensure smooth transitions. + + **Example `game.json` configuration:** + ```json + "subpackages": [ + { + "name": "packageLevels", + "root": "package-levels/", + "pages": [ + "pages/level-1/index", + "pages/level-2/index" + ] + }, + { + "name": "packageBosses", + "root": "package-bosses/", + "pages": [ + "pages/boss-1/index" + ] + } + ] + ``` - id: audio-system title: Audio System template: | diff --git a/expansion-packs/bmad-wechat-mini-game-dev/templates/game-design-doc-tmpl.yaml b/expansion-packs/bmad-wechat-mini-game-dev/templates/game-design-doc-tmpl.yaml index 973be406..7a4536a6 100644 --- a/expansion-packs/bmad-wechat-mini-game-dev/templates/game-design-doc-tmpl.yaml +++ b/expansion-packs/bmad-wechat-mini-game-dev/templates/game-design-doc-tmpl.yaml @@ -182,30 +182,38 @@ sections: **Features:** - **Leaderboards:** - - Type: (e.g., Friends, Global) - - Update Frequency: (e.g., Weekly, All-time) - - Implementation: Via OpenDataContext + - **Type:** Friends-only leaderboard. + - **Update Frequency:** Weekly, resetting every Monday at midnight. + - **Display:** Shows the top 10 friends, plus the player's own rank. + - **Implementation:** Via OpenDataContext. - **Sharing:** - - Share Triggers: (e.g., New high score, Unlocked achievement) - - Share Content: Customizable images and text. - - Rewards: (e.g., In-game currency for successful shares) + - **Share Triggers:** New high score, unlocking a rare item. + - **Share Content:** "I just scored {{score}} in {{game_title}}! Can you beat my score?" + - **Rewards:** 100 Gold for each successful share (friend clicks the link). - **Inviting Friends:** - - Incentive: (e.g., Reward for each friend who installs the game) + - **Incentive:** 500 Gold for each friend who installs the game and completes the tutorial. - id: monetization-design title: Monetization Design template: | - **Purpose:** Outline the strategy for generating revenue. + **Purpose:** Outline the strategy for generating revenue through a mix of ads and in-app purchases. **Methods:** - **Rewarded Video Ads:** - - Placement: (e.g., Continue after losing, Get extra currency) - - Frequency Cap: (e.g., 5 per day) + - **Placement:** + - "Continue Game": Watch an ad to continue a game after losing (once per game). + - "Get Daily Bonus": Watch an ad to receive a daily bonus of 200 Gold. + - **Frequency Cap:** 5 rewarded ads per player per day. - **Banner Ads:** - - Placement: (e.g., Bottom of the menu screen) + - **Placement:** Bottom of the main menu and settings screens. - **In-App Purchases (IAP):** - - Currency: (e.g., Gems) - - Items for Sale: (e.g., Cosmetics, Power-ups, Ad removal) + - **Virtual Currency:** + - **Gems:** Premium currency, purchased with real money. + - **Gold:** Soft currency, earned through gameplay and watching ads. + - **Items for Sale:** + - **Cosmetics:** Character skins, custom UI themes (purchased with Gems). + - **Power-ups:** "Coin Doubler" (permanent, purchased with Gems), "Extra Life" (consumable, purchased with Gold). + - **Ad Removal:** One-time purchase to permanently remove banner ads (purchased with real money). - id: technical-specifications title: Technical Specifications diff --git a/expansion-packs/bmad-wechat-mini-game-dev/workflows/game-dev-greenfield.yaml b/expansion-packs/bmad-wechat-mini-game-dev/workflows/game-dev-greenfield.yaml index 7bd35960..c620fa7a 100644 --- a/expansion-packs/bmad-wechat-mini-game-dev/workflows/game-dev-greenfield.yaml +++ b/expansion-packs/bmad-wechat-mini-game-dev/workflows/game-dev-greenfield.yaml @@ -26,48 +26,63 @@ workflow: - competitive_analysis - technical_research notes: "Create detailed Game Design Document using game-design-doc-tmpl. Defines all gameplay mechanics, progression, and technical requirements. SAVE OUTPUT: Copy final game-design-doc.md to your project's docs/design/ folder." - - agent: solution-architect + - agent: game-qa + validates: gdd_testability + requires: game-design-doc.md + optional_steps: + - risk_assessment + notes: "(Optional but Recommended) The QA agent reviews the GDD for testability, clarity, and potential performance risks." + - agent: game-orchestrator creates: game-architecture.md - requires: - - game-design-doc.md + requires: game-design-doc.md optional_steps: - technical_research_prompt - performance_analysis - platform_research notes: "Create comprehensive technical architecture using game-architecture-tmpl. Defines WeChat Mini-Game systems, performance optimization, and code structure. SAVE OUTPUT: Copy final game-architecture.md to your project's docs/architecture/ folder." - - agent: game-designer - validates: design_consistency - requires: all_design_documents + - agent: game-pm + creates: project-plan.md + requires: + - game-design-doc.md + - game-architecture.md + notes: "The PM creates a high-level project plan, including timelines, milestones, and epics, based on the GDD and architecture." + - agent: game-po + validates: all_documents + requires: + - game-brief.md + - game-design-doc.md + - game-architecture.md + - project-plan.md uses: game-design-checklist - notes: Validate all design documents for consistency, completeness, and implementability. May require updates to any design document. + notes: The Product Owner validates all planning documents for consistency, completeness, and alignment with the project's goals. - agent: various updates: flagged_design_documents - condition: design_validation_issues - notes: If design validation finds issues, return to relevant agent to fix and re-export updated documents to docs/ folder. + condition: validation_issues + notes: If validation finds issues, return to the relevant agent to fix and re-export the updated documents to the docs/ folder. project_setup_guidance: action: guide_game_project_structure - notes: Set up game project structure following game architecture document. Create pages/, components/, js/, and images/ directories. Initialize WeChat Mini-Game configuration. + notes: Set up the game project structure following the game architecture document. Create pages/, components/, js/, and images/ directories. Initialize WeChat Mini-Game configuration. workflow_end: action: move_to_story_development - notes: All design artifacts complete. Begin story-driven development phase. Use Game Scrum Master to create implementation stories from design documents. + notes: All planning artifacts are complete. Begin the story-driven development phase. Use the Game Scrum Master to create implementation stories from the design documents. prototype_sequence: - step: prototype_scope action: assess_prototype_complexity - notes: First, assess if this needs full game design (use full_game_sequence) or can be a rapid prototype. + notes: First, assess if this needs a full game design (use full_game_sequence) or can be a rapid prototype. - agent: game-designer creates: game-brief.md optional_steps: - quick_brainstorming - concept_validation - notes: "Create focused game brief for prototype. Emphasize core mechanics and immediate playability. SAVE OUTPUT: Copy final game-brief.md to your project's docs/ folder." + notes: "Create a focused game brief for the prototype. Emphasize core mechanics and immediate playability. SAVE OUTPUT: Copy final game-brief.md to your project's docs/ folder." - agent: game-designer creates: prototype-design.md uses: create-doc prototype-design OR create-game-story requires: game-brief.md - notes: Create minimal design document or jump directly to implementation stories for rapid prototyping. Choose based on prototype complexity. + notes: Create a minimal design document or jump directly to implementation stories for rapid prototyping. Choose based on the prototype's complexity. prototype_workflow_end: action: move_to_rapid_implementation - notes: Prototype defined. Begin immediate implementation with Game Developer. Focus on core mechanics first, then iterate based on playtesting. + notes: The prototype is defined. Begin immediate implementation with the Game Developer. Focus on core mechanics first, then iterate based on playtesting. flow_diagram: | ```mermaid graph TD @@ -76,31 +91,31 @@ workflow: B -->|Prototype/Game Jam| D[game-designer: focused game-brief.md] C --> E[game-designer: game-design-doc.md] - E --> G[solution-architect: game-architecture.md] - G --> H[game-designer: validate design consistency] - H --> I{Design validation issues?} - I -->|Yes| J[Return to relevant agent for fixes] - I -->|No| K[Set up game project structure] - J --> H - K --> L[Move to Story Development Phase] + E --> F{QA Review? (Optional)} + F -->|Yes| G[game-qa: GDD Testability Review] + F -->|No| H[game-orchestrator: game-architecture.md] + G --> H + H --> I[game-pm: project-plan.md] + I --> J[game-po: Validate All Documents] + J --> K{Validation Issues?} + K -->|Yes| L[Return to relevant agent for fixes] + K -->|No| M[Set up game project structure] + L --> J + M --> N[Move to Story Development Phase] - D --> M[game-designer: prototype-design.md] - M --> N[Move to Rapid Implementation] + D --> O[game-designer: prototype-design.md] + O --> P[Move to Rapid Implementation] - C -.-> C1[Optional: brainstorming] - C -.-> C2[Optional: game research] - E -.-> E1[Optional: competitive analysis] - G -.-> G1[Optional: technical research] - D -.-> D1[Optional: quick brainstorming] - - style L fill:#90EE90 style N fill:#90EE90 + style P fill:#90EE90 style C fill:#FFE4B5 style E fill:#FFE4B5 - style F fill:#FFE4B5 - style G fill:#FFE4B5 + style G fill:#FFDAB9 + style H fill:#E6E6FA + style I fill:#ADD8E6 + style J fill:#FFB6C1 style D fill:#FFB6C1 - style M fill:#FFB6C1 + style O fill:#FFB6C1 ``` decision_guidance: use_full_sequence_when: diff --git a/expansion-packs/bmad-wechat-mini-game-dev/workflows/game-prototype.yaml b/expansion-packs/bmad-wechat-mini-game-dev/workflows/game-prototype.yaml index e14a1a92..955ee704 100644 --- a/expansion-packs/bmad-wechat-mini-game-dev/workflows/game-prototype.yaml +++ b/expansion-packs/bmad-wechat-mini-game-dev/workflows/game-prototype.yaml @@ -31,36 +31,44 @@ workflow: duration: 15-30 minutes creates: prototype-architecture.md requires: prototype-spec.md - notes: Define minimal technical implementation plan. Identify core WeChat Mini-Game systems needed and performance constraints. + notes: Define a minimal technical implementation plan. Identify the core WeChat Mini-Game systems needed and any performance constraints. - step: implementation_stories agent: game-sm duration: 30-45 minutes creates: prototype-stories/ - requires: prototype-spec.md, prototype-architecture.md - notes: Create 3-5 focused implementation stories for core prototype features. Each story should be completable in 2-4 hours. + requires: + - prototype-spec.md + - prototype-architecture.md + notes: Create 3-5 focused implementation stories for the core prototype features. Each story should be completable in 2-4 hours. - step: iterative_development agent: game-developer duration: varies implements: prototype-stories/ - notes: Implement stories in priority order. Test frequently and adjust design based on what feels fun. Document discoveries. + notes: Implement stories in priority order. Test frequently and adjust the design based on what feels fun. Document discoveries. + - step: qa_check + agent: game-qa + duration: 15-30 minutes + optional: true + requires: working-prototype + notes: "(Optional) Perform a quick QA check to ensure the prototype is stable enough for effective playtesting and feedback." workflow_end: action: prototype_evaluation - notes: "Prototype complete. Evaluate core mechanics, gather feedback, and decide next steps: iterate, expand, or archive." + notes: "Prototype complete. Evaluate the core mechanics, gather feedback, and decide on the next steps: iterate, expand, or archive." game_jam_sequence: - step: jam_concept agent: game-designer duration: 10-15 minutes creates: jam-concept.md - notes: Define game concept based on jam theme. One sentence core mechanic, basic controls, win condition. + notes: Define the game concept based on the jam theme. One-sentence core mechanic, basic controls, and a win condition. - step: jam_implementation agent: game-developer duration: varies (jam timeline) creates: working-prototype requires: jam-concept.md - notes: Directly implement core mechanic. No formal stories - iterate rapidly on what's fun. Document major decisions. + notes: Directly implement the core mechanic. No formal stories—iterate rapidly on what's fun. Document major decisions. jam_workflow_end: action: jam_submission - notes: Submit to game jam. Capture lessons learned and consider post-jam development if concept shows promise. + notes: Submit to the game jam. Capture lessons learned and consider post-jam development if the concept shows promise. flow_diagram: | ```mermaid graph TD @@ -72,23 +80,24 @@ workflow: E --> F[game-developer: prototype-architecture.md] F --> G[game-sm: create prototype stories] G --> H[game-developer: iterative implementation] - H --> I[Prototype Evaluation] + H --> I{QA Check? (Optional)} + I -->|Yes| J[game-qa: Stability Check] + I -->|No| K[Prototype Evaluation] + J --> K - D --> J[game-developer: direct implementation] - J --> K[Game Jam Submission] + D --> L[game-developer: direct implementation] + L --> M[Game Jam Submission] - E -.-> E1[Optional: quick brainstorming] - E -.-> E2[Optional: reference research] - - style I fill:#90EE90 style K fill:#90EE90 + style M fill:#90EE90 style C fill:#FFE4B5 style E fill:#FFE4B5 style F fill:#FFE4B5 style G fill:#FFE4B5 style H fill:#FFE4B5 + style J fill:#FFDAB9 style D fill:#FFB6C1 - style J fill:#FFB6C1 + style L fill:#FFB6C1 ``` decision_guidance: use_prototype_sequence_when: