-
Notifications
You must be signed in to change notification settings - Fork 0
feat(td-062): Fix actor sprite clipping through obstacles during animation #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Updated TD_062 to use discrete movement (Option B) instead of sub-cell waypoints - Renamed ADR-022 from 'Three-Position Model' to 'Temporal Decoupling Pattern' - Added Amendment 1 to ADR-022 supporting both discrete and interpolated visual modes - Discrete movement completely eliminates sprite clipping (impossible by design) - Reduces implementation time from 2.5h to 45min - Genre-appropriate for roguelike tactical games Technical changes: - Remove all position tweening/interpolation for actors - Add visual feedback (flash + future particle effects) - Keep door open for step animations (Option C) when sprites ready - Pattern now applies broadly to all temporal decoupling needs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
…ation Completely eliminates sprite clipping by replacing linear interpolation with discrete movement: - Remove all tweening from ActorView.cs movement methods - Implement instant position updates (teleportation between tiles) - Add visual feedback with flash effects on tile arrival - Add progressive path animation with 200ms delays between teleports - Maintain thread-safe deferred call patterns Technical implementation: - ProcessPendingActorMoves(): Direct position assignment instead of CreateTween() - ProcessPendingPathAnimations(): Calls new AnimatePathProgression() method - OnTileArrival(): 1.3f brightness flash with 0.1f fade duration - AnimatePathProgression(): Tile-by-tile progression with visual feedback Result: Zero clipping risk (impossible by design) + responsive visual feedback 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Moves TD-062 from active backlog to completed archive after successful implementation: - Update TD-062 status to ✅ DONE in active backlog - Archive complete item with implementation details to Completed_Backlog.md - Update ARCHIVE_INDEX.md with TD-062 entry and current stats - Maintain backlog organization per CLAUDE.md archival protocol TD-062 implementation summary preserved in archive: - Discrete movement solution eliminating sprite clipping - 3-phase implementation with visual feedback - Zero clipping risk by design (no interpolation) - Build successful with all tests passing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
🔍 Code Review for PR #67: Fix actor sprite clipping through obstaclesOverall Assessment: ✅ APPROVED with minor suggestionsThis PR elegantly solves the sprite clipping issue using a discrete movement approach. The solution is architecturally sound, genre-appropriate, and significantly simpler than the originally proposed sub-cell waypoint system. ✅ Strengths1. Elegant Simplicity
2. Clean Architecture Adherence
3. Visual Feedback Design
4. Documentation Excellence
🎯 Code Quality ObservationsThread Safety ✅The use of ConcurrentDictionary and proper locking around queue operations ensures thread safety: lock (_pendingActorMoves)
{
_pendingActorMoves.Enqueue(new ActorMoveData(...));
}
CallDeferred("ProcessPendingActorMoves"); Error Handling ✅Comprehensive try-catch blocks with proper logging at appropriate levels.
|
Summary
Completely eliminates actor sprite clipping through walls/obstacles during movement animation by implementing a discrete movement solution. Sprites now teleport tile-by-tile with visual feedback instead of using linear interpolation that could cut through obstacles.
Changes Included
Commit 1: Core Implementation (acb666e)
Commit 2: Documentation & Archive (905abf5)
Problem Solved
Before: Actor sprites would slide diagonally through walls when moving around corners due to linear interpolation between grid positions.
After: Actors teleport instantly between tiles with visual feedback, making clipping impossible by design (no interpolation = no diagonal movement).
Technical Implementation
Phase 1: Core Fix (15 min)
Phase 2: Visual Feedback (20 min)
Phase 3: Path Animation (10 min)
Impact
Testing
Future Enhancements
🤖 Generated with Claude Code