Implement collision detection for unit movement #12

Open
opened 2026-01-21 14:14:33 -06:00 by cecilgol · 0 comments
Owner

#11

  • Create OccupiedCells resource (HashSet<(i32, i32)>)
  • Create system to populate OccupiedCells from unit positions
  • Update OccupiedCells when units move
  • Check target cell in OccupiedCells before movement
  • Reject movement if cell occupied
  • Add visual/audio feedback for invalid moves
  • Verify battlefield bounds are also checked
  • Test multiple units can't stack
  • Test moving unit frees its previous cell
  • Consider edge case: unit moving back and forth rapidly
#11 - [ ] Create OccupiedCells resource (HashSet<(i32, i32)>) - [ ] Create system to populate OccupiedCells from unit positions - [ ] Update OccupiedCells when units move - [ ] Check target cell in OccupiedCells before movement - [ ] Reject movement if cell occupied - [ ] Add visual/audio feedback for invalid moves - [ ] Verify battlefield bounds are also checked - [ ] Test multiple units can't stack - [ ] Test moving unit frees its previous cell - [ ] Consider edge case: unit moving back and forth rapidly
cecilgol added this to the gamedev project 2026-01-21 14:14:34 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cecilgol/CryOfTheLoon#12
No description provided.