Skip to content

fireball#73

Merged
AgentService merged 4 commits intomainfrom
strategy_pattern_fireball
Oct 13, 2025
Merged

fireball#73
AgentService merged 4 commits intomainfrom
strategy_pattern_fireball

Conversation

@AgentService
Copy link
Copy Markdown
Owner

No description provided.

AgentService and others added 4 commits October 13, 2025 03:57
Implements impact-based area damage for projectile abilities, enabling
fireball-style explosions that damage multiple enemies on collision.

Core Changes:
- ProjectileAbility: Added impact_aoe_radius, impact_aoe_damage_mult, impact_effect properties
- AbilityProjectile: Implemented _apply_impact_aoe() with EntityTracker spatial queries
- AbilityProjectile: Added AnimatedSprite2D support for frame-based animations
- EntityPool: Registered fireball scene for object pooling

Fireball Implementation:
- 5-frame animated sprite (FB00_nyknck assets)
- 5000 base damage with 250px AoE explosion (80% damage multiplier)
- Expanding shockwave impact effect (0.5s radial gradient animation)
- Scene-based approach suitable for moderate projectile counts (5-10)

Technical Details:
- AoE excludes direct hit target to prevent double-damage
- Spatial queries via EntityTracker for O(1) radius lookups
- Impact effects spawn via PackedScene instantiation (self-despawning)
- AnimationPlayer-driven shockwave with additive blending

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Implemented build-up → sustained loop animation pattern for pooled projectiles:
- AnimatedSprite2D with dual animations: "default" (5-frame build-up) → "repeat" (2-frame loop)
- animation_finished signal transitions between phases automatically
- Animation reset in pool recycling ensures consistent frame state
- Dynamic impact effect scaling via set_aoe_radius()

Technical details:
- Signal connection check prevents duplicates when pooling
- Sprite sheet atlas (All_Fire_Bullet_Pixel_16x16) replaces individual frames
- Works with EntityPool reuse (no _ready() re-calls)
- Provides reusable pattern for multi-phase ability animations

Impact: Fireball charges up over 1s then pulses, creating satisfying visual progression

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Added comprehensive documentation for two-phase animation system:
- Two-phase animation pattern (build-up → sustained loop)
- Animation lifecycle with object pooling considerations
- Signal connection management for pooled entities
- Reusable multi-phase pattern for VFX/abilities/enemies

Key concepts documented:
- Pooled entities don't call _ready() on reuse (autoplay won't trigger)
- Explicit animation.play() in initialize() required
- animation_finished signal for state machine transitions
- Animation reset in reset() for consistent frame state
- is_connected() check prevents duplicate signal connections

Provides reference implementation from Fireball.tscn for future abilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@AgentService AgentService merged commit e061163 into main Oct 13, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant