Commit Graph

10 Commits

Author SHA1 Message Date
Brian Fertig eeebed10c0 feat(puzzle): enhance snap detection glow and UI selection feedback
- Extend SnapDetector to include distance and neighbor IDs in glow segment data
- Add CSS animations for spinning border shimmer effects on puzzle selection cards
- Implement dynamic hover/selection states with scale transform and glow effects on cards
- Add puzzle view mode guard to prevent interaction during completed state display
- Refactor piece glow system: replace static multi-pass lines with dynamic intensity-based fading, add per-piece preFX glow, and include proper cleanup of timers/glow FX
2026-04-06 19:16:48 -06:00
Brian Fertig 4d07fcb1c4 feat: implement responsive canvas scaling with Phaser.Scale.FIT and DOM overlay sync
- Replace manual CSS scaling in index.html with Phaser's built-in FIT mode,
  ensuring canvas always fits viewport while maintaining 1920×1080 aspect ratio.
- Add scale configuration to game config (Phaser.Scale.FIT, CENTER_BOTH).
- Refactor all DOM UI overlays to use fixed 1920×1080 dimensions with
  transform-origin: top-left and dynamic scaling based on canvas rect.
- Implement _syncOverlayToCanvas() in MainMenuScene, NewPuzzleScene, and
  PuzzleScene to keep DOM overlays perfectly aligned during resize events.
- Fix UI element positions in MainMenuScene and NewPuzzleScene to match new
  coordinate system (e.g., title from -30→45, buttons repositioned).
- Update Phaser CDN version from 3.9.0 to 3.90.0 (likely typo fix).
- Fix particle emitter creation syntax and stop() instead of on=false.
- Clean up resize listeners on scene shutdown to prevent memory leaks.
2026-04-05 23:17:14 -06:00
Brian Fertig 78b7a91fcd Added 180 and 250 piece puzzle options 2026-04-05 19:36:46 -06:00
Brian Fertig f58a01734e feat: Add 4 new music tracks and improve loading progress UI across scenes
- Added track_05.mp3 through track_08.mp3 with corresponding metadata to tracks.json
- Implemented consistent loading progress text (960,540 center, white on black stroke) in MainMenuScene, NewPuzzleScene, and PuzzleScene
- Added per-scene load progress listeners to show real-time loading percentage
- Ensured proper cleanup of progress text and event listeners on load completion
2026-04-05 17:40:13 -06:00
Brian Fertig 5b1c8214a6 feat: enhance puzzle rendering with clean textures and improved UI/UX
- Add clean texture variants (`piece_clean_N`) for merged pieces to remove outlines after grouping
- Improve piece renderer progress tracking to distinguish main vs. clean textures
- Support 140-piece puzzles (14×10 grid) across generator, menu, and selection scenes
- Auto-open join dialog when `?room=` URL parameter present in main menu
- Add shareable room link with copy-to-clipboard button in puzzle scene UI
- Introduce `_updatePieceEffects()` to manage visual states: clean textures for merged groups, drop shadows for singletons/groups
- Enhance music playback with fallback completion detection and robust event handling
2026-04-05 11:58:01 -06:00
Brian Fertig 9a353dbacf feat(ui): overhaul main menu with animated intro and modernized styling
- Replace static graphics-based UI with DOM-based buttons for better accessibility and styling control
- Add animated intro sequence (logo drop-in, sub-logo rise, button fade-in) with idle breathing pulse effect
- Implement persistent menu music using global sound manager with mute state persistence via localStorage
- Redesign color scheme to use deeper blues (#1565c0, #1e88e5) and accent gold (#ffbb4d) throughout menus
- Standardize DOM element sizes to fixed pixels instead of relative units (vmin)
- Refactor NewPuzzleScene to load background image only when needed and improve visual hierarchy
- Update button styling with consistent hover states, transitions, and disabled states
- Add puzzle piece preview cards with improved selection feedback (orange highlight)
- Stop menu music on entering PuzzleScene to avoid overlap between scenes
2026-04-05 10:19:54 -06:00
Brian Fertig 535825ba20 feat: Add main menu assets and refactor puzzle thumbnail handling
- Add main menu UI image and background music (with updated track metadata)
- Rename puzzle assets to include `.png` extensions for consistency
- Introduce `thumbnails.json` manifest to decouple thumbnail paths from puzzle data
- Update `NewPuzzleScene.js` to load thumbnails explicitly via manifest instead of inferring paths
- Update `PuzzleScene.js` to ensure full puzzle images are loaded fresh on initial entry (not during network joins or restores)
2026-04-05 09:53:11 -06:00
Brian Fertig 23065cf14d feat: add player name support for rooms and networked gameplay
- Add _playerName field to NetworkManager and pass it in createRoom/joinRoom calls
- Update MainMenuScene to prompt for player name before joining a room, persisting it to localStorage
- Update NewPuzzleScene to include a player name input field when creating local/multiplayer puzzles
- Enhance PuzzleScene with floating player name labels above claimed piece groups, using color-coded backgrounds
- Extend server-side room state to store per-player names and broadcast them on join/claim/release events
2026-04-04 20:58:41 -06:00
Brian Fertig 28d237f75d Add new puzzle assets (12 images + thumbnails), background selection UI, and persistent background state
- Added 12 new puzzle images with corresponding 576×324 thumbnails
- Extended `puzzles.json` to include all new puzzles
- Implemented background selection in `NewPuzzleScene.js` (Dark Wood / Green Felt)
- Updated thumbnail display logic to use `thumb_` prefixed versions
- Added background key/path state propagation to `PuzzleState`, network join, and room creation
- Tiled background texture across the playfield in `PuzzleScene.js`
- Enhanced room code UI styling for better visibility
2026-04-04 20:44:43 -06:00
Brian Fertig 9460041867 first commit 2026-04-04 18:51:09 -06:00