Skip to content

feat: Per-generator CPS breakdown panel (contribution + % of total) #105

@AshDevFr

Description

@AshDevFr

Summary

Add a stats panel that breaks down how much each owned generator contributes to total TD/s in absolute terms and as a percentage of total production — so players understand where their income comes from and make informed upgrade decisions.

Why

The design guide (§3.2 and §6.1) is explicit: "Show the player how much each producer is contributing individually (as CPS and as % of total)." The GLORP PRD shows total TD/s in the header but gives no per-generator breakdown. Without this, players with 6+ generators can't tell whether buying more Interns or more GPU Clusters is the better investment. This breakdown is standard in every major idle game.

Acceptance criteria

  • A "Stats" tab or collapsible panel is accessible from the main UI (📊 icon in header).
  • The panel lists each owned generator with:
    • Generator name and owned count
    • TD/s from this generator (post all multipliers, formatted with suffix)
    • % of total TD/s (e.g., "GPU Toaster: 12.4 TD/s (34.2%)")
    • Next milestone threshold (e.g., "Next bonus at 25 owned")
  • Generators with 0 owned are hidden.
  • A summary row shows total TD/s and a rolling 10-second average of TD earned from clicks.
  • Values update live at the same tick rate as the main counter.
  • Panel is accessible on both desktop and mobile layouts.

Out of scope

  • Historical production charts / graphs
  • Per-upgrade breakdown
  • Export/share stats

Technical notes

  • Generator contribution = baseProduction × owned × generatorMultiplier × globalMultiplier.
  • Derive from existing Zustand selectors — no new persisted state fields required.
  • Rolling click average uses a small circular buffer (10 × 1-second buckets) in ephemeral state.
  • Reference: design guide §3.2 "Producers" and §6.1 "Information Hierarchy".

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)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions