You are helping me restructure a Godot 3.x game project that has become disorganized over time. The project has scripts scattered between actors, common scripts folders, and various other locations. I need to create a clean, maintainable structure before porting to Redot Engine.
CURRENT PROBLEMS:
- Scripts are scattered across multiple folders without clear organization
- No clear separation between game systems, actors, utilities, and shared code
- Mixing of actor-specific scripts with reusable components
- Unclear dependencies between scripts
- Both Godot and Unity versions exist with different assets
YOUR TASK:
1. First, analyze the current project structure and identify all GDScript files
2. Categorize each script by its purpose and dependencies
3. Propose a clean, scalable folder structure following these principles:
- Clear separation of concerns
- Reusable components in dedicated folders
- Actor-specific scripts organized by type
- Shared utilities and helpers in common locations
- Assets organized by type and usage
ANALYSIS STEPS:
1. List all .gd files in the project with their current locations
2. For each script, identify:
- Is it actor-specific or reusable?
- What other scripts does it depend on?
- Should it be a component, system, or utility?
- Can it be merged with similar scripts?
3. Suggest refactoring for scripts that do too much
4. Identify duplicate functionality that can be consolidated
5. Create a migration plan showing:
- Current location → New location
- Scripts to refactor/split
- Scripts to merge
- New base classes needed
REFACTORING PRINCIPLES:
- Single Responsibility: Each script does one thing well
- DRY: Eliminate duplicate code
- Composition over inheritance where practical
- Clear naming conventions (snake_case for files, PascalCase for classes)
- Group related functionality together
- Separate data from logic where appropriate
OUTPUT FORMAT:
1. Current structure analysis with problems identified
2. Detailed new structure with explanations
3. Step-by-step migration plan
4. List of scripts needing refactoring with reasons
5. Dependency graph of major systems
Please analyze my project structure and provide a comprehensive restructuring plan. Focus on creating a clean foundation that will make the Redot migration smoother