Community milestones

This commit is contained in:
2026-10-21 13:26:16 -04:00
parent a9f578571c
commit 1ff14c8d15
5 changed files with 203 additions and 13 deletions
+23 -2
View File
@@ -38,7 +38,7 @@ The goal is to make waiting social and consequential without rewarding button sp
1. **Optional live presence — implemented.** Show participating players watching the clock and who is viewing Chat. Off by default; ephemeral heartbeats, automatic expiry, and no activity history. See the details below.
2. **Personal bests and rivalries — implemented.** Your score shows closest call, highest-scoring press, leaderboard position, and the player immediately ahead with points needed to catch up. Existing history is credited automatically; no data migration is needed.
3. **Achievements — implemented.** Close call, Full spectrum, and Keeping us alive appear under Your score with unlock dates and progress. Existing press history counts, with no bonus points or press-volume rewards.
4. **Infrequent community milestones.** Announce survival milestones, notable press totals, and new closest-call records in chat. Deduplicate announcements and keep them rare. Define thresholds and historic backfill behavior before implementation.
4. **Community milestones — implemented.** Eight one-time shared goals post gold announcements in chat. Unlocks persist across restarts, and historical milestones are silently credited on upgrade.
5. **Optional zone alerts.** Let players choose a zone and opt into sound or browser notifications. Request permissions only after an explicit action, alert on transitions rather than polls, and handle resets and denied permissions. Closed-browser delivery is separate work, not promised by basic tab notifications.
6. **Separate one-life mode — exploratory.** Allow one press per player per round in a separate mode with its own rounds and leaderboard. Never silently change the current game or reset its data.
@@ -67,7 +67,28 @@ Your score includes eight private achievements, derived from the game's existing
Quiet time is measured from the previous press by **any** player, or from game start if there was no previous press. It is not the time since your own last press. The earliest qualifying press determines each unlock date. Progress is based on completed presses, not idle time accumulating while the page is open. These are badges only: they do not change scores, publish chat announcements, or reward repeated resets.
Historical JSON imports and existing SQLite history are credited automatically. No new table or manual migration is required; badges are recomputed from history after restart. They remain available after game over and refresh with Your score. Personal achievements are returned only by authenticated `GET /api/me`, not by the public leaderboard or final leaderboard. Community milestones are next on the roadmap.
Historical JSON imports and existing SQLite history are credited automatically. No new table or manual migration is required for personal achievements; badges are recomputed from history after restart. They remain available after game over and refresh with Your score. Personal achievements are returned only by authenticated `GET /api/me`, not by the public leaderboard or final leaderboard.
### Community milestones
There are **eight community milestones**, matching the eight personal achievements. Each posts once to the shared chat, with distinct gold styling:
| Milestone | Community goal |
|-----------|----------------|
| One day together | Survive 24 hours. |
| A week of nerve | Survive 7 days. |
| Thirty days strong | Survive 30 days. |
| A growing crowd | Reach 10 registered players. |
| Fifty strong | Reach 50 registered players. |
| A hundred second chances | Reach 100 presses. |
| A thousand moments | Reach 1,000 presses. |
| Our first photo finish | First successful press with more than zero but less than 10 seconds left. |
Survival milestones use real elapsed time since game start, not scaled countdown durations, and never count time after the game deadline/end. They are checked by the server watcher and normal state requests, even without presses. The photo finish is a single community first, not an announcement for every improved record. No milestone gives bonus points.
Milestone unlocks are stored in SQLite separately from player chat, and share the latest-100-message feed. They have no player dependency and do not affect chat cooldowns. Registration/press milestone unlocks commit with the corresponding game update. Repeated requests, watchers, and restarts cannot announce a goal twice. The first upgrade/import silently records already-reached goals to avoid flooding chat; future newly-reached goals announce normally. On later restarts, newly crossed survival milestones are announced once. Missed goals are never replayed repeatedly.
Optional zone alerts are the next roadmap step.
### Live presence