Pause the ocean decay/aging/hazard loops and ambient audio whenever the tab is
hidden or the window loses focus, and resume untouched on return. Remove the
offline catch-up decay so a turtle left alone freezes instead of dying, letting
turtles live and grow over a long real-world span.
Gate the playmate greeting/farewell voice clips (letsPlay/swimSafe) to the
green species whose text they match; loggerhead and leatherback play silently.
Also keep glub out of the ambient loop while a voice line plays. Bump SW to v17.
Pair each growth thought with its matching voice clip instead of always
playing 'I think I grew a little'. Lines without a matching clip now play no
audio, and 'Another day in the deep blue' plays the deepBlue clip. Bump SW to v15.
Lower the per-tick beaching chance from 18% to 4% and add a 5-minute cooldown
so beaching stays an occasional event instead of interrupting ocean play every
minute. Bump service worker cache to v14.
Capture the turtle's name on the start screen so it is set before the beach,
beaching, and migration screens. Populate the beaching notice and migration
bonus text from turtleName (previously hardcoded 'Shelly'), pre-fill the
rename modal, and send migration-continue straight to the ocean since the
turtle is already named.
Map the new turtvox clips to their matching speech bubbles (tickle replies,
species feeding, playmate greeting/farewell, salve, growth) and add
glub_glub_glub to the ambient underwater loop. Precache new media (v12 -> v13).
Wire turtvox voice clips to their matching speech bubbles (predator alert,
shell bite, plastic ingestion, propeller strike, tickle reward, idle musing)
and loop water SFX as ambient underwater sound throughout the ocean scene.
Precache media in the service worker (v11 -> v12) for offline playback.
Also fix raw control bytes in the name-sanitization regex.
Vanilla HTML/CSS/JS Tamagotchi-style game with three species
(green, loggerhead, leatherback), persistent idle progression,
hazard QTEs (sharks, boats, ghost nets, tourists), and offline
PWA support via service worker. Includes README with cited
conservation resources and research.