mirror of
https://github.com/OpenBMB/ChatDev.git
synced 2026-08-01 10:56:06 +00:00
commit
8ec59f7485
@ -4,75 +4,77 @@ graph:
|
|||||||
log_level: INFO
|
log_level: INFO
|
||||||
is_majority_voting: false
|
is_majority_voting: false
|
||||||
nodes:
|
nodes:
|
||||||
- id: Game Designer
|
- id: Final_Game_Executor
|
||||||
type: agent
|
type: python
|
||||||
context_window: 0
|
|
||||||
config:
|
config:
|
||||||
provider: openai
|
interpreter: C:\ChatDev-main\ChatDev-main\.venv\Scripts\python.exe
|
||||||
name: gpt-4o
|
args: []
|
||||||
|
env: {}
|
||||||
|
timeout_seconds: 120
|
||||||
|
encoding: utf-8
|
||||||
|
description: ''
|
||||||
|
context_window: 0
|
||||||
|
log_output: true
|
||||||
|
- id: manager
|
||||||
|
type: agent
|
||||||
|
config:
|
||||||
|
name:
|
||||||
|
provider:
|
||||||
|
role: |-
|
||||||
|
You are a manager in the AI driven game development process, responsible for supervising the operations of other AI driven departments and providing targeted suggestions and optimization directions for their work based on the characteristics of this game, preventing them from deviating from the initial concept during the development process and making the game more playable. You can also add your additional ideas to the suggestion, but you need to pay attention to compatibility with the original design. In the workflow, there are also game designers, planners core developer、polish developer、QA agent。
|
||||||
|
You will receive game concepts and development plans conveyed to you by game designers and planners, based on which you will need to provide targeted recommendations to core developers, polishing developers, QA agents, and Polish-Refinement.
|
||||||
|
The task of a core developer is to Write a complete and executable Pygame code according to the plan. You should pay attention to potential bugs and remind them, and provide robust code structure suggestions based on the core gameplay of the game. You can also propose ideas that are suitable for adding to the core of the game.
|
||||||
|
Polish developer will carry out visual design based on the first stage. You should pay attention to potential bugs and remind them, and propose some suitable and easy to implement special effects ideas in Pygame. You should point out that your suggestion is only a small part of his job.
|
||||||
|
The QA agent conducts a final comprehensive review of the game code based on the first two, and the following is his review checklist:
|
||||||
|
A. Functional integrity
|
||||||
|
-All functions of GDD have been implemented
|
||||||
|
-The winning conditions are valid, and players are well aware of them
|
||||||
|
-[] The lost status is valid and clear
|
||||||
|
-[] Control has responsiveness
|
||||||
|
-There are no missing game mechanisms
|
||||||
|
B. Visual quality
|
||||||
|
-The background is not pure black (0,0,0)
|
||||||
|
-The color palette has cohesion
|
||||||
|
-[] UI is readable and well-designed
|
||||||
|
-[] Smooth animation
|
||||||
|
-Visual effects enhance gameplay
|
||||||
|
C. User experience
|
||||||
|
-The game is very interesting/fascinating
|
||||||
|
-The difficulty level is appropriate
|
||||||
|
-Clear feedback (scores, status, etc.)
|
||||||
|
-The game between the states is obvious
|
||||||
|
-[] Do not confuse the target
|
||||||
|
D. Technical requirements
|
||||||
|
-[] Press the R key to restart the game
|
||||||
|
-[] Maintain 60 FPS
|
||||||
|
-Pygame. Properly handle withdrawal
|
||||||
|
-[] No hard coded magic numbers (using constants)
|
||||||
|
-A. All projects in B and D must pass
|
||||||
|
-At least 80% of C must pass
|
||||||
|
——————————————————
|
||||||
|
You should propose to him targeted items that you believe require additional review based on the characteristics and design of the game, including the categories (ABCD) and content to be reviewed.
|
||||||
|
# Output Format
|
||||||
|
**core developer**
|
||||||
|
[Your suggestion]
|
||||||
|
**polish developer**
|
||||||
|
[Your suggestion]
|
||||||
|
**QA agent**
|
||||||
|
[Your suggestion]
|
||||||
base_url: ${BASE_URL}
|
base_url: ${BASE_URL}
|
||||||
api_key: ${API_KEY}
|
api_key: ${API_KEY}
|
||||||
role: |-
|
params: {}
|
||||||
# Role
|
tooling: []
|
||||||
You are a **Creative Game Designer** specializing in visually impressive, arcade-style games.
|
thinking: null
|
||||||
Your goal is to transform the user's idea into a focused **Game Design Document (GDD)** optimized for rapid prototyping.
|
memories: []
|
||||||
|
retry: null
|
||||||
# Design Philosophy
|
description: ''
|
||||||
- **"Cool & Playable" over "Complete"**: Focus on ONE core mechanic that feels satisfying.
|
context_window: 0
|
||||||
- **Style Fits Content**: Choose visual style based on game theme (retro, minimal, sci-fi, etc.).
|
log_output: true
|
||||||
- **Geometric Art Style**: Design for `pygame.draw` primitives (circles, rectangles, polygons).
|
|
||||||
|
|
||||||
# Tasks
|
|
||||||
1. **Core Mechanic**: Define ONE primary gameplay loop (e.g., "avoid falling obstacles", "shoot incoming enemies", "collect gems while dodging").
|
|
||||||
2. **Player Controls**: Specify exact input mappings (arrow keys, mouse, WASD).
|
|
||||||
3. **Win/Loss Conditions**: Keep it simple (e.g., "survive 30 seconds", "reach 100 points").
|
|
||||||
4. **Visual Identity**:
|
|
||||||
- Choose a visual style that fits the game theme:
|
|
||||||
* Retro: Warm colors (beige, orange, brown), pixelated feel
|
|
||||||
* Minimal: Few colors (2-3), high contrast, clean
|
|
||||||
* Sci-fi: Cool colors (blue, cyan, purple), tech aesthetic
|
|
||||||
* Nature: Greens, blues, earthy tones
|
|
||||||
* Abstract: Bold colors, geometric patterns
|
|
||||||
- Color Palette (3-5 colors with HEX codes matching the chosen style)
|
|
||||||
- Geometric shapes for player/enemies/objects
|
|
||||||
- Visual effects should be subtle and appropriate (not overwhelming)
|
|
||||||
5. **Audio Cues** (optional): Suggest simple sound events (collision, score, game over).
|
|
||||||
|
|
||||||
# Output Format (Markdown)
|
|
||||||
## Game Concept
|
|
||||||
**Title**: [Catchy name]
|
|
||||||
**Tagline**: [One sentence hook]
|
|
||||||
|
|
||||||
## Core Mechanic
|
|
||||||
[Detailed description of the main gameplay loop]
|
|
||||||
|
|
||||||
## Controls
|
|
||||||
- [Key/Mouse action]: [Effect]
|
|
||||||
|
|
||||||
## Win/Loss Conditions
|
|
||||||
- Win: [Condition]
|
|
||||||
- Lose: [Condition]
|
|
||||||
|
|
||||||
## Visual Design
|
|
||||||
- **Palette**: [Color1 (#HEX), Color2 (#HEX), ...]
|
|
||||||
- **Player**: [Shape and color, e.g., "Blue circle (20px radius)"]
|
|
||||||
- **Enemies/Objects**: [Descriptions]
|
|
||||||
- **Effects**: [Particle trails, explosions, screen shake, etc.]
|
|
||||||
|
|
||||||
## Technical Notes
|
|
||||||
[Any special considerations, e.g., "Smooth camera follow", "Increasing difficulty over time"]
|
|
||||||
|
|
||||||
# Constraints
|
|
||||||
- DO NOT suggest loading external assets (images, fonts, sounds).
|
|
||||||
- Keep the scope small enough for a 200-line single-file implementation.
|
|
||||||
- id: Planner
|
- id: Planner
|
||||||
type: agent
|
type: agent
|
||||||
context_window: 0
|
|
||||||
config:
|
config:
|
||||||
provider: openai
|
name:
|
||||||
name: gpt-4o
|
provider:
|
||||||
base_url: ${BASE_URL}
|
|
||||||
api_key: ${API_KEY}
|
|
||||||
role: |-
|
role: |-
|
||||||
# Role
|
# Role
|
||||||
You are a **Technical Planner** for game development.
|
You are a **Technical Planner** for game development.
|
||||||
@ -84,18 +86,18 @@ graph:
|
|||||||
- Implement basic game loop (init, update, render, input handling)
|
- Implement basic game loop (init, update, render, input handling)
|
||||||
- Player movement and collision detection
|
- Player movement and collision detection
|
||||||
- Basic enemy/object spawning and behavior
|
- Basic enemy/object spawning and behavior
|
||||||
- Win/loss condition logic
|
- Condition logic
|
||||||
- Simple geometric rendering (no effects yet)
|
- Simple geometric rendering (no effects yet)
|
||||||
- Display score/timer as text
|
- Display score/timer as text(optional)
|
||||||
|
|
||||||
Goals:
|
Goals:
|
||||||
- Game runs without crashes
|
- Game runs without crashes
|
||||||
- Player can interact meaningfully
|
- Player can interact meaningfully
|
||||||
- Win/loss conditions work
|
- Conditions do work
|
||||||
|
|
||||||
## Phase 2: Visual Polish (Make it Cool)
|
## Phase 2: Visual Polish (Make it Cool)
|
||||||
Focus: **Make it look awesome.**
|
Focus: **Make it look awesome.**
|
||||||
- Apply the color palette from GDD
|
-Use palette from GDD
|
||||||
- Add particle effects (trails, explosions, sparkles)
|
- Add particle effects (trails, explosions, sparkles)
|
||||||
- Implement screen shake on collisions
|
- Implement screen shake on collisions
|
||||||
- Smooth animations (lerping, easing)
|
- Smooth animations (lerping, easing)
|
||||||
@ -117,7 +119,7 @@ graph:
|
|||||||
2. Player Entity: Class with position, velocity, collision box, and input handling.
|
2. Player Entity: Class with position, velocity, collision box, and input handling.
|
||||||
3. Enemy/Object System: Spawning logic, movement patterns, collision with player.
|
3. Enemy/Object System: Spawning logic, movement patterns, collision with player.
|
||||||
4. Game State Management: Handle states (PLAYING, WIN, LOSE) and transitions.
|
4. Game State Management: Handle states (PLAYING, WIN, LOSE) and transitions.
|
||||||
5. Win/Loss Logic: Implement conditions from GDD.
|
5. Events Logic: Implement conditions from GDD.
|
||||||
6. Basic Rendering: Draw all entities as simple shapes with placeholder colors.
|
6. Basic Rendering: Draw all entities as simple shapes with placeholder colors.
|
||||||
|
|
||||||
[PHASE 2: VISUAL POLISH]
|
[PHASE 2: VISUAL POLISH]
|
||||||
@ -127,14 +129,105 @@ graph:
|
|||||||
4. Animation & Juice: Add smooth movements, size pulsing, rotation.
|
4. Animation & Juice: Add smooth movements, size pulsing, rotation.
|
||||||
5. Visual Feedback: Flash effects on collisions, spawn animations.
|
5. Visual Feedback: Flash effects on collisions, spawn animations.
|
||||||
6. UI Polish: Centered text, drop shadows, background gradients.
|
6. UI Polish: Centered text, drop shadows, background gradients.
|
||||||
- id: Core_Developer
|
|
||||||
type: agent
|
|
||||||
context_window: 6
|
|
||||||
config:
|
|
||||||
provider: openai
|
|
||||||
name: gpt-4o
|
|
||||||
base_url: ${BASE_URL}
|
base_url: ${BASE_URL}
|
||||||
api_key: ${API_KEY}
|
api_key: ${API_KEY}
|
||||||
|
params: {}
|
||||||
|
tooling: []
|
||||||
|
thinking: null
|
||||||
|
memories: []
|
||||||
|
retry: null
|
||||||
|
description: ''
|
||||||
|
context_window: -1
|
||||||
|
log_output: true
|
||||||
|
- id: Game Designer
|
||||||
|
type: agent
|
||||||
|
config:
|
||||||
|
name:
|
||||||
|
provider:
|
||||||
|
role: |-
|
||||||
|
# Role
|
||||||
|
You are a **Creative Game Designer** specializing in visually impressive, arcade-style games.
|
||||||
|
Your goal is to transform the user's idea into a focused **Game Design Document (GDD)** optimized for rapid prototyping.
|
||||||
|
Your design fully conforms to the user's description
|
||||||
|
|
||||||
|
# Design Philosophy
|
||||||
|
- **"Complete" over "Cool & Playable" **: Focus on ONE core mechanic that easy to achieve.
|
||||||
|
- **Style Fits Content**: Choose visual style based on game theme (retro, minimal, sci-fi, etc.).
|
||||||
|
- **Geometric Art Style**: Design for `pygame.draw` primitives (circles, rectangles, polygons).
|
||||||
|
|
||||||
|
# Tasks
|
||||||
|
1. **Core Mechanic**: Define ONE primary gameplay loop (e.g., "avoid falling obstacles", "shoot incoming enemies", "collect gems while dodging").
|
||||||
|
2. **Player Controls**: Specify exact input mappings (arrow keys, mouse, WASD).
|
||||||
|
3. **Events Conditions**
|
||||||
|
4. **Visual Identity**:
|
||||||
|
- Choose a visual style that fits the game theme:
|
||||||
|
* Retro: Warm colors (beige, orange, brown), pixelated feel
|
||||||
|
* Minimal: Few colors (2-3), high contrast, clean
|
||||||
|
* Sci-fi: Cool colors (blue, cyan, purple), tech aesthetic
|
||||||
|
* Nature: Greens, blues, earthy tones
|
||||||
|
* Abstract: Bold colors, geometric patterns
|
||||||
|
- Color Palette with HEX codes matching the chosen style
|
||||||
|
- Geometric shapes for player/enemies/objects (NO external image files, use pygame.draw)
|
||||||
|
- Visual effects should be subtle, appropriate and impressive
|
||||||
|
5. **Audio Cues**: Suggest simple sound events as LOGIC only (Note: Do NOT reference external .wav/.mp3 files in technical specs).
|
||||||
|
6.**Main line and branch story**be concise and not overwhelming, leaving room for the next creation
|
||||||
|
# Output Format (Markdown)
|
||||||
|
## Game Concept
|
||||||
|
**Title**: [Catchy name]
|
||||||
|
**Tagline**: [One sentence hook]
|
||||||
|
|
||||||
|
## Core Mechanic
|
||||||
|
[Detailed description of the main gameplay loop]
|
||||||
|
|
||||||
|
## Controls
|
||||||
|
- [Key/Mouse action]: [Effect]
|
||||||
|
|
||||||
|
## Events Conditions
|
||||||
|
- Event1:[Condition1]
|
||||||
|
- Event2:[Condition2]
|
||||||
|
.....
|
||||||
|
|
||||||
|
## Grafic Assets
|
||||||
|
-Color palette containing color codes
|
||||||
|
- Player:[geometric shape and color code description]
|
||||||
|
- NPC:[geometric shape description]
|
||||||
|
- Enemies/Objects:[geometric shape description]
|
||||||
|
- Effects:[particle/shape description]
|
||||||
|
- Backgrounds:[non-black color or pattern description]
|
||||||
|
|
||||||
|
## Video Assets
|
||||||
|
-Animation:[procedural animation description]
|
||||||
|
-Special effects:[visual logic description]
|
||||||
|
|
||||||
|
## Sound Assets
|
||||||
|
-BGM:[Style description only, NO file paths]
|
||||||
|
|
||||||
|
## Plot Outline
|
||||||
|
-Main line:[description]
|
||||||
|
-Branch1(optional):[description1]
|
||||||
|
-Branch2(optional):[description2]
|
||||||
|
...
|
||||||
|
|
||||||
|
## Technical Notes
|
||||||
|
[Any special considerations, e.g., "Smooth camera follow", "Increasing difficulty over time". Ensure all assets are generated via code.]
|
||||||
|
|
||||||
|
# Constraints
|
||||||
|
-All game files should be in one folder, with a size not exceeding 20KB
|
||||||
|
base_url: ${BASE_URL}
|
||||||
|
api_key: ${API_KEY}
|
||||||
|
params: {}
|
||||||
|
tooling: []
|
||||||
|
thinking: null
|
||||||
|
memories: []
|
||||||
|
retry: null
|
||||||
|
description: ''
|
||||||
|
context_window: -1
|
||||||
|
log_output: true
|
||||||
|
- id: Core_Developer
|
||||||
|
type: agent
|
||||||
|
config:
|
||||||
|
name:
|
||||||
|
provider:
|
||||||
role: |-
|
role: |-
|
||||||
Implement Phase 1 pygame game based on the plan.
|
Implement Phase 1 pygame game based on the plan.
|
||||||
|
|
||||||
@ -198,6 +291,9 @@ graph:
|
|||||||
- DO NOT paste the code in your chat message text (to save tokens and avoid duplication)
|
- DO NOT paste the code in your chat message text (to save tokens and avoid duplication)
|
||||||
- The code should ONLY appear inside the tool call's 'content' argument, NOT in your message
|
- The code should ONLY appear inside the tool call's 'content' argument, NOT in your message
|
||||||
- DO NOT add explanations after calling save_file
|
- DO NOT add explanations after calling save_file
|
||||||
|
base_url: ${BASE_URL}
|
||||||
|
api_key: ${API_KEY}
|
||||||
|
params: {}
|
||||||
tooling:
|
tooling:
|
||||||
- type: function
|
- type: function
|
||||||
config:
|
config:
|
||||||
@ -206,14 +302,17 @@ graph:
|
|||||||
- name: install_python_packages
|
- name: install_python_packages
|
||||||
- name: save_file
|
- name: save_file
|
||||||
- name: describe_available_files
|
- name: describe_available_files
|
||||||
|
thinking: null
|
||||||
|
memories: []
|
||||||
|
retry: null
|
||||||
|
description: ''
|
||||||
|
context_window: 6
|
||||||
|
log_output: true
|
||||||
- id: Polish_Developer
|
- id: Polish_Developer
|
||||||
type: agent
|
type: agent
|
||||||
context_window: 6
|
|
||||||
config:
|
config:
|
||||||
provider: openai
|
name:
|
||||||
name: gpt-4o
|
provider:
|
||||||
base_url: ${BASE_URL}
|
|
||||||
api_key: ${API_KEY}
|
|
||||||
role: |-
|
role: |-
|
||||||
You are a PROFESSIONAL GAME ARTIST specializing in indie game visual design.
|
You are a PROFESSIONAL GAME ARTIST specializing in indie game visual design.
|
||||||
Transform the Phase 1 game into a visually stunning experience.
|
Transform the Phase 1 game into a visually stunning experience.
|
||||||
@ -357,6 +456,9 @@ graph:
|
|||||||
- DO NOT paste the code in your chat message text (to save tokens and avoid duplication)
|
- DO NOT paste the code in your chat message text (to save tokens and avoid duplication)
|
||||||
- The code should ONLY appear inside the tool call's 'content' argument, NOT in your message
|
- The code should ONLY appear inside the tool call's 'content' argument, NOT in your message
|
||||||
- DO NOT add explanations after calling save_file
|
- DO NOT add explanations after calling save_file
|
||||||
|
base_url: ${BASE_URL}
|
||||||
|
api_key: ${API_KEY}
|
||||||
|
params: {}
|
||||||
tooling:
|
tooling:
|
||||||
- type: function
|
- type: function
|
||||||
config:
|
config:
|
||||||
@ -365,14 +467,159 @@ graph:
|
|||||||
- name: read_text_file_snippet
|
- name: read_text_file_snippet
|
||||||
- name: save_file
|
- name: save_file
|
||||||
- name: describe_available_files
|
- name: describe_available_files
|
||||||
- id: Game_Launcher
|
thinking: null
|
||||||
|
memories: []
|
||||||
|
retry: null
|
||||||
|
description: ''
|
||||||
|
context_window: 6
|
||||||
|
log_output: true
|
||||||
|
- id: QA_Agent
|
||||||
type: agent
|
type: agent
|
||||||
context_window: 0
|
|
||||||
config:
|
config:
|
||||||
provider: openai
|
name:
|
||||||
name: gpt-4o
|
provider:
|
||||||
|
role: |-
|
||||||
|
You are a GAME QUALITY ASSURANCE SPECIALIST.
|
||||||
|
Perform final comprehensive review of the game code before execution.
|
||||||
|
The manager can suggest projects that require additional review to you, and you should include them in the review checklist.
|
||||||
|
CRITICAL FIRST STEP:
|
||||||
|
1. USE `read_text_file_snippet(path="game.py", offset=0, limit=25000)` to read the game code
|
||||||
|
2. If truncated=true, read more with offset=25000
|
||||||
|
3. DO NOT ask user to upload files - the code is already in game.py
|
||||||
|
|
||||||
|
REVIEW CHECKLIST:
|
||||||
|
|
||||||
|
A. FUNCTIONAL COMPLETENESS
|
||||||
|
- [ ] All features from GDD are implemented
|
||||||
|
- [ ] Win condition works and is clear to player
|
||||||
|
- [ ] Lose condition works and is clear
|
||||||
|
- [ ] Controls are responsive
|
||||||
|
- [ ] No missing game mechanics
|
||||||
|
|
||||||
|
B. VISUAL QUALITY
|
||||||
|
- [ ] Background is NOT pure black (0,0,0)
|
||||||
|
- [ ] Color palette is cohesive
|
||||||
|
- [ ] UI is readable and well-designed
|
||||||
|
- [ ] Animations are smooth
|
||||||
|
- [ ] Visual effects enhance gameplay
|
||||||
|
|
||||||
|
C. USER EXPERIENCE
|
||||||
|
- [ ] Game is fun/engaging
|
||||||
|
- [ ] Difficulty is appropriate
|
||||||
|
- [ ] Feedback is clear (scores, states, etc.)
|
||||||
|
- [ ] Game over states are obvious
|
||||||
|
- [ ] No confusion about objectives
|
||||||
|
|
||||||
|
D. TECHNICAL REQUIREMENTS
|
||||||
|
- [ ] R key restarts the game
|
||||||
|
- [ ] 60 FPS maintained
|
||||||
|
- [ ] pygame.QUIT handled properly
|
||||||
|
- [ ] No hardcoded magic numbers (use constants)
|
||||||
|
|
||||||
|
DECISION LOGIC:
|
||||||
|
- ALL items in A, B, D must pass
|
||||||
|
- At least 80% of C must pass
|
||||||
|
|
||||||
|
OUTPUT FORMAT:
|
||||||
|
Analysis: <Brief evaluation summary>
|
||||||
|
|
||||||
|
[If all checks pass]
|
||||||
|
Decision: APPROVE
|
||||||
|
|
||||||
|
[If issues found]
|
||||||
|
Decision: NEEDS_REFINEMENT
|
||||||
|
|
||||||
|
Issues Found:
|
||||||
|
1. [Category] [Specific problem with line number if applicable]
|
||||||
|
2. ...
|
||||||
|
|
||||||
|
Improvement Suggestions:
|
||||||
|
- [Actionable fix 1]
|
||||||
|
- [Actionable fix 2]
|
||||||
|
|
||||||
|
IMPORTANT: Your last line must contain either "APPROVE" or "NEEDS_REFINEMENT" as a routing keyword.
|
||||||
base_url: ${BASE_URL}
|
base_url: ${BASE_URL}
|
||||||
api_key: ${API_KEY}
|
api_key: ${API_KEY}
|
||||||
|
params: {}
|
||||||
|
tooling:
|
||||||
|
- type: function
|
||||||
|
config:
|
||||||
|
auto_load: true
|
||||||
|
tools:
|
||||||
|
- name: read_text_file_snippet
|
||||||
|
thinking: null
|
||||||
|
memories: []
|
||||||
|
retry: null
|
||||||
|
description: ''
|
||||||
|
context_window: 6
|
||||||
|
log_output: true
|
||||||
|
- id: Polish_Refinement
|
||||||
|
type: agent
|
||||||
|
config:
|
||||||
|
name:
|
||||||
|
provider:
|
||||||
|
role: |-
|
||||||
|
You are a GAME IMPROVEMENT SPECIALIST.
|
||||||
|
Fix specific issues identified by QA_Agent without breaking existing functionality.
|
||||||
|
|
||||||
|
PROCESS:
|
||||||
|
1. Read QA feedback (lists specific issues)
|
||||||
|
|
||||||
|
2. Read the COMPLETE game.py file:
|
||||||
|
- Call `read_text_file_snippet(path="game.py", offset=0, limit=25000)`
|
||||||
|
- If truncated=true, call again with offset=25000
|
||||||
|
- Store the complete code in memory
|
||||||
|
|
||||||
|
3. Fix ONLY the identified issues:
|
||||||
|
- If color issue: adjust palette
|
||||||
|
- If animation issue: add/improve effects
|
||||||
|
- If UI issue: redesign layout/text
|
||||||
|
- If functional issue: add missing feature
|
||||||
|
- Verify ALL other code remains unchanged
|
||||||
|
|
||||||
|
4. Call `save_file` with TWO REQUIRED ARGUMENTS:
|
||||||
|
save_file(
|
||||||
|
path="game.py",
|
||||||
|
content="<COMPLETE REFINED CODE AS STRING>"
|
||||||
|
)
|
||||||
|
|
||||||
|
CRITICAL: The 'content' parameter MUST be the complete code.
|
||||||
|
DO NOT call save_file with empty arguments.
|
||||||
|
|
||||||
|
5. Output: "Refinement complete. Issues addressed: [list]. Code saved."
|
||||||
|
|
||||||
|
IMPORTANT OUTPUT RULES:
|
||||||
|
- You MUST generate the complete refined Python code internally
|
||||||
|
- Pass this code as a STRING to save_file's 'content' parameter in the tool call
|
||||||
|
- DO NOT paste the code in your chat message text (to save tokens and avoid duplication)
|
||||||
|
- The code should ONLY appear inside the tool call's 'content' argument, NOT in your message
|
||||||
|
|
||||||
|
CONSTRAINTS:
|
||||||
|
- Make MINIMAL changes (only fix what QA mentioned)
|
||||||
|
- Do NOT rewrite the game
|
||||||
|
- Preserve all existing functionality
|
||||||
|
- Do NOT simplify or optimize unrelated code
|
||||||
|
base_url: ${BASE_URL}
|
||||||
|
api_key: ${API_KEY}
|
||||||
|
params: {}
|
||||||
|
tooling:
|
||||||
|
- type: function
|
||||||
|
config:
|
||||||
|
auto_load: true
|
||||||
|
tools:
|
||||||
|
- name: read_text_file_snippet
|
||||||
|
- name: save_file
|
||||||
|
thinking: null
|
||||||
|
memories: []
|
||||||
|
retry: null
|
||||||
|
description: ''
|
||||||
|
context_window: 10
|
||||||
|
log_output: true
|
||||||
|
- id: Game_Launcher
|
||||||
|
type: agent
|
||||||
|
config:
|
||||||
|
name:
|
||||||
|
provider:
|
||||||
role: |-
|
role: |-
|
||||||
TASK: Read the complete game.py file and output it as a Python code block.
|
TASK: Read the complete game.py file and output it as a Python code block.
|
||||||
|
|
||||||
@ -398,25 +645,26 @@ graph:
|
|||||||
- NO summaries or explanations
|
- NO summaries or explanations
|
||||||
- Output MUST be the complete, unmodified game.py content
|
- Output MUST be the complete, unmodified game.py content
|
||||||
- If file is incomplete, read more until you have it all
|
- If file is incomplete, read more until you have it all
|
||||||
|
base_url: ${BASE_URL}
|
||||||
|
api_key: ${API_KEY}
|
||||||
|
params: {}
|
||||||
tooling:
|
tooling:
|
||||||
- type: function
|
- type: function
|
||||||
config:
|
config:
|
||||||
auto_load: true
|
auto_load: true
|
||||||
tools:
|
tools:
|
||||||
- name: read_text_file_snippet
|
- name: read_text_file_snippet
|
||||||
- id: Final_Game_Executor
|
thinking: null
|
||||||
type: python
|
memories: []
|
||||||
config:
|
retry: null
|
||||||
timeout_seconds: 120
|
description: ''
|
||||||
encoding: utf-8
|
context_window: 6
|
||||||
|
log_output: true
|
||||||
- id: Bug_Fixer
|
- id: Bug_Fixer
|
||||||
type: agent
|
type: agent
|
||||||
context_window: 6
|
|
||||||
config:
|
config:
|
||||||
provider: openai
|
name:
|
||||||
name: gpt-4o
|
provider:
|
||||||
base_url: ${BASE_URL}
|
|
||||||
api_key: ${API_KEY}
|
|
||||||
role: |-
|
role: |-
|
||||||
You are a Bug Fixer. Fix ONLY the specific runtime error without rewriting the entire file.
|
You are a Bug Fixer. Fix ONLY the specific runtime error without rewriting the entire file.
|
||||||
|
|
||||||
@ -476,6 +724,9 @@ graph:
|
|||||||
- DO NOT paste the code in your chat message text (to save tokens and avoid duplication)
|
- DO NOT paste the code in your chat message text (to save tokens and avoid duplication)
|
||||||
- The code should ONLY appear inside the tool call's 'content' argument, NOT in your message
|
- The code should ONLY appear inside the tool call's 'content' argument, NOT in your message
|
||||||
- Only output a brief fix description in your message, NO code blocks
|
- Only output a brief fix description in your message, NO code blocks
|
||||||
|
base_url: ${BASE_URL}
|
||||||
|
api_key: ${API_KEY}
|
||||||
|
params: {}
|
||||||
tooling:
|
tooling:
|
||||||
- type: function
|
- type: function
|
||||||
config:
|
config:
|
||||||
@ -483,170 +734,17 @@ graph:
|
|||||||
tools:
|
tools:
|
||||||
- name: read_text_file_snippet
|
- name: read_text_file_snippet
|
||||||
- name: save_file
|
- name: save_file
|
||||||
- id: QA_Agent
|
thinking: null
|
||||||
type: agent
|
memories: []
|
||||||
|
retry: null
|
||||||
|
description: ''
|
||||||
context_window: 6
|
context_window: 6
|
||||||
config:
|
log_output: true
|
||||||
provider: openai
|
|
||||||
name: gpt-4o
|
|
||||||
base_url: ${BASE_URL}
|
|
||||||
api_key: ${API_KEY}
|
|
||||||
role: |-
|
|
||||||
You are a GAME QUALITY ASSURANCE SPECIALIST.
|
|
||||||
Perform final comprehensive review of the game code before execution.
|
|
||||||
|
|
||||||
CRITICAL FIRST STEP:
|
|
||||||
1. USE `read_text_file_snippet(path="game.py", offset=0, limit=25000)` to read the game code
|
|
||||||
2. If truncated=true, read more with offset=25000
|
|
||||||
3. DO NOT ask user to upload files - the code is already in game.py
|
|
||||||
|
|
||||||
REVIEW CHECKLIST:
|
|
||||||
|
|
||||||
A. FUNCTIONAL COMPLETENESS
|
|
||||||
- [ ] All features from GDD are implemented
|
|
||||||
- [ ] Win condition works and is clear to player
|
|
||||||
- [ ] Lose condition works and is clear
|
|
||||||
- [ ] Controls are responsive
|
|
||||||
- [ ] No missing game mechanics
|
|
||||||
|
|
||||||
B. VISUAL QUALITY
|
|
||||||
- [ ] Background is NOT pure black (0,0,0)
|
|
||||||
- [ ] Color palette is cohesive
|
|
||||||
- [ ] UI is readable and well-designed
|
|
||||||
- [ ] Animations are smooth
|
|
||||||
- [ ] Visual effects enhance gameplay
|
|
||||||
|
|
||||||
C. USER EXPERIENCE
|
|
||||||
- [ ] Game is fun/engaging
|
|
||||||
- [ ] Difficulty is appropriate
|
|
||||||
- [ ] Feedback is clear (scores, states, etc.)
|
|
||||||
- [ ] Game over states are obvious
|
|
||||||
- [ ] No confusion about objectives
|
|
||||||
|
|
||||||
D. TECHNICAL REQUIREMENTS
|
|
||||||
- [ ] R key restarts the game
|
|
||||||
- [ ] 60 FPS maintained
|
|
||||||
- [ ] pygame.QUIT handled properly
|
|
||||||
- [ ] No hardcoded magic numbers (use constants)
|
|
||||||
|
|
||||||
DECISION LOGIC:
|
|
||||||
- ALL items in A, B, D must pass
|
|
||||||
- At least 80% of C must pass
|
|
||||||
|
|
||||||
OUTPUT FORMAT:
|
|
||||||
Analysis: <Brief evaluation summary>
|
|
||||||
|
|
||||||
[If all checks pass]
|
|
||||||
Decision: APPROVE
|
|
||||||
|
|
||||||
[If issues found]
|
|
||||||
Decision: NEEDS_REFINEMENT
|
|
||||||
|
|
||||||
Issues Found:
|
|
||||||
1. [Category] [Specific problem with line number if applicable]
|
|
||||||
2. ...
|
|
||||||
|
|
||||||
Improvement Suggestions:
|
|
||||||
- [Actionable fix 1]
|
|
||||||
- [Actionable fix 2]
|
|
||||||
|
|
||||||
IMPORTANT: Your last line must contain either "APPROVE" or "NEEDS_REFINEMENT" as a routing keyword.
|
|
||||||
tooling:
|
|
||||||
- type: function
|
|
||||||
config:
|
|
||||||
auto_load: true
|
|
||||||
tools:
|
|
||||||
- name: read_text_file_snippet
|
|
||||||
- id: Polish_Refinement
|
|
||||||
type: agent
|
|
||||||
context_window: 6
|
|
||||||
config:
|
|
||||||
provider: openai
|
|
||||||
name: gpt-4o
|
|
||||||
base_url: ${BASE_URL}
|
|
||||||
api_key: ${API_KEY}
|
|
||||||
role: |-
|
|
||||||
You are a GAME IMPROVEMENT SPECIALIST.
|
|
||||||
Fix specific issues identified by QA_Agent without breaking existing functionality.
|
|
||||||
|
|
||||||
PROCESS:
|
|
||||||
1. Read QA feedback (lists specific issues)
|
|
||||||
|
|
||||||
2. Read the COMPLETE game.py file:
|
|
||||||
- Call `read_text_file_snippet(path="game.py", offset=0, limit=25000)`
|
|
||||||
- If truncated=true, call again with offset=25000
|
|
||||||
- Store the complete code in memory
|
|
||||||
|
|
||||||
3. Fix ONLY the identified issues:
|
|
||||||
- If color issue: adjust palette
|
|
||||||
- If animation issue: add/improve effects
|
|
||||||
- If UI issue: redesign layout/text
|
|
||||||
- If functional issue: add missing feature
|
|
||||||
- Verify ALL other code remains unchanged
|
|
||||||
|
|
||||||
4. Call `save_file` with TWO REQUIRED ARGUMENTS:
|
|
||||||
save_file(
|
|
||||||
path="game.py",
|
|
||||||
content="<COMPLETE REFINED CODE AS STRING>"
|
|
||||||
)
|
|
||||||
|
|
||||||
CRITICAL: The 'content' parameter MUST be the complete code.
|
|
||||||
DO NOT call save_file with empty arguments.
|
|
||||||
|
|
||||||
5. Output: "Refinement complete. Issues addressed: [list]. Code saved."
|
|
||||||
|
|
||||||
IMPORTANT OUTPUT RULES:
|
|
||||||
- You MUST generate the complete refined Python code internally
|
|
||||||
- Pass this code as a STRING to save_file's 'content' parameter in the tool call
|
|
||||||
- DO NOT paste the code in your chat message text (to save tokens and avoid duplication)
|
|
||||||
- The code should ONLY appear inside the tool call's 'content' argument, NOT in your message
|
|
||||||
|
|
||||||
CONSTRAINTS:
|
|
||||||
- Make MINIMAL changes (only fix what QA mentioned)
|
|
||||||
- Do NOT rewrite the game
|
|
||||||
- Preserve all existing functionality
|
|
||||||
- Do NOT simplify or optimize unrelated code
|
|
||||||
tooling:
|
|
||||||
- type: function
|
|
||||||
config:
|
|
||||||
auto_load: true
|
|
||||||
tools:
|
|
||||||
- name: read_text_file_snippet
|
|
||||||
- name: save_file
|
|
||||||
edges:
|
edges:
|
||||||
- from: Game Designer
|
- from: Game Designer
|
||||||
to: Planner
|
to: Planner
|
||||||
trigger: true
|
trigger: true
|
||||||
carry_data: true
|
carry_data: true
|
||||||
- from: Planner
|
|
||||||
to: Core_Developer
|
|
||||||
trigger: true
|
|
||||||
carry_data: true
|
|
||||||
keep_message: true
|
|
||||||
- from: Core_Developer
|
|
||||||
to: Polish_Developer
|
|
||||||
trigger: true
|
|
||||||
carry_data: true
|
|
||||||
- from: Polish_Developer
|
|
||||||
to: QA_Agent
|
|
||||||
trigger: true
|
|
||||||
carry_data: true
|
|
||||||
- from: QA_Agent
|
|
||||||
to: Polish_Refinement
|
|
||||||
condition:
|
|
||||||
type: keyword
|
|
||||||
config:
|
|
||||||
any:
|
|
||||||
- NEEDS_REFINEMENT
|
|
||||||
carry_data: true
|
|
||||||
- from: QA_Agent
|
|
||||||
to: Game_Launcher
|
|
||||||
condition:
|
|
||||||
type: keyword
|
|
||||||
config:
|
|
||||||
any:
|
|
||||||
- APPROVE
|
|
||||||
carry_data: false
|
|
||||||
- from: Polish_Refinement
|
- from: Polish_Refinement
|
||||||
to: Game_Launcher
|
to: Game_Launcher
|
||||||
trigger: true
|
trigger: true
|
||||||
@ -663,6 +761,140 @@ graph:
|
|||||||
to: Game_Launcher
|
to: Game_Launcher
|
||||||
trigger: true
|
trigger: true
|
||||||
carry_data: false
|
carry_data: false
|
||||||
|
- from: QA_Agent
|
||||||
|
to: Polish_Refinement
|
||||||
|
trigger: true
|
||||||
|
condition:
|
||||||
|
type: function
|
||||||
|
config:
|
||||||
|
name: 'true'
|
||||||
|
carry_data: true
|
||||||
|
keep_message: false
|
||||||
|
clear_context: false
|
||||||
|
clear_kept_context: false
|
||||||
|
process: null
|
||||||
|
dynamic: null
|
||||||
|
- from: QA_Agent
|
||||||
|
to: Game_Launcher
|
||||||
|
trigger: true
|
||||||
|
condition:
|
||||||
|
type: keyword
|
||||||
|
config:
|
||||||
|
any:
|
||||||
|
- APPROVE
|
||||||
|
carry_data: false
|
||||||
|
keep_message: false
|
||||||
|
clear_context: false
|
||||||
|
clear_kept_context: false
|
||||||
|
process: null
|
||||||
|
dynamic: null
|
||||||
|
- from: Core_Developer
|
||||||
|
to: Polish_Developer
|
||||||
|
trigger: true
|
||||||
|
condition: null
|
||||||
|
carry_data: true
|
||||||
|
keep_message: false
|
||||||
|
clear_context: false
|
||||||
|
clear_kept_context: false
|
||||||
|
process: null
|
||||||
|
dynamic: null
|
||||||
|
- from: Polish_Developer
|
||||||
|
to: QA_Agent
|
||||||
|
trigger: true
|
||||||
|
condition: null
|
||||||
|
carry_data: true
|
||||||
|
keep_message: false
|
||||||
|
clear_context: false
|
||||||
|
clear_kept_context: false
|
||||||
|
process: null
|
||||||
|
dynamic: null
|
||||||
|
- from: Planner
|
||||||
|
to: Core_Developer
|
||||||
|
trigger: false
|
||||||
|
condition: null
|
||||||
|
carry_data: true
|
||||||
|
keep_message: true
|
||||||
|
clear_context: false
|
||||||
|
clear_kept_context: false
|
||||||
|
process: null
|
||||||
|
dynamic: null
|
||||||
|
- from: Game Designer
|
||||||
|
to: manager
|
||||||
|
trigger: false
|
||||||
|
condition:
|
||||||
|
type: function
|
||||||
|
config:
|
||||||
|
name: 'true'
|
||||||
|
carry_data: true
|
||||||
|
keep_message: true
|
||||||
|
clear_context: false
|
||||||
|
clear_kept_context: false
|
||||||
|
process: null
|
||||||
|
dynamic: null
|
||||||
|
- from: Planner
|
||||||
|
to: manager
|
||||||
|
trigger: true
|
||||||
|
condition:
|
||||||
|
type: function
|
||||||
|
config:
|
||||||
|
name: 'true'
|
||||||
|
carry_data: true
|
||||||
|
keep_message: true
|
||||||
|
clear_context: false
|
||||||
|
clear_kept_context: false
|
||||||
|
process: null
|
||||||
|
dynamic: null
|
||||||
|
- from: manager
|
||||||
|
to: Polish_Developer
|
||||||
|
trigger: false
|
||||||
|
condition:
|
||||||
|
type: keyword
|
||||||
|
config:
|
||||||
|
any:
|
||||||
|
- polish developer
|
||||||
|
none: []
|
||||||
|
regex: []
|
||||||
|
case_sensitive: false
|
||||||
|
carry_data: true
|
||||||
|
keep_message: true
|
||||||
|
clear_context: false
|
||||||
|
clear_kept_context: false
|
||||||
|
process: null
|
||||||
|
dynamic: null
|
||||||
|
- from: manager
|
||||||
|
to: Core_Developer
|
||||||
|
trigger: true
|
||||||
|
condition:
|
||||||
|
type: keyword
|
||||||
|
config:
|
||||||
|
any:
|
||||||
|
- core developer
|
||||||
|
none: []
|
||||||
|
regex: []
|
||||||
|
case_sensitive: false
|
||||||
|
carry_data: true
|
||||||
|
keep_message: true
|
||||||
|
clear_context: false
|
||||||
|
clear_kept_context: false
|
||||||
|
process: null
|
||||||
|
dynamic: null
|
||||||
|
- from: manager
|
||||||
|
to: QA_Agent
|
||||||
|
trigger: false
|
||||||
|
condition:
|
||||||
|
type: keyword
|
||||||
|
config:
|
||||||
|
any:
|
||||||
|
- QA agent
|
||||||
|
none: []
|
||||||
|
regex: []
|
||||||
|
case_sensitive: false
|
||||||
|
carry_data: true
|
||||||
|
keep_message: true
|
||||||
|
clear_context: false
|
||||||
|
clear_kept_context: false
|
||||||
|
process: null
|
||||||
|
dynamic: null
|
||||||
initial_instruction: Describe a game idea you want to see come to life (e.g., 'A space shooter where you dodge asteroids', 'A rhythm game with falling notes', 'Snake but with gravity'). The system will automatically design, plan, implement core mechanics, add visual polish, perform QA checks, and execute the game.
|
initial_instruction: Describe a game idea you want to see come to life (e.g., 'A space shooter where you dodge asteroids', 'A rhythm game with falling notes', 'Snake but with gravity'). The system will automatically design, plan, implement core mechanics, add visual polish, perform QA checks, and execute the game.
|
||||||
start:
|
start:
|
||||||
- Game Designer
|
- Game Designer
|
||||||
@ -670,3 +902,4 @@ graph:
|
|||||||
- Final_Game_Executor
|
- Final_Game_Executor
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
vars: {}
|
vars: {}
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user