Commit Graph

67 Commits

Author SHA1 Message Date
d26a0b016b Merge pull request 'burn: Creative Engineering projects — creativity as currency (#20)' (#68) from burn/20260411-1627-export-import-shortcuts into main
Some checks failed
Smoke Test / smoke (push) Failing after 3s
Merge PR #68: burn: Creative Engineering projects
2026-04-11 21:45:11 +00:00
6f07ef4df2 Merge pull request 'fix: debuff corruption + persist playTime (#64)' (#67) from burn/20260411-1507-fix-debuff-corruption into main
Some checks failed
Smoke Test / smoke (push) Failing after 3s
Merge PR #67: fix: debuff corruption + persist playTime
2026-04-11 21:44:49 +00:00
bafbeb613b Merge pull request 'burn: show boosted rates and click power in building/action UI' (#62) from burn/20260410-2215-boosted-rates-click-power into main
Some checks failed
Smoke Test / smoke (push) Failing after 4s
Merge PR #62: burn: show boosted rates and click power
2026-04-11 21:44:31 +00:00
4d902d48d0 Merge pull request 'feat: save-on-pause via visibilitychange and beforeunload (#57)' (#69) from polish into main
Some checks failed
Smoke Test / smoke (push) Has been cancelled
Merge PR #69: feat: save-on-pause via visibilitychange
2026-04-11 21:44:30 +00:00
Alexander Whitestone
2507a31ef2 feat: save-on-pause via visibilitychange and beforeunload (#57)
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
Auto-save game state when the browser tab is hidden (visibilitychange)
or closed/navigated away (beforeunload). Prevents data loss on mobile
where tab switching can kill the page without a save interval firing.

Part of epic #57 Night of Polish — Task 6: Mobile Polish.
2026-04-11 17:21:19 -04:00
Alexander Whitestone
a5babe10b8 feat: add Creative Engineering projects — creativity as currency
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 4s
Implements #20: Creative-to-Ops Conversion

Added 6 new projects that use creativity as a resource currency:

1. Lexical Processing (50 creativity) — +2 knowledge/sec, +50% knowledge boost
2. Semantic Analysis (150 creativity) — +5 user/sec, +100% user boost
3. Creative Breakthrough (500 creativity) — all boosts +25%, +10 ops/sec
4. Creativity → Operations (repeatable, 50 creativity → 250 ops)
5. Creativity → Knowledge (repeatable, 75 creativity → 500 knowledge)
6. Creativity → Code (repeatable, 100 creativity → 2000 code)

The one-shot projects form a progression chain (lexical → semantic → breakthrough).
The three conversion projects are repeatable, giving players ongoing reasons to
generate creativity and meaningful choices about how to spend it.
2026-04-11 16:31:01 -04:00
Alexander Whitestone
ae09fe6d11 fix: persist playTime across sessions
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
playTime was defined in globals but never incremented and never
included in save/load. Now incremented each tick and persisted
in localStorage via the whitelist and save data.
2026-04-11 15:09:29 -04:00
Alexander Whitestone
ad901b1f18 fix: debuff corruption — community_drama no longer mutates codeBoost
applyFn was multiplying G.codeBoost by 0.7 on every updateRates() call
(building purchase, project, click, etc.), permanently degrading it.
After 10 calls the boost was effectively zero.

Fix: apply penalty to G.codeRate (computed per-tick) instead of
G.codeBoost (persistent multiplier). Debuffs must never mutate boost state.
2026-04-11 15:09:04 -04:00
4312486d95 [auto-merge] the-beacon#65
Some checks failed
Smoke Test / smoke (push) Failing after 4s
Auto-merged PR #65
2026-04-11 18:53:41 +00:00
2ad4bc7e5b [auto-merge] the-beacon#66
Some checks failed
Smoke Test / smoke (push) Has been cancelled
Auto-merged PR #66
2026-04-11 18:53:40 +00:00
Alexander Whitestone
3b142d485e feat: add first-time player tutorial walkthrough
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
Part of #57 — Task 4: Tutorial & Onboarding

- 5 click-through screens introducing game concepts (code, buildings,
  research, phases, keyboard shortcuts)
- Skip button on every screen, keyboard support (Enter/Escape/arrows)
- Stores completion in localStorage — only shows once for new players
- Matches existing visual style (dark theme, accent colors, monospace)
- Start Playing button on final screen with shortcut hint (? overlay)
2026-04-11 04:47:06 -04:00
Alexander Whitestone
44af2ad09a feat: add ARIA labels, roles, live regions across game UI
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 3s
Smoke Test / smoke (pull_request) Failing after 4s
- index.html: role=region on phase-bar, strategy-panel; role=dialog+aria-modal on help overlay, offline popup, drift ending; aria-label on help button, close button, continue button, start over button; aria-live on progress label
- render.js: aria-label on alignment event buttons; fix exportSave() URL revoke race with setTimeout delay
- engine.js: aria-label+aria-pressed on buy amount buttons; role=button+tabindex+aria-expanded+aria-controls on completed projects header
2026-04-11 00:25:01 -04:00
Alexander Whitestone
25a2050ef1 feat: show boosted rates in building UI and click power on WRITE CODE button
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
- Building rate display now shows actual boosted rates (after multipliers)
  instead of raw base rates, so players see their real production
- WRITE CODE button area now displays current click power dynamically
  (updates each render tick as boosts change)
- Click power also reflected in button aria-label for accessibility

Closes #61
2026-04-10 22:17:26 -04:00
1cb556aa3d Remove monolithic game.js
Some checks failed
Smoke Test / smoke (push) Failing after 4s
2026-04-11 01:32:31 +00:00
5bb48c8f58 Update index.html (manual merge)
Some checks failed
Smoke Test / smoke (push) Has been cancelled
2026-04-11 01:32:30 +00:00
4964eb01a9 Create js/strategy.js
Some checks failed
Smoke Test / smoke (push) Has been cancelled
2026-04-11 01:32:29 +00:00
20d74afc03 Create js/main.js
Some checks failed
Smoke Test / smoke (push) Has been cancelled
2026-04-11 01:32:28 +00:00
703fbeb4fa Create js/render.js
Some checks failed
Smoke Test / smoke (push) Has been cancelled
2026-04-11 01:32:27 +00:00
9545b5cb6f Create js/engine.js
Some checks failed
Smoke Test / smoke (push) Has been cancelled
2026-04-11 01:32:26 +00:00
74aa30819a Create js/utils.js
Some checks failed
Smoke Test / smoke (push) Has been cancelled
2026-04-11 01:32:25 +00:00
1b41ce740f Create js/data.js
Some checks failed
Smoke Test / smoke (push) Has been cancelled
2026-04-11 01:32:24 +00:00
e8d5337271 Create scripts/smoke.mjs
Some checks failed
Smoke Test / smoke (push) Has been cancelled
2026-04-11 01:32:23 +00:00
2b59be997d Create scripts/guardrails.sh
Some checks failed
Smoke Test / smoke (push) Has been cancelled
2026-04-11 01:32:22 +00: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
be0264fc95 feat: add CI workflow for accessibility and syntax validation
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 4s
2026-04-10 23:56:07 +00:00
Timmy-Sprint
e6d0df40b4 beacon: add toast notification system for events, projects, milestones, and phase changes 2026-04-10 19:28:10 -04:00
Timmy-Sprint
23dd95ed46 beacon: add Pulse indicator — live fleet health visualization in header
The header now shows a pulsing beacon dot that reflects fleet state:
- Color: green (healthy harmony >70), amber (stressed 40-70), red (critical <40)
- Flicker speed: faster when production is high, fastest when debuffs are active
- Label: shows current phase, fleet size, and active alert count
- End states: DRIFTED (red) or SHINING (gold) for game endings

DESIGN.md called for this: "The Pulse — a central visual that brightens when
the fleet is healthy, flickers when harmony is low." Now it exists.
2026-04-10 18:51:51 -04:00
Timmy-Sprint
0849754a87 beacon: fix save/load bugs, add harmony tooltip, early-game pulse, better education cycling 2026-04-10 18:04:48 -04:00
Timmy-Sprint
8d51349e64 beacon: fix getMaxBuyable state mutation bug + add keyboard shortcuts help overlay
Fix: getMaxBuyable() was mutating G (subtracting/re-adding resources) during
render cycles in renderBuildings(). Now uses a read-only simulation with a
temporary resource copy. This prevented phantom resource fluctuations when
MAX buy was selected.

Feature: Press ? or click the ? button for a keyboard shortcuts overlay.
All keybindings listed in one place. Closes with ?, Esc, or clicking outside.
Added ? to the init log hint line.
2026-04-10 17:44:33 -04:00
Timmy-Sprint
24940fe465 beacon: add auto-typer — buildings now visually type code
Auto-Code Generators now produce actual auto-clicks (not just passive rate),
giving players satisfying visual feedback (floating numbers, button flash)
even while idle. Interval scales with building count: more buildings =
faster auto-typing. Each auto-click produces 50% of a manual click's code.

This makes the early game feel more like an idle game — you can watch
your auto-typers work while planning your next building purchase.
2026-04-10 17:23:39 -04:00
Timmy-Sprint
16273a5a15 beacon: add Swarm Protocol — buildings auto-code based on click power
New research project (Phase 4): Swarm Protocol
- Unlocks at 25K total code, 8K total knowledge, post-deploy
- Cost: 15K knowledge, 50K code, 20 trust
- Effect: every building generates code equal to your click power per second
- Scales with autocoders, phase, code boost, and total building count
- Visible in production breakdown as 'Swarm Protocol'
- Uses the previously-unused swarmFlag
- Adds education fact on swarm intelligence
2026-04-10 16:53:34 -04:00
Alexander Whitestone
5d51e14875 beacon: add combo milestone bonuses + fix DOM leak in click numbers
Combo system now rewards sustained clicking:
- 10x combo: +15 ops (sustained coding reward)
- 20x combo: +50 knowledge (deep focus reward)
- 30x+ combo (every 10): 2x bonus code burst (hyperfocus)

Also fixed potential DOM leak in showClickNumber where floating
numbers could fail to clean up if parent element was removed
before animation/timeout completed.
2026-04-10 16:02:50 -04:00
Timmy-Sprint
5fc0ad7b22 beacon: add collapsible completed projects + export/import save files
- Completed research projects are now collapsed by default (click to expand),
  preventing panel clutter in mid/late game. Toggle state persists in saves.
- Export saves as JSON files with E key or Export button
- Import saves from file with I key or Import button (validates before loading)
- Ctrl+S keyboard shortcut for quick save
- Updated keybind hints in startup log
2026-04-10 15:25:09 -04:00
f948ec9c5e auto-merge PR #45 2026-04-10 19:01:58 +00:00
Timmy-Sprint
9403f700d2 beacon: add ops overflow auto-conversion to code
When Operations exceed 80% of max capacity, excess ops automatically
drain into Code at 2 ops/sec (10:1 ratio with code boost). This prevents
ops from sitting idle at the cap and gives the early game smoother flow.

Visual indicator shows 'overflow -> code' in the ops rate display when
active. No log spam - just works silently in the background.
2026-04-10 14:44:54 -04:00
Alexander Whitestone
13e77a12f2 burn: add educational number scale tooltips to resources and stats 2026-04-10 08:26:27 -04:00
6081844387 [auto-merge] Welcome Back popup
Auto-merged by PR review bot: Welcome Back popup
2026-04-10 11:48:34 +00:00
Timmy-Sprint
09b8c02307 beacon: add Welcome Back popup for offline gains + fix missing resource tracking
- Added modal popup showing detailed offline resource gains when player returns
- Fixed offline tracking to include ops, trust, and creativity (were silently missing)
- Popup shows all resources with color-coded labels and 50% efficiency note
- Log message now shows time in human-readable format (minutes/seconds)
2026-04-10 07:35:52 -04:00
Alexander Whitestone
9106d3f84c beacon: show locked buildings as dimmed previews up to 2 phases ahead
Previously, buildings from later phases were completely invisible until
unlocked. Players had no idea what was coming next. Now buildings up to
2 phases ahead appear as dimmed (25% opacity) locked entries showing:
- Name and lock icon
- Phase number and name
- Description text
- Education tooltip on hover

This gives players a roadmap of what they're building toward and creates
anticipation for future phases. The preview is a non-interactive div
(not a button) so it cannot be clicked.
2026-04-10 06:45:54 -04:00
3f02359748 Merge pull request 'burn: Add MemPalace Archive as late-game building (closes #25)' (#39) from burn/20260410-0423-25-mempalace-building into main
Merge PR #39: burn: Add MemPalace Archive as late-game building (closes #25)
2026-04-10 09:37:15 +00:00
85a146b690 Merge pull request 'burn: add favicon, meta tags, and social sharing cards (closes #13)' (#31) from burn/20260410-0052-13-static-site-meta into main
Merge PR #31: burn: add favicon, meta tags, and social sharing cards (closes #13)
2026-04-10 09:35:58 +00:00
cb2e48bf9a Merge pull request 'beacon: add production breakdown panel' (#42) from feature/production-breakdown into main
Merge PR #42: beacon: add production breakdown panel
2026-04-10 09:35:52 +00:00
Alexander Whitestone
8d43b5c911 beacon: add production breakdown panel showing per-building resource contributions
Players can now see exactly which buildings contribute to each resource
rate, including Timmy harmony bonuses, Bilbo randomness, Allegro trust
penalties, and passive generation. Appears once 2+ buildings are built.

Also includes minor fixes:
- Production bars sort by absolute contribution (negative rates visible)
- Delta calculation catches passive sources (ops from users, Pact trust)
2026-04-10 05:25:21 -04:00