Suspend gameplay when unfocused and fix playmate voice mismatches

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.
This commit is contained in:
Joel Brock
2026-06-22 15:14:40 -07:00
parent 185845f969
commit fadf1ccd50
2 changed files with 66 additions and 33 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
const CACHE_NAME = 'tortugotchi-v15';
const CACHE_NAME = 'tortugotchi-v17';
const ASSETS = [
'./',
'./index.html',