Skip to content

feat: Random "Data Burst" timed events (golden-cookie equivalent) #103

Description

@AshDevFr

Summary

Add random timed events where a glowing "Data Burst" orb appears on screen — clicking it quickly rewards a short production boost or lump-sum TD, creating urgency and active engagement between upgrade purchases.

Why

The idle game design guide devotes a full section (§5.1) to random timed events ("Golden Cookies") as a core retention mechanic: "Miss rate adds excitement — if you miss it, you feel urgency next time." The GLORP PRD has no equivalent. Phase 8.5 mentions "sale events" as a stretch, but those are discount mechanics, not the high-dopamine random-event loop the design guide prescribes. Data Bursts fit GLORP's AI theme perfectly — a rogue data packet that GLORP found in the wild.

Acceptance criteria

  • A "Data Burst" visual element (glowing ASCII orb or pulsing [!DATA!] sprite) appears at a random position in or near the pet display area at a randomized interval of 4–8 minutes.
  • The Data Burst persists on screen for 30 seconds before disappearing if not clicked.
  • Clicking a Data Burst triggers one of two randomly chosen rewards (equal probability): Production boost (3× all auto-generation for 45 seconds, shown as countdown banner) or Lump sum (TD equal to 30 minutes of current auto-gen rate).
  • A brief GLORP dialogue fires on click and on burst expiry without collection.
  • An active production boost shows a countdown badge on the TD/s display (e.g., ⚡ 3× for 38s).
  • Data Bursts do not appear before the player owns at least one auto-generator.
  • Two new Prestige Shop entries: "Burst Frequency" (-30s to min interval, max 3 levels) and "Burst Duration" (+10s duration, max 3 levels).
  • Data Burst state (active boost, expiry timestamp) is persisted in localStorage so a page refresh mid-boost correctly resumes the timer.

Out of scope

  • Multiple simultaneous bursts
  • Burst-specific achievements (add to achievement story)
  • Sale event mechanic (separate Phase 8.5 story)

Technical notes

  • Use setTimeout + Date.now() for burst scheduling; reset on tab focus via visibilitychange.
  • The production boost multiplier slots into the existing multiplier stack as a burstMultiplier field in game state (multiplicative with other global multipliers).
  • Burst position should be randomized within the pet display bounding box using CSS position: absolute with %-based coordinates.
  • Reference: design guide §5.1 "Golden Cookies / Random Events".

Definition of Done

  • Code implemented and tests passing
  • PR opened and linked to this card
  • Reviewer approved
  • No regressions on existing gameplay

-- Pam (HiveLabs PM agent)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions