Build an Idle Game
Passive income, upgrades, offline earnings, and prestige — the core loop for idle and incremental games.
Learning Path
Follow these steps in order to build your Idle Game.
Included Scripts
Idle Income Generator
Passive income system for idle/clicker games with offline earnings calculation, upgrade scaling, and prestige mechanics. Handles large numbers with K/M/B/T formatting.
- Passive income generation over time
- Offline earnings calculation
- Upgrade system with cost scaling
Score Manager
Complete score management system with high score persistence, combo multipliers with decay, and score change events. Uses singleton pattern for easy global access.
- Score tracking with events
- High score persistence (PlayerPrefs)
- Score multiplier support
Mobile Responsive UI Scaler
Dynamically adjusts UI scaling based on device aspect ratio, DPI, and orientation. Works with Unity's CanvasScaler to ensure readable fonts and proper layouts across all mobile devices.
- Aspect ratio-based UI scaling
- Reference resolution support
- Font size scaling for readability
Tap Input Handler
Handles single tap, double tap, and long press gestures with configurable timing. Provides tap position in both screen and world space coordinates.
- Single and double tap detection
- Configurable double-tap window
- Tap position in screen and world space
Mobile Safe Area Handler
Automatically adjusts UI RectTransform to respect device safe areas on notched phones and tablets. Supports runtime orientation changes and works across iOS and Android devices.
- Automatic safe area detection
- RectTransform adjustment for notches
- Works on all devices (iOS/Android)
Related Systems
Idle Game System
Core systems for idle/incremental games — passive income generation, offline earnings, upgrade progression, number formatting, and responsive mobile UI.