$npx -y skills add thedivergentai/GD-Agentic-Skills --skill godot-genre-idle-clickerExpert blueprint for idle/clicker games including big number handling (mantissa + exponent system), exponential growth curves (cost_growth_factor 1.15x), generator systems (auto-producers), offline progress calculation, prestige systems (reset for permanent multipliers), number f
| 1 | ## Godot 4.7 Baseline |
| 2 | |
| 3 | - Expert patterns in this skill target **Godot 4.7+** (stable, 2026-06-18). |
| 4 | - Consult the [Godot 4.7 migration guide](https://docs.godotengine.org/en/4.7/tutorials/migrating/upgrading_to_godot_4.7.html) when upgrading projects from 4.6. |
| 5 | - **NEVER** assume 4.6 defaults (stretch mode, audio area_mask, RichTextLabel percent flags) without checking 4.7 migration notes. |
| 6 | |
| 7 | # Genre: Idle / Clicker |
| 8 | |
| 9 | Expert blueprint for idle/clicker games with exponential progression and prestige mechanics. |
| 10 | |
| 11 | ## NEVER Do (Expert Anti-Patterns) |
| 12 | |
| 13 | ### Economics & Math |
| 14 | - NEVER use standard floats for currency; strictly implement a **BigNumber** (Mantissa/Exponent) system (e.g., `1.5e300`) to prevent `INF` crashes at 1e308. |
| 15 | - NEVER use `Timer` nodes for revenue generation; strictly use a manual accumulator in `_process(delta)` to prevent drift during frame fluctuations. |
| 16 | - NEVER hardcode generator costs or growth; strictly use an exponential formula: `Cost = BasePrice * pow(GrowthFactor, OwnedCount)` (industry standard **1.15x**). |
| 17 | - NEVER evaluate exact float equality (`==`); strictly use `is_equal_approx()` or `>=` to prevent "stuck" progress due to precision loss. |
| 18 | - NEVER parse scientific notation strings with `to_int()`; strictly use `to_float()` or a dedicated BigNumber parser. |
| 19 | |
| 20 | ### Performance & Optimization |
| 21 | - NEVER update all UI labels every frame; strictly use **Signals** to update labels ONLY when values change, or throttle updates to 10 FPS. |
| 22 | - NEVER ignore **Low Processor Usage Mode** for mobile; strictly enable `OS.low_processor_usage_mode = true` to preserve battery life. |
| 23 | - NEVER instantiate/delete hundreds of text nodes per second; strictly use **Object Pooling** or `MultiMeshInstance` for click-feedback. |
| 24 | - NEVER update massive logs by modifying the `text` property; strictly use `append_text()` to prevent main thread blocking. |
| 25 | |
| 26 | ### Player Experience & Persistence |
| 27 | - NEVER ignore **Offline Progress**; strictly calculate `seconds_offline * total_revenue` using system UNIX timestamps (`Time.get_unix_time_from_system()`). |
| 28 | - NEVER make the "Prestige" reset feel like a loss; strictly provide a global multiplier that makes the next run **significantly** faster (2-5x). |
| 29 | - NEVER calculate offline time using `Time.get_ticks_msec()`; strictly use **Persistent UNIX timestamps** as ticks reset on app restart. |
| 30 | - NEVER use Node hierarchies for raw data; strictly use `RefCounted` or `Resource` objects for lightweight, serializable logic. |
| 31 | |
| 32 | --- |
| 33 | |
| 34 | ## 🛠 Expert Components (scripts/) |
| 35 | |
| 36 | ### Original Expert Patterns |
| 37 | - [big_number.gd](scripts/idle_performance_setup.gd) - The foundation for handling e308+ scales using Mantissa + Exponent math. |
| 38 | - [generator.gd](scripts/precision_cost_validator.gd) - Generic template for exponential cost units and rate calculation. |
| 39 | - [scientific_notation_formatter.gd](scripts/scientific_notation_math.gd) - readable formatting for K, M, B, T suffixes and scientific notation. |
| 40 | |
| 41 | ### Modular Components |
| 42 | - [offline_progress_calculator.gd](scripts/offline_progress_calculator.gd) - Real-world delta tracking using UNIX timestamps. |
| 43 | - [functional_income_reducer.gd](scripts/functional_income_reducer.gd) - C++ optimized array reduction for fast income summation. |
| 44 | - [threaded_catchup_simulator.gd](scripts/threaded_catchup_simulator.gd) - WorkerThreadPool background simulation patterns. |
| 45 | |
| 46 | --- |
| 47 | |
| 48 | ## Core Loop |
| 49 | 1. **Click**: Player performs manual action to gain currency. |
| 50 | 2. **Buy**: Player purchases "generators" (auto-clickers). |
| 51 | 3. **Wait**: Game plays itself, numbers go up. |
| 52 | 4. **Upgrade**: Player buys multipliers to increase efficiency. |
| 53 | 5. **Prestige**: Player resets progress for a permanent global multiplier. |
| 54 | |
| 55 | ## Skill Chain |
| 56 | |
| 57 | | Phase | Skills | Purpose | |
| 58 | |-------|--------|---------| |
| 59 | | 1. Math | `godot-gdscript-mastery` | Handling numbers larger than 64-bit float | |
| 60 | | 2. UI | `godot-ui-containers`, `labels` | Displaying "1.5e12" or "1.5T" cleanly | |
| 61 | | 3. Data | `godot-save-load-systems` | Saving progress, offline time calculation | |
| 62 | | 4. Logic | `signals` | Decoupling UI from the economic simulation | |
| 63 | | 5. Meta | `json-serialization` | Balancing hundreds of upgrades via data | |
| 64 | | 6. Balance | `godot-monte-carlo-balancer` | Career / minutes-to-milestone bands (not win%) | |
| 65 | |
| 66 | ## Architecture Overview |
| 67 | |
| 68 | ### 1. Big Number System |
| 69 | Standard `float` goes to `INF` around 1.8e308. Idle games often go beyond. |
| 70 | You need a custom `BigNumber` class (Mantissa + Exp |