# Overstimulation clicker ## What this builds A single-page clicker. Each click adds to a score. Upgrades raise the payout, and at documented score thresholds the page starts adding motion, sound, flashing regions and popups until the desk is a mess. The joke is the pile-on, not an idle economy with no end. This is an original game with its own prices and layers, not a copy of another clicker. Read `spekkr.inputs.json` first. `title` and `currency` label the desk. `sound` and `popups` turn those layers on. `palette` picks the colours. ## Out of scope - A server, accounts or a public leaderboard. - Live third-party ads, trackers or embeds. - Purchases of upgrades with real money. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. The desk - A big click target adds one unit of `currency` to the score, times the current multiplier, which starts at 1. - `title` is the heading. The score and the currency name are always visible. - The first view, at score 0, is still: no motion, no popups, no extra sound beyond an optional click pip. Accept when: a fresh load shows score 0, a click raises it by 1, and a screenshot of the desk at score 0 matches `shots/desk.png` within the tolerance in `design.md`. ### R2. Upgrade prices - Three upgrades exist, with the prices, payouts and names in the table in `design.md`. - An upgrade can be bought only when the score is at least its price. Buying subtracts the price and applies the payout. - Prices do not change after purchase. Each upgrade may be bought any number of times. Accept when: scripted playthroughs buy each upgrade at the exact score in the table, refuse a buy one unit short, and keep a running score that matches the worked examples in `design.md`. ### R3. Chaos layers - Named layers start at the score thresholds in `design.md`: screen shake, a scrolling ticker, colour strobe, falling glyphs, and, if `popups` is on, stacked windows. - A layer that has started stays on. Layers do not start early. - If `sound` is on, each layer also starts a looped bed. Tests may mock the audio device and only assert that the named bed was requested. Accept when: scripted scores of threshold minus one and threshold itself show the right set of layers, and a golden screenshot is taken at 50, 200 and 800 points (the mid-chaos and full-pile frames in `design.md`). ### R4. Popups - Only if `popups` is on. - Each popup is a small window with a close control. Closing it removes that window. A new one may appear on a later click once its layer has started. - At most 8 popups are open at once. A ninth click that would open one closes the oldest first. Accept when: a fixture run opens 9 popups and leaves 8, the oldest gone, and closing one reduces the count by 1. Only if popups is on. ### R5. The same every time - Given the same clicks, the score, the upgrades owned and the set of active layers are determined. Motion may use a seed so screenshots are stable. - A headless run with the seed in `design.md` produces the milestone screenshots. Accept when: two scripted runs hash the same score trail, and the milestone screenshots match the goldens within the tolerance in `design.md`. ### R6. Files - One command runs the playthrough tests and writes the milestone screenshots. - The build has no network requirement. Audio may be mocked. Accept when: the command passes from a clean folder with `sound` off and with `sound` on (audio mocked). ## Verification Scripted playthroughs assert upgrade prices, the purchase order in the worked example, and that each named chaos layer starts at its score threshold and not before. Golden screenshots are taken at the four milestones. Audio is mocked: tests assert that a named bed was requested, not that a speaker is present. No network and no third-party live content. ## Definition of done - Every acceptance check above runs from one command, and all pass at the person's inputs. - A README says how to run the game, how to run the checks, and how to change the currency name.