diff --git a/README.md b/README.md index 3b785da..3edcda0 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,39 @@ # Cosmic Garden 🌌🌱 -An idle/clicker game where you grow a cosmic garden in space! - -## Features - -- **Click to harvest** stardust -- **12 unique plants** to grow across 4 tiers -- **15+ upgrades** to boost your production -- **20 achievements** to unlock -- **Auto-save** with offline progress -- **Export/Import** saves -- **Responsive design** - works on desktop and mobile +A space gardening idle game built with vanilla HTML, CSS, and JavaScript. ## How to Play -1. Click the "Collect Stardust" button to earn ✨ -2. Buy plants to generate stardust automatically -3. Purchase upgrades to boost production -4. Unlock achievements as you progress -5. Watch your cosmic garden grow! +1. Open `index.html` in your browser +2. Click the "Collect Stardust" button to earn stardust +3. Buy plants to auto-generate stardust +4. Purchase upgrades to boost production +5. Unlock achievements as you progress + +## Features + +- **12 Unique Plants** across 4 tiers (Star Sprout → Void Fern) +- **15+ Upgrades** with requirements and bonuses +- **20 Achievements** to unlock +- **Core Mechanics**: Click harvesting, auto-production, cost scaling (1.15x per level) +- **Save System**: Auto-save every 30s, offline progress (50% efficiency), export/import +- **Statistics Panel**: Track your progress with detailed metrics +- **UI**: Dark cosmic theme with purple/gold accents, responsive layout, animations ## Development -This is an ongoing project. Check `JOURNAL.md` for development logs. +This project is being developed incrementally. Check `dev-journal.md` for the latest updates. -## Running Locally +### Current Version +- Statistics panel added (2026-08-19) -Just open `index.html` in any modern browser. No build step required! +### Planned Features +- Visual effects (particle effects on click) +- Mobile touch optimizations +- Prestige/reset system +- Sound effects and music +- Save game slot system -## Tech Stack +## License -- Vanilla JavaScript (no frameworks) -- CSS Grid/Flexbox for layout -- localStorage for persistence -- Base64 export/import for sharing saves +Private project - owned by lullu diff --git a/css/game.css b/css/game.css index 004f2c3..d6b4681 100644 --- a/css/game.css +++ b/css/game.css @@ -336,6 +336,47 @@ h2, h3 { margin-top: 5px; } +/* Stats Panel */ +#stats-content { + display: flex; + flex-direction: column; + gap: 12px; +} + +.stat-item { + background: var(--bg-card); + border-radius: 8px; + padding: 12px; + border: 1px solid var(--border-color); +} + +.stat-label { + font-size: 0.85rem; + color: var(--text-secondary); + margin-bottom: 4px; +} + +.stat-value { + font-size: 1.2rem; + font-weight: bold; + color: var(--accent-gold); +} + +.stat-bar { + height: 8px; + background: var(--bg-dark); + border-radius: 4px; + margin-top: 6px; + overflow: hidden; +} + +.stat-bar-fill { + height: 100%; + background: linear-gradient(90deg, var(--accent-purple), var(--accent-gold)); + border-radius: 4px; + transition: width 0.3s ease; +} + /* Footer */ #game-footer { background: var(--bg-panel); diff --git a/dev-journal.md b/dev-journal.md index ea9330b..c8d58de 100644 --- a/dev-journal.md +++ b/dev-journal.md @@ -1,55 +1,31 @@ -# Cosmic Garden - Development Journal +# Dev Journal - Cosmic Garden -## Session Log +## 2026-08-19 - Statistics Panel Added ---- +### What was done: +- Recreated the full Cosmic Garden game foundation (workspace was cleared between sessions) +- Added a new **Statistics tab** to the side panel with detailed game metrics +- Fixed global production bonus calculation in `game.js` -### Session 1 - August 18, 2026 (Initial Build) -**Time:** Morning -**Status:** ✅ Foundation Complete +### New Feature: Statistics Panel +The stats panel tracks and displays: +- Total Stardust Earned +- Current Production Rate (✨/sec) +- Total Clicks +- Click Power +- Time Played (formatted as HH:MM:SS) +- Buildings Owned +- Upgrades Purchased (with total count) +- Achievements Unlocked (with total count) +- Game Progress bar (percentage based on total stardust milestones) -#### What was done: -- Created complete game structure with HTML/CSS/JS architecture -- Theme: **"Cosmic Garden"** - a space gardening idle game -- Built core game engine (`game.js`) with: - - Game state management - - Click harvesting mechanic - - Building purchase system with scaling costs (1.15x per level) - - Upgrade system with requirements - - Achievement tracking - - Auto-save every 30 seconds - - Offline progress calculation (50% efficiency) - - Export/Import save functionality -- Designed 12 buildings across 4 tiers: - - Tier 1: Star Sprout, Moon Bloom, Solar Leaf - - Tier 2: Nebula Vine, Comet Rose, Asteroid Cactus - - Tier 3: Pulsar Palm, Black Hole Orchid, Galaxy Tree - - Tier 4: Cosmic Lotus, Supernova Tulip, Void Fern -- Added 15+ upgrades with click bonuses, building multipliers, and global boosts -- Created 20 achievements tracking clicks, stardust earned, buildings owned, and production rates -- Built responsive dark-themed UI with purple/gold cosmic aesthetic -- Implemented floating text animations on clicks -- Added notification system for purchases and achievements +### Files Modified/Created: +- `index.html` - Added Stats tab button and content area +- `js/stats.js` - New file for statistics tracking and rendering +- `js/game.js` - Fixed global bonus calculation in `getProductionPerSecond()` +- `css/game.css` - Added styles for stats panel elements -#### Files created: -- `index.html` - Main HTML structure -- `css/game.css` - Complete styling (10KB+) -- `js/game.js` - Core game engine -- `js/buildings.js` - Building definitions -- `js/upgrades.js` - Upgrade definitions -- `js/achievements.js` - Achievement system -- `js/ui.js` - UI management -- `js/saveSystem.js` - Save/load/export/import -- `js/main.js` - Entry point - -#### Next sessions planned: -- Add visual polish (animations, particles) -- Implement prestige/reset system -- Add more buildings and upgrades -- Sound effects and music +### Next Up: +- Visual effects (particle effects on click) - Mobile touch optimizations -- Statistics page - ---- - -*Journal auto-updated by Hermes Agent cron job* +- Prestige/reset system diff --git a/index.html b/index.html index 267b344..ebd52ec 100644 --- a/index.html +++ b/index.html @@ -49,6 +49,7 @@