feat: Ambient Presence Map — Shadow silhouettes, Reveal Pulse, Radio Radius, Vibe Match AR, Digital Drink, Mystery Box#5
Draft
cloudygetty-ai wants to merge 2 commits into
Conversation
Six interlocking systems, all under src/features/ambientPresence/: - Shadow Map (AmbientPresenceMap + SilhouettePin): users render as anonymised silhouettes offset by a randomised shadowOffset; exact positions are never exposed on the map surface. - Reveal Pulse (RevealPulseEngine + RevealPulseLayer): every 5 minutes a 10-second window fires where silhouettes sharpen, labels appear, and the map breathes a gold overlay. Engine is timer-driven and fully stoppable to prevent leaks on unmount. - Radio Radius (RadioRadiusService): computeRadioMatches returns all users within 300 world units sorted by distance; selectVibeMatch scores genre overlap + BPM proximity + closeness to pick the single best AR target. - Vibe Match AR (VibeMatchGlow): breathing concentric gold rings placed beneath the highest-scored silhouette — cinematic, not technical. - Digital Drink (DigitalDrinkService + DigitalDrinkPanel): token invitation system with a 3.5-minute song-length timer. Token auto-melts on expiry; accept/decline resolve immediately. Both outgoing and incoming panels share one StyleSheet, Deep Noir palette. - Mystery Box (MysteryBoxService + MysteryBoxBanner): hourly clue drops surface a random interest from a nearby user without revealing who. Banner fades in sharply, holds 8 s, then dims to a persistent 40% until the next drop. State is managed in a single Zustand store (useAmbientPresenceStore) with mount/unmount lifecycle hooks that own all timers. 35 new tests cover all pure-logic modules; 0 regressions (142 total, was 107). https://claude.ai/code/session_01KaZr9b1uR49iyrm26586SW
Routes / → demo.html so the browser game is served at the project root. https://claude.ai/code/session_01KaZr9b1uR49iyrm26586SW
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Six interlocking social-discovery systems under
src/features/ambientPresence/, fully self-contained and importable from a single barrel (src/features/ambientPresence/index.ts).What was built
AmbientPresenceMap,SilhouettePinshadowOffset— exact position never exposedRevealPulseEngine,RevealPulseLayerRadioRadiusServicecomputeRadioMatchesreturns all users within 300 world units;selectVibeMatchscores genre + BPM + proximityVibeMatchGlowDigitalDrinkService,DigitalDrinkPanelOutgoingTokenPanel+IncomingTokenPanelshare one Deep Noir stylesheetMysteryBoxService,MysteryBoxBannerArchitecture
useAmbientPresenceStore) owns all state;mount()/unmount()manage timers cleanlyGameMap(worldPos - viewportOffset = screenPos)Palette — Deep Noir
#0A0810#C0A060#7B4F8A#8B1A2E#E8E0D0Test plan
RevealPulseEngine— 6 tests covering interval fire, end-timeout, stop cancellation,fireImmediateDigitalDrinkService— 12 tests coveringcreateToken,resolveToken(all four accept/expire combinations),isMelted,timeRemainingMs,progressFractionambientPresenceStore— 14 tests covering radio match computation, pulse reveal/unrevealing, token send/accept/decline/tick, mystery clue generationtsc --noEmitcleanhttps://claude.ai/code/session_01KaZr9b1uR49iyrm26586SW
Generated by Claude Code