Commit Graph
7 Commits
Author SHA1 Message Date
Joel Brock 3a4c2579a5 Reduce beaching event frequency
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.
2026-06-20 11:50:33 -07:00
Joel Brock ac69e456d9 Use the custom turtle name consistently across all screens
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.
2026-06-20 11:44:47 -07:00
Joel Brock 5385e10a41 Wire remaining voice clips and add glub to ambient loop
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).
2026-06-20 11:39:48 -07:00
Joel Brock 762a698db4 Add turtle voice lines and ambient water SFX
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.
2026-06-20 11:05:51 -07:00
Joel Brock 7bc83a782d Security hardening: CSP headers, SW scope gating, save validation
- _headers: add CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, HSTS, COOP, CORP, COEP
- sw.js: gate fetch handler to GET + http(s) + same-origin; return 504 on offline non-document failures; bump cache to v11
- app.js: validate every field of the localStorage save (allowlist species, clamp stats, coerce age, reject oversized payloads, strip HTML-relevant chars from name); apply same sanitizer to rename input
2026-05-27 12:41:11 -07:00
Joel Brock f52f99b647 Add Cloudflare Pages _headers for service worker freshness 2026-05-26 16:38:50 -07:00
Joel Brock b5499bd618 Initial commit: Tortugotchi sea turtle conservation PWA
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.
2026-05-26 16:29:24 -07:00