A fog-of-war map over real GPS. Offline tiles, one-polygon fog, noise-hardened dwell detection.
Built two months after moving to Singapore — new city, new marriage, every guide pointing to the same ten places. So I made exploring the rest a game: clear the hex cell (H3) you linger in, get near a landmark to collect it. 100 landmarks — 10 curated, 90 auto-resolved from GPS.
The naive build fails three ways: tiles need network, rendering explored cells one-by-one means ~120k features choking the RN bridge, and GPS noise paints cells you never visited. Offline, one polygon, hardened dwell — or it doesn't work.
Pure exploration core (dwell, distance, geometry — unit-tested) under a thin RN shell. One coordinate stream in, fog and discoveries out.
One masking polygon however much you clear. Dwell survives noise. Discovery keys on raw coordinates. Fully offline.
Pre-fetched offline tile pack via OfflineManager — traded initial download size for zero runtime tile calls.
Fog as ONE polygon with H3 cells punched as holes — avoided ~120k individual features, bypassing RN bridge bottlenecks and pan stutter.
Noise-hardened dwell: dropped >50m GPS jumps to prevent false discoveries — data integrity over raw plotting.
Discovery via haversine on raw coordinates. Hidden POIs stay out of the render tree until found.
Pure functions at the core, thin RN shell outside — that split is why it's testable.
GPS noise scenarios run as unit tests, not field walks.
The pattern transfers: logic pure, shell dumb.