Compare commits

...

29 Commits

Author SHA1 Message Date
Alexander Whitestone
5655aa0aca wip: pulse animation on resource value gains
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
Resources now scale up + glow briefly when they increase meaningfully
(>0.1% and >0.5 absolute). Fires on clicks, building purchases, project
effects. Does not fire on tiny passive tick increments. From EPIC #57
task 1: animated resource counters.
2026-04-12 06:05:38 -04:00
Alexander Whitestone
cf56bcdba7 wip: save-on-pause + mobile touch fix
- Auto-save on visibilitychange (tab switch), window blur, and beforeunload
- touch-action: manipulation on all buttons to prevent double-tap zoom on mobile
- From EPIC #57 task 6: mobile polish items
2026-04-12 06:04:48 -04:00
Alexander Whitestone
760d7b8542 fix: Bilbo randomness flickering - move random rolls from updateRates() to tick()
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
updateRates() is called from buyBuilding, buyProject, resolveEvent, sprint
activation, and other non-tick contexts. Having Math.random() inside it caused
the creativity rate to flicker unpredictably whenever ANY of those functions ran.

Fix: roll Bilbo burst/vanish once per tick, store as flags, read flags in
updateRates(). Deterministic rate calculation, consistent randomness.
2026-04-12 06:02:09 -04:00
Alexander Whitestone
cd9ac2f88a wip: add keyboard shortcuts for debuff fix (R) and alignment accept/refuse (Y/N)
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
2026-04-12 03:15:55 -04:00
Alexander Whitestone
2deeda0986 wip: color-coded production breakdown - each resource gets distinct label and bar color
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 4s
2026-04-12 02:03:08 -04:00
Alexander Whitestone
5ae31ee89e wip: add drift warning system - toast alerts at 25/50/75/90, danger bar, color-coded stat
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
2026-04-11 21:03:07 -04:00
Alexander Whitestone
aa48e5009b wip: add harmony capacity bar with inverted coloring (low=bad)
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 3s
Smoke Test / smoke (pull_request) Failing after 4s
2026-04-11 18:52:08 -04:00
Alexander Whitestone
e973a2315f wip: add capacity bars to Ops and Trust resource cards 2026-04-11 18:51:19 -04:00
Alexander Whitestone
2e54af511f wip: color resource rates red when draining, green when gaining, dim at zero
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 4s
2026-04-11 18:25:58 -04:00
Alexander Whitestone
b6aa172a25 wip: building tooltip shows total production contribution %
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 4s
2026-04-11 17:17:45 -04:00
Alexander Whitestone
feccc3e9bc wip: spacebar hold support + help text update for hold-to-click
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
2026-04-11 16:35:16 -04:00
Alexander Whitestone
4078b32d0e wip: add hold-to-click on WRITE CODE button for continuous clicking 2026-04-11 16:34:27 -04:00
Alexander Whitestone
abe96a5abd wip: add time-to-afford ETA on buildings and projects
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 3s
Smoke Test / smoke (pull_request) Failing after 4s
2026-04-11 15:38:33 -04:00
Alexander Whitestone
0091f1f235 wip: add keyboard shortcuts 5-9 to buy research projects by position
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
2026-04-11 15:12:32 -04:00
Alexander Whitestone
17f2ac62f5 wip: add golden screen-edge glow during Code Sprint for clear visual feedback
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
2026-04-11 14:33:32 -04:00
Alexander Whitestone
685b3115c0 wip: add click particle burst effect on WRITE CODE — scales with combo multiplier 2026-04-11 14:32:59 -04:00
Alexander Whitestone
f0b894a2b6 wip: fix debuff corruption bug — debuffs no longer degrade boost multipliers on each updateRates() call; persist playTime across sessions
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 3s
Smoke Test / smoke (pull_request) Failing after 3s
2026-04-11 01:24:32 -04:00
Alexander Whitestone
bea958f723 wip: add ETA estimates to phase progress bar and milestone chips
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
2026-04-11 00:00:42 -04:00
Alexander Whitestone
b98cf38992 wip: add Alt+1-9 keyboard shortcuts for buying buildings 2026-04-10 22:26:33 -04:00
Alexander Whitestone
7cd47d1159 wip: show click power on WRITE CODE button
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 3s
Smoke Test / smoke (pull_request) Failing after 4s
2026-04-10 22:00:31 -04:00
Alexander Whitestone
a9e4889d88 wip: show boosted rates on buildings instead of raw base rates 2026-04-10 21:59:23 -04:00
Timmy-Sprint
970f3be00f beacon: add Fleet Status panel showing wizard health and production
Some checks failed
Smoke Test / smoke (push) Failing after 3s
New panel in the stats area displays each owned wizard building with:
- Name and current status (Active/Idle/Stressed/Offline/Vanished/Present)
- Color-coded indicator: green=healthy, amber=reduced, red=problem
- Production contribution breakdown per wizard
- Timmy shows effectiveness % scaled by harmony
- Allegro shows idle warning when trust < 5
- Ezra shows offline status when debuff is active
- Bilbo shows vanished status when debuff is active
- Harmony summary bar at the bottom

