add basic match3 logic

use proper logging everywhere
add gamepad and keyboard control on match3 gameplay
This commit is contained in:
2025-09-24 16:58:08 +04:00
parent e76297b3f3
commit bbf512b675
14 changed files with 466 additions and 63 deletions

View File

@@ -21,6 +21,12 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
- Match-3 debug controls include gem count adjustment and board reroll
- Difficulty presets: Easy (3 gems), Normal (5 gems), Hard (8 gems)
- Gameplay mode switching: Space+Enter in game scene switches between match-3 and clickomania modes
- **Match-3 Gem Movement Testing**:
- Keyboard: Arrow keys or WASD to navigate, Enter to select/confirm
- Gamepad: D-pad to navigate, A button to select/confirm
- Visual feedback: Selected tiles glow brighter with scale and color effects
- Invalid swaps automatically revert after animation
- State machine: WAITING → SELECTING → SWAPPING → PROCESSING
- Test scripts located in `tests/` directory for system validation
- Use `test_logging.gd` to validate the logging system functionality
@@ -60,11 +66,13 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
- Remove debug prints before committing unless permanently useful
### Logging System Usage
- **CRITICAL**: ALL print() and push_error() statements have been migrated to DebugManager
- **ALWAYS** use `DebugManager` logging functions instead of `print()`, `push_error()`, etc.
- Use appropriate log levels: INFO for general messages, WARN for issues, ERROR for failures
- Include meaningful categories to organize log output: `"GameManager"`, `"Match3"`, `"Settings"`
- Include meaningful categories to organize log output: `"GameManager"`, `"Match3"`, `"Settings"`, `"Game"`, `"MainMenu"`, `"PressAnyKey"`, `"Clickomania"`, `"DebugMenu"`
- Leverage structured logging for better debugging and production monitoring
- Use `DebugManager.set_log_level()` to control verbosity during development and testing
- The logging system provides unified output across all game systems
## Important File References
@@ -78,9 +86,11 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
- `src/autoloads/GameManager.gd` - Scene transition patterns and gameplay mode management
- `src/autoloads/DebugManager.gd` - Debug system integration
- `scenes/game/game.gd` - Main game scene with modular gameplay system
- `scenes/game/gameplays/match3_gameplay.gd` - Match-3 implementation reference
- `scenes/game/gameplays/match3_gameplay.gd` - Match-3 implementation with keyboard/gamepad gem movement system
- `scenes/game/gameplays/tile.gd` - Individual tile behavior with visual feedback and input handling
- `scenes/game/gameplays/` - Individual gameplay mode implementations
- `project.godot` - Input actions and autoload definitions
- Gem movement actions: `select_gem`, `move_up/down/left/right`
## Development Workflow