Files
BreakEscape/js/utils
Z. Cliffe Schreuders 2e62a4e62b feat(room-layout): Implement new grid-based room layout system with critical bug fixes
- Add grid unit constants (5x4 tiles) to constants.js
- Create comprehensive grid conversion helper functions
- Implement 4-direction room positioning (N/S/E/W) with breadth-first algorithm
- Add door placement functions with CRITICAL fixes:
  * Negative modulo fix: ((sum % 2) + 2) % 2 for deterministic placement
  * Asymmetric alignment fix: single-door rooms align with multi-door rooms
  * Consistent grid alignment using Math.floor() for negative coordinates
- Rewrite calculateRoomPositions to support variable room sizes
- Update createDoorSpritesForRoom to use new placement system
- Store room dimensions globally for cross-system access

This implements the comprehensive room layout redesign as specified in
planning_notes/new_room_layout with all critical fixes from review2.

Addresses: Variable room sizes, proper door alignment, and grid-based positioning
2025-11-16 08:45:06 +00:00
..
2025-11-14 19:47:54 +00:00
2025-11-14 19:47:54 +00:00