The core is a feedback cycle: click to earn, spend on production, earn faster, unlock a new target. Buildings create idle income; multiplicative upgrades change the value of earlier investments; temporary events reward attention; achievements and prestige make apparently finished progress open up again.
The official game currently exposes a 20-building progression from Cursor to You, alongside buy/sell controls, bulk quantities and a Legacy screen. Orteil's own incremental-game documentation explicitly identifies Cookie Clicker's 115% building-price factor. These are references for the structure, not permission to reuse its source code or art. This project uses original code, copy and newly generated pixel artwork. Official game · Orteil's design documentation.
Cookie Clicker's extended progression also includes Golden Cookies, achievement-driven milk bonuses, ascension, time-grown sugar lumps, building minigames, seasonal content and the Grandmapocalypse. They provide several overlapping time scales, from seconds to days. Pill Clicker should preserve that layered structure while adapting it to a shared, server-controlled economy. The complete extended game is larger than the initial alpha.
What is confirmed on pump.fun
Public pump.fun profiles expose actual badge labels: Diamond Hands, A Milli and Professional; Prophet, Trencher and Still Learning; Whale; Exit Liquidity, Doubled Up and First Callout; Friends and Family. The labels are verified; their exact unlock thresholds and full current catalogue were not available through the public pages inspected. Do not represent the rules below as pump.fun's original rules. Diamond Hands / A Milli / Professional · Prophet / Trencher / Still Learning · Whale · Exit Liquidity / Doubled Up / First Callout · Friends and Family.
Creator fees are a portion of trading fees, not the whole trading fee. Current fee rates vary by venue and market-cap band; therefore funding must use confirmed received funds, not a hard-coded percentage of estimated volume. Official fee schedule.
Current protocol documentation separates direct-creator collection from coins using a sharing configuration. Bonding-curve and AMM fee paths must both be considered. Holder-reward coins route fees to holders and do not supply an ordinary claimable creator pot; choose and validate the token's fee mode before integrating this game's pool. Creator-fee collection · Holder rewards.
02 / GAME SYSTEMS
The factory is permanent. The race is periodic.
Name: Pill Clicker. Player business: a Pill Factory, named by the player. Fantasy: basement operators grow into a ridiculous interdimensional pharmaceutical corporation. Currency: pills are fictional, non-transferable game units. SOL rewards are a separate ledger.
Original system
Pill Clicker adaptation
Alpha status
Big cookie / CpS
Pixel capsule / pills per second; visible click feedback.
Implemented
Buildings, exponential prices
20 production tiers; 1.15× price escalation; buy/sell 1, 10 or 100.
Implemented
Upgrades / synergies
R&D: click multipliers, building multipliers, global boosts and click-production synergy.
12 initial upgrades
Achievements / milk
Corporate reputation; the Trust Me, Bro upgrade converts badges into a production bonus.
20 initial badges
Golden cookies
Seven ordinary outcomes: production frenzy, Lucky, click frenzy, building special, chain, storm and joke.
Implemented; conditional dragon/season/lump systems excluded
unit_cost(n) = ceil(base_cost × 1.15ⁿ). Bulk purchase sums the actual unit prices. Sale refund is 25% of the purchased unit-price sequence. Refunds increase spendable inventory but never lifetime production or round score. The first units cost 15 / 100 / 1,100 / 12,000 pills and produce 0.1 / 1 / 8 / 47 pills per second.
patents_earned = floor(cuberoot(lifetime_pills / 1,000,000,000)). New patents on relaunch equal earned patents minus previously awarded patents. Each patent adds 1% production. The lower alpha threshold is an intentional adaptation for testing; it is not Cookie Clicker's exact prestige threshold. Prestige does not erase already earned round points.
Offline production accrues at the base rate for at most eight hours per absence. Active boosts are integrated only over their remaining duration. Offline stock cannot become ranked points. No decay or punishment for leaving.
Session design
First 20 seconds: click, receive First Dose, see the next target. First 60–120 seconds: buy an Intern or save for a Press. First 5 minutes: choose between stronger clicks and more automation. First 30 minutes: learn the round leaderboard and how spending increases future output. Later sessions: build toward unlocks, complete a collection, return to offline stock, consider a relaunch.
Retention comes from useful choices, visible progress, collections, a nearest rival and unlockable layers. Add daily production contracts without streak loss, optional event sounds, cosmetic factory skins and a personal best. Avoid paid random rewards, fabricated players in live mode, misleading guaranteed returns or requirements to trade the token to complete game challenges.
03 / CULTURE & CONTENT
Memes as systems, not a coat of paint.
The capsule, the trenches, conviction, graduation, community takeover and absurd corporate ambition form the vocabulary. Borrow community motifs; create original characters and artwork. Do not imply an official pump.fun partnership. Named people and their likenesses are not needed to make the world recognizable.
Badge
Pill Clicker rule
Intent
First Dose
Produce 1 pill
Immediate onboarding reward
Trencher
100 manual clicks
Early active play
Doubled Up
Own 2 production units
Discover automation
Still Learning
Purchase 1 upgrade
Discover R&D
Diamond Hands
1,000 manual clicks
Longer-term collection
Professional
100 base pills/second
Production milestone
Friends & Family
Own 10 Interns
Explore unit stacking
First Callout / Prophet
Catch 1 / 10 Golden Pills
Discover events
A Milli / Big Pharma
Produce 1 million / 1 billion pills
Lifetime progress
Whale
Own 100 units
Portfolio expansion
Exit Liquidity
Sell 1 production unit
Learn reversibility; no reward for financial loss
Graduated / Trench Legend
1 / 5 relaunches
Prestige progression
Example ambient news: “CEO declares: we are still early. Factory has been open for six minutes.” “Basement lab rebrands as a decentralized wellness ecosystem.” “Research department confirms: number can, in fact, go up.” This text is fictional satire, not medical advice or claims about the underlying token.
04 / COMPETITION
All active players. Proportional shares.
Rounds use fixed UTC boundaries at :00 and :30. The company does not reset at a round boundary; only round scores reset. Wallet authentication and cloud saves work regardless of competition status. When competition is enabled, a newly verified factory appears in the current leaderboard immediately, including with zero points. Naming the factory follows that creation step.
Alpha scoring is verified production while receiving foreground heartbeats no more than 15 seconds apart, plus accepted manual click output. Server time controls accrual. Clients send actions, never balances, multiplier values or point totals. The server integrates accrual across round boundaries and updates state and affected leaderboards atomically. The client requests a heartbeat every five seconds while visible.
Click acceptance uses an eight-click/second token bucket with a burst capacity of 16. It limits volume, but does not prove a human is playing. One wallet also does not mean one person. No paid competition should be enabled on these measures alone.
Before enabling prize eligibility
Introduce a published eligibility policy: at least five minutes of verified activity in the round; one reward identity per person; abuse review and an appeal path; suspicious accounts withheld rather than silently awarded. Use risk-based challenges and server telemetry. Never award leaderboard points simply for trading volume, token ownership or recruiting wallets.
Persistent exponential production creates a veteran advantage even when scores reset. The preferred next step is a separate ranked Season Factory, with equal starting equipment and a weekly reset; the permanent factory retains badges, cosmetics and the idle fantasy. This is a proposed fairness layer, not implemented in the alpha. Pure proportional lifetime-powered competition remains the current requested model until the season rule is chosen.
Top 100 is a display limit only. Settlement must read every eligible participant, not just the displayed list. Tied scores receive equal amounts. Displayed rank may use a stable wallet order as a tie-breaker; that does not change rewards.
05 / MONEY FLOW
Fund first. Settle once. Pay with receipts.
pool = floor(confirmed_creator_fees × allocation_bps / 10,000) + carry. The allocation percentage is a pending owner decision, not assumed to be 100%. Fees and reserves must be accounted for separately. Fund round N using already reconciled receipts before round N opens; late receipts fund a later round.
reward_i = floor(pool_lamports × score_i / sum_eligible_scores). Quantize all scores to a published integer precision before settlement. Calculate amounts with integer arithmetic. Retain rounding dust as carry. If no players qualify, carry the entire pool forward. Never promise a positive payout when no pool has been funded.
Example: a 1 SOL funded pool and eligible scores of 100, 300 and 600 yield 0.1, 0.3 and 0.6 SOL. Spending production currency during the round leaves these shares unchanged unless it leads to additional production.
Settlement state machine
Open → closed → reviewing → allocated → paying → settled. Each transition is persisted. A unique round ID prevents duplicate allocation. Freeze a complete score snapshot and eligibility decisions. Write player credits and reserve the treasury liability atomically. Publish a manifest with round, pool, score precision, eligibility version, recipients and amounts.
Creator-fee ingestion records mint, venue, signature, instruction index, amount, quote asset and finalized slot. Unique chain event IDs prevent counting the same receipt twice. Do not treat the entire creator vault as this token's revenue when it contains fees from multiple coins. Prefer a dedicated creator wallet for this project or a token-aware receipt index.
A separate payout worker uses a restricted signer, bounded transaction size and a persistent outbox. Store the signed transaction identifier before submission. On RPC timeout, query the previous signature before signing a replacement; wait for finalized confirmation. Failed sends remain pending and never become “paid” based on a timer.
Proposed minimum transfer: configurable, initially 0.001 SOL for testing. Smaller credits roll forward in each player's ledger; allocation still occurs every 30 minutes. This threshold is a proposal to confirm before launch. Network fees come from an explicit operating reserve. A transaction history must expose pending, confirmed, failed and carried balances.
The delivered alpha includes the proportional allocation function and its tests. Fee ingestion, eligibility review, the money ledger, payout worker and on-chain transfers are not implemented or enabled. No private key is requested and no real funds are moved.
ALPHA 06 / MODULAR PREMISES
Fill the room. Move the company.
The Basement → Research Lab → Pill Factory → Pharma HQ → Orbital Laboratory. Each location has its own architectural shell, machinery and research bench. Shared workstation, conveyor and wall controls anchor the composition. Transparent modules enter fixed positions inside one 3:2 pixel-art scene; no inventory cards or duplicate unit counts appear in the illustration.
Each room starts empty. Produce pills after arrival to unlock five installations: workstation, research bench, production equipment, conveyor and control systems. After all five are installed, a Move button unlocks. Confirming relocation preserves pill stock, production, staff, upgrades, badges and lifetime statistics. It records a new production baseline and opens the next empty room. It does not spend pills or reset company progress. Spending and selling cannot remove scenery.
Location
Local production milestones
Basement
15 / 100 / 1,100 / 12,000 / 50,000
Research Lab
100K / 500K / 2M / 10M / 50M
Pill Factory
1M / 10M / 100M / 1B / 10B
Pharma HQ
1B / 10B / 100B / 1T / 10T
Orbital Laboratory
1T / 10T / 100T / 1Q / 10Q
Local production means all pills earned since the latest relocation, including click and golden-pill earnings. Milestones are alpha balancing. The final location remains playable after completion. Corporate Relaunch explicitly resets rooms and operating assets, while retaining lifetime progress and patents. Older decorative sector labels migrate to the Basement with all earned pills and inventory intact; eligible players can then relocate manually. Wallet saves store the same room state on the server.
New room artwork prompts. Four architectural shells and eight equipment variants were generated from the existing modular scene references.
ALPHA 06 / GOLDEN PILLS
Seven ordinary golden-cookie outcomes, adapted.
Research reference: the golden shimmer handler in Orteil’s official game source, inspected on 14 October 2026. These rules reproduce the ordinary positive pool without dragon auras, seasons, sugar lumps, wrath cookies or their associated upgrades, which are separate systems not yet implemented here.
Golden Hour: ×7 production for 77 seconds.
Lucky Batch: min(stock × 0.15, current production × 900) + 13 pills.
Diamond Fingers: ×777 click power for 13 seconds.
Department Rush: select a department with at least 10 units; multiply total production by 1 + unit count / 10 for 30 seconds. If none qualifies, fall back to Golden Hour.
Pill Chain: successive 7, 77, 777… payouts, capped by the smaller of six hours of current production and half the current stock, with a minimum payout of 7. A 1% random stop and reaching the next payout cap end the chain. Very large stocks can start at a higher digit count.
Pill Storm: a seven-second collectible shower. Each drop awards 1–7 minutes of current production, with a minimum of 1–7 pills.
Corporate Wisdom: a rare joke with no economic effect.
Pool construction follows the reference: Frenzy and Lucky are always candidates; a 3% roll adds Chain and Storm after 100K lifetime pills; a 10% roll adds Click Frenzy; a 25% roll adds the building effect when total units reach ten; an 80% roll removes the previous outcome; a 0.01% roll adds the joke. The final choice is uniform among remaining candidates. These are pool-entry probabilities, not final outcome probabilities.
Different active effects multiply together. Repeating the same timed effect refreshes it. Offline accrual integrates each production boost only until expiration. Server actions determine outcomes, awards and expiry; duplicate catches cannot pay twice.
Intentional pacing adaptations: first appearance after 45 seconds, ordinary appearances 3–6 minutes apart with a 20-second catch window; chain follow-ups appear after 0.5 seconds with a 3-second window; Storm produces 18 opportunities at 380ms intervals, each catchable for up to 2.2 seconds before the storm ends. All ordinary pills use the same golden pixel-art capsule, preserving the surprise until caught.
06 / ART & EXPERIENCE — ALPHA 02
Industrial pixels. Pharmaceutical optimism.
Deep pine backgrounds, teal machinery, mint capsules, ivory highlights and amber lights establish a small underground pharmaceutical company. Space Grotesk handles readable interface copy; IBM Plex Mono handles production data. System fallbacks preserve functionality if Google Fonts is unavailable.
Original generated pixel-art assets supply five room backgrounds, the clickable capsule, eight early production sprites, twelve late production sprites and twenty achievement medallions. Every production tier has a distinct silhouette. Static sprite sheets use lightweight CSS motion; reduced-motion settings disable animation. No Cookie Clicker or pump.fun artwork is reused.
Desktop: three persistent columns for clicking, factory/competition and purchases. Round clock and score sit above the central tabs. Research belongs above the equipment store. Overall production gradually fills the illustrated workshop; inventory details stay in the store.
Mobile: compact pill and stock panel, round strip, then Store / Factory / Rankings / Badges / Rewards tabs. Store is the opening tab. The first purchase is visible in the initial 390 × 844 viewport. Desktop and mobile use the same saved game state.
Interaction: reveal two initial departments and subsequent tiers as production grows; show effective marginal production, exact bulk prices, sale refunds and affordability hints. Preserve matching DOM nodes during timed updates. The ranking shows an honest unconfigured empty state until connected; no fictional opponents are inserted.
The dependency-free ES module frontend runs as static assets. Vercel Node functions provide /api/status, /api/auth, /api/game and /api/leaderboard. Upstash Redis REST stores sessions, single-use nonces, factories and sorted round scores. The small alpha stack is deployable without a build tool. A production financial ledger should use a transactional database and durable job queue instead of extending this lightweight storage model indefinitely.
Wallet login supports injected Phantom and Solflare providers. The server creates a domain-bound, expiring message; Node's Ed25519 verification proves control of the public key. Nonces expire after five minutes and are consumed once. Sessions use seven-day HttpOnly, Secure, SameSite=Strict cookies. State mutations require the configured origin. Wallet signing is authentication only. Phantom's sign-in guidance.
Redis compare-and-set scripts commit a revision and score increments atomically, so parallel tabs cannot spend the same inventory. Recent request IDs deduplicate retries. IP limits and click budgets reduce abuse. Names are escaped in rendering. Local imports are explicitly isolated from server-ranked play.
Known alpha limits: no verified human-identity layer; no load test; no complete browser-wallet end-to-end test; no cross-provider mobile Wallet Standard adapter; network-lost click batches may be dropped; floating-point idle totals lose unit precision at very large magnitudes. Migrate production and ranked scoring to a specified high-precision representation before prize-enabled large-scale play.
Vercel deployment
Upload this directory to your Git repository. Import it into Vercel using the Other preset, no build command, output directory .. Keep the api/ directory at the project root.
Deploy without environment variables for a playable public demo. The wallet modal honestly reports that competition is not configured.
Create an Upstash Redis database; set UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN and exact HTTPS APP_ORIGIN in Vercel, then redeploy.
Verify wallet login, two independent accounts, purchase concurrency and leaderboard updates on the actual deployment. Use a separate database for staging.
Before rewards: supply token mint and fee configuration, choose allocation percentage and eligibility policy, implement settlement/outbox worker and run fault-injection tests. The game does not need token purchases to play.
Vercel's Hobby cron frequency is daily; a half-hour settlement needs Pro or an external scheduler. Cron may be duplicated or fail without automatic retry, so locks, idempotency and recovery scans are mandatory. Do not equate a frontend countdown with settlement completion. Cron plan limits · Cron reliability behavior.
At a five-second heartbeat, 1,000 simultaneous active players generate about 200 game requests/second before purchases and leaderboard reads. The alpha's polling and per-player board fetches must be cached/batched and load-tested before that scale. Choose rate limits with shared networks in mind; one IP is not an identity.
08 / DELIVERY STATUS
What you can use now
Playable on Vercel: original responsive pixel interface; twenty-tier production; buy/sell and quantities; twelve R&D upgrades; twenty badges; Golden Pill; relaunch; capped offline accrual; naming; save/import/export; optional sound; navigation and an honest unconfigured leaderboard state.
Implemented for configuration: wallet-signature authentication, server-owned game actions, atomic purchases and round scoring, live top-100 board. Requires Vercel and Redis environment configuration. Authentication and Redis behavior have automated tests; an actual configured deployment and wallet remain unverified.
Specified, not complete: full late-game minigames, patent tree, anti-Sybil eligibility, fee ingestion, financial ledger and payouts. Token address and fee allocation are pending owner input. Vercel deployment is complete; the shared database still needs configuration. The alpha is deployed at pill-clicker.vercel.app. No real reward distribution has taken place.
Run locally with node dev.mjs and open http://127.0.0.1:4173. Run checks with node --test tests/*.test.mjs. The local server serves the demo and can route API functions if server environment variables are provided. Use the supplied .env.example as the environment-variable inventory, not as a location for shared keys.