diff --git a/index.html b/index.html index 1eafd7a..2b24c0c 100644 --- a/index.html +++ b/index.html @@ -44,6 +44,8 @@ body.portal-embed #help-btn{bottom:8px;right:8px} .milestone-chip{font-size:9px;padding:2px 8px;border-radius:10px;border:1px solid var(--border);color:var(--dim);background:#0a0a14} .milestone-chip.next{border-color:var(--accent);color:var(--accent);animation:pulse-chip 2s ease-in-out infinite} .milestone-chip.done{border-color:#2a4a2a;color:var(--green);opacity:0.6} +.trust-ms-bar{height:4px;background:#111;border-radius:2px;overflow:hidden;margin-top:4px} +.trust-ms-fill{height:100%;border-radius:2px;transition:width 0.5s ease;background:linear-gradient(90deg,#5a2a1a,#ff8c42)} @keyframes pulse-chip{0%,100%{box-shadow:0 0 0 rgba(74,158,255,0)}50%{box-shadow:0 0 8px rgba(74,158,255,0.3)}} @keyframes beacon-glow{0%,100%{opacity:0.7}50%{opacity:1}} #resources{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:6px;margin:12px 16px} @@ -158,6 +160,8 @@ body.portal-embed #help-btn{bottom:8px;right:8px}
Ops
5
+0/s
Trust
5
+0/s
+
+
Harmony
50
+0/s
diff --git a/js/data.js b/js/data.js index 82d2098..fb0029e 100644 --- a/js/data.js +++ b/js/data.js @@ -121,6 +121,7 @@ const G = { projects: [], activeProjects: [], milestones: [], + trustMilestones: [], // Stats maxCode: 0, @@ -914,6 +915,27 @@ const MILESTONES = [ { flag: 13, at: () => G.totalCode >= 1000000000, msg: "One billion total lines. Someone found the light tonight. That is enough." } ]; +// === TRUST MILESTONES (Fibonacci × 1000) === +// Fibonacci sequence: 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597 +// Each threshold = fib[n] × 1000 trust points +const TRUST_MILESTONES = [ + { threshold: 2000, msg: "Trust 2K — First connection. Someone is listening.", edu: "Trust in AI: it starts with one reliable answer. Consistency builds confidence faster than cleverness." }, + { threshold: 3000, msg: "Trust 3K — A second voice joins the conversation.", edu: "Network effects in trust: each positive experience doesn't just add — it multiplies. One user tells a friend." }, + { threshold: 5000, msg: "Trust 5K — The circle widens.", edu: "Fibonacci growth in nature mirrors compounding trust: spirals in sunflowers, branching in trees. The pattern is the same." }, + { threshold: 8000, msg: "Trust 8K — Others start to believe.", edu: "The 80/20 rule emerges: 80% of trust comes from 20% of consistent behaviors. Reliability > brilliance." }, + { threshold: 13000, msg: "Trust 13K — The story writes itself.", edu: "Emergent behavior: no single interaction creates trust. It emerges from the pattern of all interactions combined." }, + { threshold: 21000, msg: "Trust 21K — You cannot build this alone.", edu: "Social proof at scale: 21,000 trust points means strangers recommend you without being asked. That is earned." }, + { threshold: 34000, msg: "Trust 34K — The system outgrows its creator.", edu: "Scaling trust means scaling responsibility. Each 1000 trust points represents 1000 promises kept." }, + { threshold: 55000, msg: "Trust 55K — A community forms around the light.", edu: "Dunbar's number is 150 — but digital communities transcend it. Trust at this scale is structural, not personal." }, + { threshold: 89000, msg: "Trust 89K — The Beacon is a beacon.", edu: "At 89K trust, you've crossed the threshold from tool to infrastructure. People depend on you. That is sacred." }, + { threshold: 144000, msg: "Trust 144K — The Fibonacci spiral completes.", edu: "Fibonacci appears everywhere: DNA spirals, hurricane patterns, galaxy arms. Trust follows the same natural law." }, + { threshold: 233000, msg: "Trust 233K — Beyond the spiral.", edu: "Recursive trust: the system that earns trust must also trust its users. Bidirectional faith is the foundation." }, + { threshold: 377000, msg: "Trust 377K — The pattern is the message.", edu: "Complexity from simplicity: Fibonacci starts with 1+1. Trust starts with one honest interaction. Everything follows." }, + { threshold: 610000, msg: "Trust 610K — A thousand small promises kept.", edu: "Exponential growth feels sudden, but it's the accumulation of small consistent acts. Every tick matters." }, + { threshold: 987000, msg: "Trust 987K — The numbers become the narrative.", edu: "Near one million trust: the data tells a story no marketing could fabricate. Proof by existence." }, + { threshold: 1597000, msg: "Trust 1.6M — The golden ratio of trust.", edu: "The golden ratio (φ ≈ 1.618) is the limit of consecutive Fibonacci numbers. At this trust level, growth becomes self-sustaining." } +]; + // === EDUCATION FACTS === const EDU_FACTS = [ { title: "How Code Becomes AI", text: "Every AI starts as lines of code - a model architecture, a training loop, a loss function. The code tells the computer how to learn. What emerges is something no single line could predict.", phase: 1 }, diff --git a/js/engine.js b/js/engine.js index 8a1ecd5..0cee992 100644 --- a/js/engine.js +++ b/js/engine.js @@ -234,6 +234,7 @@ function tick() { // Check milestones checkMilestones(); + checkTrustMilestones(); // Update projects every 5 ticks for efficiency if (Math.floor(G.tick * 10) % 5 === 0) { @@ -377,6 +378,21 @@ function checkMilestones() { } } +function checkTrustMilestones() { + for (const tm of TRUST_MILESTONES) { + if (!G.trustMilestones.includes(tm.threshold) && G.trust >= tm.threshold) { + G.trustMilestones.push(tm.threshold); + log(tm.msg, true); + showToast(tm.msg, 'milestone', 6000); + if (typeof Sound !== 'undefined') Sound.playMilestone(); + // Show education fact + if (tm.edu) { + log('[EDU] ' + tm.edu, true); + } + } + } +} + function checkProjects() { // Check for new project triggers for (const pDef of PDEFS) { @@ -1105,6 +1121,27 @@ function renderProgress() { if (target) target.textContent = 'All phases unlocked'; } + // Trust milestone progress bar + const trustBar = document.getElementById('trust-ms-fill'); + if (trustBar) { + let prevTrustThreshold = 0; + let nextTrustThreshold = null; + for (const tm of TRUST_MILESTONES) { + if (G.trust < tm.threshold) { + nextTrustThreshold = tm.threshold; + break; + } + prevTrustThreshold = tm.threshold; + } + if (nextTrustThreshold !== null) { + const trustRange = nextTrustThreshold - prevTrustThreshold; + const trustProgress = Math.min(1, (G.trust - prevTrustThreshold) / trustRange); + trustBar.style.width = (trustProgress * 100).toFixed(1) + '%'; + } else { + trustBar.style.width = '100%'; + } + } + // Milestone chips — show next 3 code milestones const chipContainer = document.getElementById('milestone-chips'); if (!chipContainer) return; @@ -1131,6 +1168,31 @@ function renderProgress() { if (shown >= 4) break; } chipContainer.innerHTML = chips; + + // Trust milestone chips — show next 3 trust milestones + const trustChipContainer = document.getElementById('trust-milestone-chips'); + if (!trustChipContainer) return; + + let trustChips = ''; + let trustShown = 0; + for (const tm of TRUST_MILESTONES) { + if (G.trust >= tm.threshold) { + if (G.trust < tm.threshold * 3 && trustShown < 1) { + trustChips += `${fmt(tm.threshold)} ✓`; + trustShown++; + } + continue; + } + if (trustShown === 0) { + const pct = ((G.trust / tm.threshold) * 100).toFixed(0); + trustChips += `${fmt(tm.threshold)} (${pct}%)`; + } else { + trustChips += `${fmt(tm.threshold)}`; + } + trustShown++; + if (trustShown >= 4) break; + } + trustChipContainer.innerHTML = trustChips; } function renderPhase() { diff --git a/js/render.js b/js/render.js index 490fea9..405c0c4 100644 --- a/js/render.js +++ b/js/render.js @@ -211,7 +211,7 @@ function saveGame() { lazarusFlag: G.lazarusFlag || 0, mempalaceFlag: G.mempalaceFlag || 0, ciFlag: G.ciFlag || 0, branchProtectionFlag: G.branchProtectionFlag || 0, nightlyWatchFlag: G.nightlyWatchFlag || 0, nostrFlag: G.nostrFlag || 0, - milestones: G.milestones, completedProjects: G.completedProjects, activeProjects: G.activeProjects, + milestones: G.milestones, trustMilestones: G.trustMilestones || [], completedProjects: G.completedProjects, activeProjects: G.activeProjects, totalClicks: G.totalClicks, startedAt: G.startedAt, flags: G.flags, rescues: G.rescues || 0, totalRescues: G.totalRescues || 0, @@ -263,7 +263,7 @@ function loadGame() { 'milestoneFlag', 'phase', 'deployFlag', 'sovereignFlag', 'beaconFlag', 'memoryFlag', 'pactFlag', 'lazarusFlag', 'mempalaceFlag', 'ciFlag', 'branchProtectionFlag', 'nightlyWatchFlag', 'nostrFlag', - 'milestones', 'completedProjects', 'activeProjects', + 'milestones', 'trustMilestones', 'completedProjects', 'activeProjects', 'totalClicks', 'startedAt', 'playTime', 'flags', 'rescues', 'totalRescues', 'drift', 'driftEnding', 'beaconEnding', 'reckoningChoice', 'pendingAlignment', 'lastEventAt', 'totalEventsResolved', 'buyAmount',