Makes the harmony/wizard interaction system visible and actionable.
Players can now see at a glance which wizards need attention.
2026-04-10 21:32:04 -04:00
Alexander Whitestone
302f6c844d beacon: add bulk ops spending (50x) for mid/late game QoL
Some checks failed
Smoke Test / smoke (push) Failing after 4s
Players with 100+ max ops get a second row of 50-ops buttons
that convert 50 ops at once for proportionally larger boosts.
Shift+1/2/3 keyboard shortcuts for bulk code/compute/knowledge.

Eliminates late-game tedium of clicking 5-ops buttons hundreds
of times when you have thousands of ops banked.
2026-04-10 21:03:11 -04:00
26879de76e Merge pull request 'feat: add CI workflow for accessibility and syntax validation' (#52) from feat/ci-a11y-checks into main
Some checks failed
Smoke Test / smoke (push) Failing after 3s
Merged PR #52: feat: add CI workflow for accessibility checks
2026-04-11 00:44:08 +00:00
c197fabc69 Merge pull request 'Add smoke test workflow' (#53) from fix/add-smoke-test into main
Some checks failed
Smoke Test / smoke (push) Failing after 3s
Merged PR #53: Add smoke test workflow
2026-04-11 00:44:04 +00:00
9733b9022e Merge pull request 'refactor: [EPIC] Phase 1 & 2 - Unslop The Beacon' (#55) from refactor/unslop-phase-1-2 into main
Merged PR #55: refactor: [EPIC] Phase 1 & 2 - Unslop The Beacon
2026-04-11 00:43:40 +00:00
967025fbd4 refactor: unslop phase 1 & 2 2026-04-11 00:29:09 +00:00
Alexander Whitestone
9854501bbd Add smoke test workflow
Some checks failed
Smoke Test / smoke (pull_request) Failing after 3s
2026-04-10 20:06:13 -04:00
Alexander Whitestone
68ee64866a beacon: add Open Weights and Prompt Engineering research projects
Two new Phase 2 research projects that fill the gap between building
a Home Server and reaching Phase 3 (Deployment):

- Open Weights (compute: 3000, code: 1500): Triggers after having a
  server and 1000 total code. Rewards 2x code boost and 1.5x compute
  boost. Teaches about running models locally without cloud dependency.

- Prompt Engineering (knowledge: 500, code: 2000): Triggers after
  200 knowledge and 3000 total code. Rewards 2x knowledge and 2x user
  boost. Teaches that good prompting beats bigger models.

Both projects follow the game's existing pattern: unlock based on
total resources, cost resources, apply boosts, and log educational
messages. They give players more strategic options in early-to-mid
game progression.
2026-04-10 20:01:10 -04:00
3 changed files with 724 additions and 97 deletions

View File

@@ -0,0 +1,24 @@
name: Smoke Test
on:
pull_request:
push:
branches: [main]
jobs:
smoke:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Parse check
run: |
find . -name '*.yml' -o -name '*.yaml' | grep -v .gitea | xargs -r python3 -c "import sys,yaml; [yaml.safe_load(open(f)) for f in sys.argv[1:]]"
find . -name '*.json' | xargs -r python3 -m json.tool > /dev/null
find . -name '*.py' | xargs -r python3 -m py_compile
find . -name '*.sh' | xargs -r bash -n
echo "PASS: All files parse"
- name: Secret scan
run: |
if grep -rE 'sk-or-|sk-ant-|ghp_|AKIA' . --include='*.yml' --include='*.py' --include='*.sh' 2>/dev/null | grep -v .gitea; then exit 1; fi
echo "PASS: No secrets"

772
game.js

File diff suppressed because it is too large Load Diff

View File

@@ -45,6 +45,10 @@ body{background:var(--bg);color:var(--text);font-family:'SF Mono','Cascadia Code
.res .r-label{font-size:9px;color:var(--dim);text-transform:uppercase;letter-spacing:1px}
.res .r-val{font-size:16px;font-weight:700;margin:2px 0;color:var(--accent)}
.res .r-rate{font-size:10px;color:var(--green)}
.cap-bar{height:3px;background:#1a1a2e;border-radius:2px;margin:3px 0 1px;overflow:hidden}
.cap-fill{height:100%;border-radius:2px;transition:width 0.3s ease,background 0.3s ease;background:var(--accent)}
.cap-fill.warn{background:#ffaa00}
.cap-fill.danger{background:#f44336}
#main{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 16px 16px}
@media(max-width:700px){#main{grid-template-columns:1fr}}
.panel{background:var(--panel);border:1px solid var(--border);border-radius:6px;padding:12px;overflow:hidden;max-height:600px;overflow-y:auto}
@@ -63,6 +67,7 @@ body{background:var(--bg);color:var(--text);font-family:'SF Mono','Cascadia Code
.build-btn.can-buy{border-color:#2a3a4a;background:#0e1420}
.build-btn.can-buy:hover{border-color:var(--accent);box-shadow:0 0 8px var(--glow)}
.build-btn:disabled{opacity:0.3;cursor:not-allowed}
.build-btn,.project-btn,.ops-btn,.main-btn{touch-action:manipulation}
.b-name{color:var(--accent);font-weight:600}.b-count{float:right;color:var(--gold)}.b-cost{color:var(--dim);display:block}.b-effect{color:var(--green);display:block;font-size:9px}
.project-btn{display:block;width:100%;text-align:left;padding:6px 10px;margin-bottom:4px;border-radius:4px;cursor:pointer;font-family:inherit;font-size:10px;background:#0c0c18;border:1px solid var(--border);color:var(--text);transition:all 0.15s}
.project-btn.can-buy{border-color:#3a2a0a;background:#141008}
@@ -121,10 +126,10 @@ body{background:var(--bg);color:var(--text);font-family:'SF Mono','Cascadia Code
<div class="res"><div class="r-label">Users</div><div class="r-val" id="r-users">0</div><div class="r-rate" id="r-users-rate">+0/s</div></div>
<div class="res"><div class="r-label">Impact</div><div class="r-val" id="r-impact">0</div><div class="r-rate" id="r-impact-rate">+0/s</div></div>
<div class="res" style="display:none"><div class="r-label">Rescues</div><div class="r-val" id="r-rescues">0</div><div class="r-rate" id="r-rescues-rate">+0/s</div></div>
<div class="res"><div class="r-label">Ops</div><div class="r-val" id="r-ops">5</div><div class="r-rate" id="r-ops-rate">+0/s</div></div>
<div class="res"><div class="r-label">Trust</div><div class="r-val" id="r-trust">5</div><div class="r-rate" id="r-trust-rate">+0/s</div></div>
<div class="res"><div class="r-label">Ops</div><div class="r-val" id="r-ops">5</div><div class="cap-bar"><div class="cap-fill" id="r-ops-cap"></div></div><div class="r-rate" id="r-ops-rate">+0/s</div></div>
<div class="res"><div class="r-label">Trust</div><div class="r-val" id="r-trust">5</div><div class="cap-bar"><div class="cap-fill" id="r-trust-cap"></div></div><div class="r-rate" id="r-trust-rate">+0/s</div></div>
<div class="res" id="creativity-res" style="display:none"><div class="r-label">Creativity</div><div class="r-val" id="r-creativity">0</div><div class="r-rate" id="r-creativity-rate">+0/s</div></div>
<div class="res"><div class="r-label">Harmony</div><div class="r-val" id="r-harmony">50</div><div class="r-rate" id="r-harmony-rate">+0/s</div></div>
<div class="res"><div class="r-label">Harmony</div><div class="r-val" id="r-harmony">50</div><div class="cap-bar"><div class="cap-fill" id="r-harmony-cap"></div></div><div class="r-rate" id="r-harmony-rate">+0/s</div></div>
</div>
<div id="main">
<div class="panel" id="action-panel">
@@ -140,6 +145,11 @@ body{background:var(--bg);color:var(--text);font-family:'SF Mono','Cascadia Code
<button class="ops-btn" onclick="doOps('boost_knowledge')">Ops -&gt; Knowledge</button>
<button class="ops-btn" onclick="doOps('boost_trust')">Ops -&gt; Trust</button>
</div>
<div class="action-btn-group" id="bulk-ops-row" style="display:none">
<button class="ops-btn" onclick="doOps('boost_code', 50)" style="border-color:#555;color:#888">50→Code</button>
<button class="ops-btn" onclick="doOps('boost_compute', 50)" style="border-color:#555;color:#888">50→Compute</button>
<button class="ops-btn" onclick="doOps('boost_knowledge', 50)" style="border-color:#555;color:#888">50→Knowledge</button>
</div>
<div id="sprint-container" style="display:none;margin-top:6px">
<button id="sprint-btn" class="main-btn" onclick="activateSprint()" style="font-size:11px;padding:8px 10px;border-color:#ffd700;color:#ffd700;width:100%">⚡ CODE SPRINT — 10x Code for 10s</button>
<div id="sprint-bar-wrap" style="display:none;margin-top:4px;height:4px;background:#111;border-radius:2px;overflow:hidden"><div id="sprint-bar" style="height:100%;background:linear-gradient(90deg,#ffd700,#ff8c00);border-radius:2px;transition:width 0.1s"></div></div>
@@ -175,6 +185,7 @@ Drift: <span id="st-drift">0</span><br>
Events Resolved: <span id="st-resolved">0</span>
</div>
<div id="production-breakdown" style="display:none;margin-top:12px;padding-top:10px;border-top:1px solid var(--border)"></div>
<div id="fleet-status" style="display:none;margin-top:12px;padding-top:10px;border-top:1px solid var(--border)"></div>
</div>
</div>
<div id="edu-panel">
@@ -191,16 +202,22 @@ Events Resolved: <span id="st-resolved">0</span>
<div style="background:#0e0e1a;border:1px solid #1a3a5a;border-radius:8px;padding:24px 32px;max-width:420px;width:100%">
<h3 style="color:#4a9eff;font-size:14px;letter-spacing:2px;margin-bottom:16px;text-align:center">KEYBOARD SHORTCUTS</h3>
<div style="font-size:11px;line-height:2.2;color:#aaa">
<div style="display:flex;justify-content:space-between"><span style="color:#555">Write Code</span><span style="color:#4a9eff;font-family:monospace">SPACE</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Write Code</span><span style="color:#4a9eff;font-family:monospace">SPACE (hold to rapid)</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Hold Button</span><span style="color:#4a9eff;font-family:monospace">CLICK+HOLD</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Code Sprint</span><span style="color:#ffd700;font-family:monospace">S</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Ops → Code</span><span style="color:#b388ff;font-family:monospace">1</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Ops → Compute</span><span style="color:#b388ff;font-family:monospace">2</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Ops → Knowledge</span><span style="color:#b388ff;font-family:monospace">3</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Ops → Trust</span><span style="color:#b388ff;font-family:monospace">4</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Cycle Buy Amount (x1/x10/MAX)</span><span style="color:#4a9eff;font-family:monospace">B</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Buy Building (by slot)</span><span style="color:#4a9eff;font-family:monospace">Alt+1..9</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Buy Project (by position)</span><span style="color:#ffd700;font-family:monospace">5-9</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Save Game</span><span style="color:#4a9eff;font-family:monospace">Ctrl+S</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Export Save</span><span style="color:#4a9eff;font-family:monospace">E</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Import Save</span><span style="color:#4a9eff;font-family:monospace">I</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Fix Problem (top debuff)</span><span style="color:#f44336;font-family:monospace">R</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Accept Drift</span><span style="color:#f44336;font-family:monospace">Y</span></div>
<div style="display:flex;justify-content:space-between"><span style="color:#555">Refuse Drift</span><span style="color:#4caf50;font-family:monospace">N</span></div>
<div style="display:flex;justify-content:space-between;border-top:1px solid #1a1a2e;padding-top:8px;margin-top:4px"><span style="color:#555">This Help</span><span style="color:#555;font-family:monospace">? or /</span></div>
</div>
<div style="text-align:center;margin-top:16px;font-size:9px;color:#444">Click WRITE CODE fast for combo bonuses! 10x=ops, 20x=knowledge, 30x+=bonus code</div>