improvements
This commit is contained in:
82
plans/base_character_dialogue_plan.md
Normal file
82
plans/base_character_dialogue_plan.md
Normal file
@@ -0,0 +1,82 @@
|
||||
# Base Character Scene with Dialogue System Design Plan
|
||||
|
||||
## Overview
|
||||
Create a base character scene with:
|
||||
1. A sprite/shape (using Polygon2D for now)
|
||||
2. A dialogue entity that can be triggered programmatically
|
||||
3. Visual dialogue box with animation and character-by-character text reveal
|
||||
4. Test scene to demonstrate the behavior
|
||||
|
||||
## Implementation Steps
|
||||
|
||||
### 1. Base Character Scene Design
|
||||
- Create a new scene file `scenes/base_character.tscn`
|
||||
- Add a Polygon2D node as the character sprite
|
||||
- Add necessary child nodes for dialogue system integration
|
||||
- Set up proper positioning and scaling
|
||||
|
||||
### 2. Dialogue UI System
|
||||
- Create dialogue box UI with:
|
||||
- Background rectangle (white)
|
||||
- Text display area
|
||||
- Animation for showing/hiding
|
||||
- Implement character-by-character text reveal
|
||||
- Handle timing and duration logic
|
||||
|
||||
### 3. Dialogue Action Integration
|
||||
- Extend or modify DialogueAction to use new UI system
|
||||
- Ensure compatibility with existing cutscene manager
|
||||
- Add proper signal handling for animation completion
|
||||
|
||||
### 4. Test Scene
|
||||
- Create test scene `scenes/test_dialogue.tscn`
|
||||
- Add base character instance
|
||||
- Automatically trigger dialogue on scene load
|
||||
- Demonstrate the complete functionality
|
||||
|
||||
## Technical Details
|
||||
|
||||
### Base Character Scene Structure
|
||||
```
|
||||
Node2D (root)
|
||||
├── Polygon2D (character sprite)
|
||||
└── DialogueSystem (script for handling dialogue UI)
|
||||
```
|
||||
|
||||
### Dialogue System Components
|
||||
1. **DialogueBox**: Visual element that appears when dialogue is triggered
|
||||
2. **TextRevealer**: Handles character-by-character text display
|
||||
3. **AnimationController**: Manages show/hide animations
|
||||
4. **Timer**: Controls duration of dialogue display
|
||||
|
||||
### DialogueAction Integration Points
|
||||
- `start()` method should trigger UI display
|
||||
- Text and duration parameters should be passed to UI system
|
||||
- Completion signal should be properly emitted
|
||||
|
||||
## File Structure
|
||||
```
|
||||
scenes/
|
||||
├── base_character.tscn
|
||||
└── test_dialogue.tscn
|
||||
|
||||
scripts/
|
||||
├── dialogue_system.gd
|
||||
└── base_character.gd
|
||||
|
||||
cutscene/
|
||||
└── actions/
|
||||
└── DialogueAction.gd (modified)
|
||||
```
|
||||
|
||||
## Implementation Approach
|
||||
1. First, create the base character scene with Polygon2D
|
||||
2. Implement the dialogue UI system in a separate script
|
||||
3. Modify DialogueAction to integrate with new UI system
|
||||
4. Create test scene that demonstrates functionality
|
||||
5. Ensure all components work together within existing cutscene framework
|
||||
|
||||
## Animation Requirements
|
||||
- Dialogue box should animate in (fade/slide)
|
||||
- Text should reveal character-by-character with delay
|
||||
- Dialogue box should animate out after duration ends
|
||||
Reference in New Issue
Block a user