Skip to content

Folder Game

The game is here

Features:

  • Office-themed hidden object game
  • Static folders with:
    • Department labels (HR, Finance, Engineering)
    • Document types (CONFIDENTIAL, Q4 REPORT)
  • Rectangular click detection
  • Life system (3 lives)

Changes:

  • Added drag-and-drop functionality
  • Folders scramble on new rounds
  • Drop verification zone (bottom-right)
  • Removed click penalties (only drop-zone checks)
  • Issues:
    • preventDefault console warnings
    • Inconsistent drop detection

Fixes/Improvements:

  • Replaced rectangular detection with radius-based check:

    const distance = Math.sqrt(Math.pow(xDist, 2) + Math.pow(yDist, 2));
  • Visual upgrades:

    • Circular drop zone (rounded-full)

    • Drag highlight effects

  • Better mobile touch support

Technical Improvements:

  • Fixed Chrome passive event warnings:
window.addEventListener("touchmove", handler, { passive: false });
  • Added CSS:
touch-action: none;
Unified mouse/touch event handling```

Critical Fixes:

  • Corrected bottom-right positioning:
left: 100 - zoneWidth; // True right-edge
top: 100 - zoneHeight; // True bottom-edge
  • Fixed coordinate math:

  • Container offset compensation

  • Pixel/percentage conversion

  • Enhanced visual feedback