Now I'll build the experience. Plan: SIGNAL//TILES — a live-camera sliding puzzle driven by MediaPipe hand tracking (pinch to slide tiles), rendered on a 60fps canvas compositor, with a synth-feed fallback, sci-fi HUD, and polished intro/boot flow.
Starting with the foundation files:
Foundation done. Now the hand-tracking engine (MediaPipe HandLandmarker hook) and the intro screen:
Now the core game screen — canvas compositor, puzzle engine wiring, gesture loop, HUD, boot sequence, and win state:
Now let's verify the build:
Build passed. Let me fix a few logic issues I spotted: duplicate boot lines when the tracker finishes loading, synth-mode boot labeling, and the scan beam height on large boards.
One final safeguard — the boot effect should wait for the tracker to actually initialize in live mode:
Build is clean. SIGNAL//TILES is complete — a real-time, gesture-controlled sliding puzzle that turns your live webcam feed into the puzzle image.
How it works
Vision pipeline (browser-native equivalent of the Python/OpenCV/MediaPipe stack)
getUserMedia captures the live camera; every frame is center-cropped to a square and sliced into n² tiles via canvas drawImage at 60fps
- MediaPipe HandLandmarker (WASM + GPU, via
@mediapipe/tasks-vision) infers 21 hand landmarks per frame, fully on-device
- Pinch detection: the thumb-tip ↔ index-tip distance normalized by palm size, with hysteresis thresholds to eliminate flicker — point with your index finger to aim, pinch to slide
Game engine
- 3×3 / 4×4 / 5×5 grids with guaranteed-solvable shuffles (random-walk from solved state)
- Classic 15-puzzle mechanics: pinching any tile in the empty cell's row/column slides the whole train with buttery lerp animation
- Mirrored feed + mirrored cursor for natural selfie-style interaction; mouse/touch click works as a full fallback
Experience layer
- Cinematic intro with kinetic typography, animated pinch-gesture diagram, and spec marquee
- Cinematic boot sequence: "ACQUIRING OPTICS → HAND LANDMARKER LOADED → SCRAMBLING SIGNAL"
- Sci-fi HUD: elapsed time, move counter, tracking status chip with live tracker FPS, grid density selector, scramble
- Hand Cam panel rendering the live feed with the full 21-landmark skeleton overlay, pinch line, and searching reticle
- Hover path previews, deny flashes, glowing pinch cursor with crosshair ticks, WebAudio synth feedback (slides, denies, win arpeggio)
- Solve detection reveals the hidden final piece with a pop, triggers a confetti-particle burst, a shine sweep, and a stats overlay
- Camera denied? An animated "SYNTH FEED" gradient signal steps in so the game stays fully playable
Files built: index.html, src/index.css, src/lib/puzzle.ts, src/lib/sound.ts, src/hooks/useHandTracker.ts, src/components/IntroScreen.tsx, src/components/GameScreen.tsx, src/App.tsx