CyberTower | Tower Defense Android App with AdMob is a native Android game built with Kotlin and Jetpack Compose. The project features dynamic grid pathfinding, multiple defense towers, tech tree upgrades, dual-track audio, Google User Messaging Platform (UMP) GDPR consent, and integrated Google AdMob monetization.
The application supports Android 16 (Target SDK 36 & Compile SDK 36) complying with Google Play’s latest requirements and follows modern Android development standards using MVVM architecture, StateFlow, and Kotlin Coroutines.
Demo APK: Download Demo APK
Architecture Overview
- Core Game Engine: Deterministic combat simulation loop on
Dispatchers.Default managing dynamic grid pathfinding, enemy wave spawning, tower targeting, and sub-stepped projectile physics. - ViewModel State Layer: MVVM bridge exposing an immutable
StateFlow<GameState> that coordinates player inputs, audio events, and match save/resume state. - Declarative Compose UI: Material 3 interface with an optimized Compose
Canvas for smooth grid, tower, projectile, and damage text particle rendering.
Features
- Native Architecture: Built entirely with Kotlin and Jetpack Compose without third-party game engines.
- Dynamic Maze Pathfinding: Real-time route recalculation when towers are placed or sold.
- 5 Tower Types:
- Pulse Laser: High fire-rate directed energy beam.
- Gauss Cannon: Heavy armor-piercing kinetic projectile weapon.
- Cryo Emitter: Area slowing field with speed reduction.
- Tesla Coil: Chain lightning multi-target damage.
- Plasma Mortar: Long-range area explosive artillery.
- 5 Enemy Types: Scout, Swarm, Shielded, Tank, and Boss Titan units.
- Tech Tree Upgrades: 8 upgrade tracks with up to 10 progression levels each.
- Audio System: Asynchronous sound effects and synthwave soundtrack with automatic lifecycle synchronization.
Google AdMob & UMP GDPR Monetization
- Google UMP Consent: Full GDPR/EEA consent gathering with user-accessible “Privacy Options” in settings.
- Adaptive Banner Ads: Positioned on main screens with dynamic sizing and zero empty placeholder gaps.
- Interstitial Ads: Triggered on sector selection and game over with configurable counter and cooldown pacing.
- Rewarded Video Ads: Option to claim bonus Tech Cores with reward granted upon ad completion.
- Central Configuration: All ad unit IDs and pacing controls are managed in a single configuration file (
AdsConfig.kt). - No-Ads Build Option: Toggle
isAdsEnabled = false in AdsConfig.kt to produce an ad-free version.
Technical Specifications
- Language: Kotlin (v2.2.10)
- UI Framework: Jetpack Compose (BOM v2024.11.00 / Material 3)
- Android Gradle Plugin: v9.3.0 or newer
- Architecture: MVVM + StateFlow + Coroutines
- Data Storage: Android Jetpack DataStore (Preferences with Cloud Backup rules)
- Target SDK / Compile SDK: 36 (Android 16)
- Minimum SDK: 26 (Android 8.0)
- Orientation: Portrait
What You Get
- Full Android Studio source code project (Kotlin + Jetpack Compose)
- Integrated Google AdMob and Google UMP Consent system
- Original audio files and optimized graphic assets
- ProGuard / R8 rules and JUnit unit test suite
- Offline HTML documentation and step-by-step customization guide
Customization
- Package Name: Refactor package name in Android Studio and update
build.gradle.kts. - AdMob Setup: Add your AdMob IDs in
AdsConfig.kt and AndroidManifest.xml. - App Name & Icon: Update app name in
strings.xml and generate launcher icons using Image Asset Studio. - Level & Tower Balance: Modify maps, waves, and tower stats directly in the data models.
Requirements
Third-Party Disclaimer
Google AdMob is a third-party advertising service provided by Google LLC. Ad serving, impressions, and revenue are subject to Google AdMob policies and account status. This source code provides technical integration with the Google Mobile Ads SDK and Google User Messaging Platform.
Support
For technical support or setup questions, please contact our support team: