When a player is successfully tackled, they now experience a realistic fall animation:
- Immediately decelerate to 0 velocity
- Stay down for 500ms (configurable via TACKLE_FALL_DURATION)
- Resume normal movement after recovery period
Changes:
- Added TACKLE_FALL_DURATION constant (500ms)
- Added fall state tracking to Player class (isFallen, fallRecoveryTime)
- Implemented fall() method to trigger the fall state
- Updated update() to handle fallen state and prevent movement during recovery
- Modified executeTackle() to call fall() instead of just reducing velocity
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added a realistic tackling system where players can physically contest for the puck:
- Player-player collisions trigger tackle calculations based on tackling vs balance attributes
- Tackle success uses skill-based formula with configurable modifier
- Successful tackles can steal puck or knock it loose (60% chance)
- Cooldown system prevents rapid successive tackles (1s between attempts)
- Tackled players experience significant momentum loss on successful tackles
Also improved player movement physics:
- Added smooth acceleration/deceleration with ease-out curves
- Players now gradually build up speed (10 m/s²) and brake quickly (20 m/s²)
- More realistic stopping behavior when reaching target positions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add defensive AI: players now chase puck carriers on opposing team
- Update DefensiveBehavior to check opponent possession and target puck position
- Increase player rotation speed from 3 to 10 rad/s for more responsive turning
- Update Claude settings permissions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add away team defender (LD) for testing behaviors
- Add direction indicator (white line) showing player facing direction
- Initialize player facing angle based on team (home faces right, away faces left)
- Implement speed-based turning physics (faster = wider turns, rotation drops to 30% at max speed)
- Add debug visualizations for player targets (line and X marker) when DEBUG is true
- Increase rotation speed constant from 1 to 3 rad/s for more responsive turning
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Separate base behavior nodes into BehaviorNodes.ts (fixes circular dependency)
- Organize behaviors by role (goalie) and context (offensive/defensive/transition)
- Add modular behavior subtrees:
- GoalieBehavior: Track puck position near net
- SkaterBehavior: Route to context-specific behaviors
- PuckCarrierBehavior: Shoot/carry logic (Phase 4)
- OffensiveSupportBehavior: Placeholder for Phase 5
- DefensiveBehavior: Placeholder for Phase 6
- TransitionBehavior: Chase loose puck
- Maintain backward compatibility with static evaluatePlayer()
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>