include info about asset sources file

This commit is contained in:
2025-09-24 11:19:00 +04:00
committed by nett00n
parent 83cc433c2f
commit 7b0db3abff
5 changed files with 529 additions and 12 deletions

View File

@@ -34,6 +34,12 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
- Currently supports English and Russian
- New translations: Add to `project.godot` internationalization section
### Asset Management
- **CRITICAL**: Every asset must be documented in `assets/sources.yaml` before committing
- Include source, license, attribution, modifications, and usage information
- Verify license compatibility with project requirements
- Commit asset files and sources.yaml together in the same commit
## Key Development Guidelines
### Scene Management
@@ -82,6 +88,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
1. Check `docs/MAP.md` for architecture understanding
2. Review `docs/CODE_OF_CONDUCT.md` for coding standards
3. Understand existing patterns before implementing new features
4. If adding assets, prepare `assets/sources.yaml` documentation
### Testing Changes
- Run project with F5 in Godot Editor
@@ -112,3 +119,22 @@ DebugManager.log_error("Failed to load audio resource: " + audio_path, "AudioMan
print("debug") # Use structured logging instead
push_error("error") # Use DebugManager.log_error() with category
```
### Asset Management Workflow
```yaml
# ✅ Required assets/sources.yaml entry format
audio:
music:
"background_music.ogg":
source: "https://freesound.org/people/artist/sounds/123456/"
license: "CC BY 4.0"
attribution: "Background Music by Artist Name"
modifications: "Converted to OGG, adjusted volume"
usage: "Main menu and gameplay background music"
# ✅ Proper commit workflow
# 1. Add asset to appropriate assets/ subdirectory
# 2. Update assets/sources.yaml with complete metadata
# 3. git add both files together
# 4. Commit with descriptive message including attribution
```

View File

@@ -159,6 +159,30 @@ push_error("error") # Use DebugManager.log_error() with context
if debug_mode: print("debug info") # Use DebugManager.log_debug()
```
### Asset Management
- **MANDATORY**: Every asset added to the project must be documented in `assets/sources.yaml`
- Include complete source information, license details, and attribution requirements
- Document any modifications made to original assets
- Verify license compatibility with project usage before adding assets
- Update sources.yaml in the same commit as adding the asset
```gdscript
# ✅ Correct asset addition workflow
# 1. Add asset file to appropriate assets/ subdirectory
# 2. Update assets/sources.yaml with complete metadata
# 3. Commit both files together with descriptive message
# Example sources.yaml entry:
# audio:
# sfx:
# "button_click.wav":
# source: "https://freesound.org/people/user/sounds/12345/"
# license: "CC BY 3.0"
# attribution: "Button Click by SoundArtist"
# modifications: "Normalized volume, trimmed silence"
# usage: "UI button interactions"
```
### Error Handling
- Always check if resources loaded successfully
- Use `DebugManager.log_error()` for critical failures
@@ -257,6 +281,26 @@ node.do_something() # Could crash if node doesn't exist
# Use autoloads instead
```
### Asset Management Violations
```gdscript
# ❌ Don't add assets without documentation
# Adding audio/new_music.mp3 without updating sources.yaml
# ❌ Don't use assets without verifying licenses
# Using copyrighted music without permission
# ❌ Don't modify assets without documenting changes
# Editing sprites without noting modifications in sources.yaml
# ❌ Don't commit assets and documentation separately
git add assets/sprites/new_sprite.png
git commit -m "add sprite" # Missing sources.yaml update
# ✅ Correct approach
git add assets/sprites/new_sprite.png assets/sources.yaml
git commit -m "add new sprite with attribution"
```
### Performance Issues
```gdscript
# ❌ Don't search nodes repeatedly

View File

@@ -165,13 +165,46 @@ audio/
### Visual Assets (`assets/`)
```
assets/
├── audio/
│ ├── music/ # Background music files
│ └── sfx/ # Sound effects
├── sprites/
│ ├── characters/skeleton/ # Character artwork
│ ├── gems/ # Match-3 gem sprites
│ └── ui/ # User interface elements
├── textures/
│ └── backgrounds/ # Background images
── fonts/ # Custom fonts
── fonts/ # Custom fonts
└── sources.yaml # Asset metadata and attribution
```
### Asset Management (`assets/sources.yaml`)
**REQUIRED**: Every asset added to the project must be documented in `assets/sources.yaml` with:
- **Source information** - Where the asset came from (URL, artist, store, etc.)
- **License details** - Usage rights, attribution requirements, commercial permissions
- **Attribution text** - Exact text to use for credits if required
- **Modification notes** - Any changes made to the original asset
- **Usage context** - Where and how the asset is used in the project
**Example format:**
```yaml
audio:
music:
"Space Horror InGame Music (Exploration) _Clement Panchout.wav":
source: "https://freesound.org/people/ClementPanchout/"
license: "CC BY 4.0"
attribution: "Space Horror InGame Music by Clement Panchout"
modifications: "Converted to WAV, loop points adjusted"
usage: "Background music for all gameplay scenes"
sprites:
gems:
"gem_blue.png":
source: "Created in-house"
license: "Project proprietary"
attribution: "Skelly development team"
modifications: "None"
usage: "Match-3 blue gem sprite"
```
## Data & Configuration
@@ -229,6 +262,7 @@ Game --> scenes/game/gameplays/match3_gameplay.tscn, clickomania_gameplay.tscn
AudioManager --> assets/audio/music/
SettingsManager --> localization/languages.json
AudioManager --> data/default_bus_layout.tres
Asset Management --> assets/sources.yaml (required for all assets)
```
## Logging System