README
ASTEROIDS
A classic arcade-style space shooter built with Kotlin and Jetpack Compose for Android.
🎮 Game Description
Navigate your ship through space, destroying asteroids and surviving through increasingly difficult levels. Experience classic arcade gameplay with modern graphics and smooth 60 FPS performance.
✨ Features
- Ship-Centered Gameplay - Ship stays centered while the universe moves around you
- Progressive Levels - Complete levels by destroying all asteroids, difficulty increases each level
- Asteroid Physics - Asteroids break into smaller pieces when shot
- Explosive Effects - Orange particle explosions on asteroid destruction
- 3-Layer Parallax Starfield - Depth-creating background with different scroll speeds
- Mini Map - 250x250px radar showing nearby asteroids
- Smooth Controls - Custom hold-button system for responsive ship control
- Full Portrait Mode - Optimized for mobile gameplay
🚀 Technical Highlights
- Native Android - Built with Kotlin for maximum performance
- Jetpack Compose Canvas - Modern declarative UI for custom rendering
- 60 FPS Game Loop - Smooth gameplay with 16ms frame updates
- Screen Wrapping - Seamless world boundaries
- Collision Detection - Accurate bullet-asteroid collision with radius-based detection
🎯 Controls
Bottom Left:
- Rotation Slider - DJ mixer style fader control
Bottom Right:
- Thrust Button (↑) - Fire engines to move forward
- Fire Button (🔥) - Shoot bullets
🛠️ Technology Stack
- Language: Kotlin
- UI Framework: Jetpack Compose
- Build System: Gradle with Version Catalogs
- Min SDK: 26 (Android 8.0)
- Target SDK: 35 (Android 14)
📊 Game Mechanics
- Ship stays centered, world moves relative to ship
- Asteroids spawn from screen edges
- Large asteroids split into 2 smaller pieces when hit
- Score increases with each asteroid destroyed
- 10 progressive levels with increasing difficulty:
- Lives system (3 lives)
- Level system with wave-based progression
🎨 Visual Features
- Gradient space backgrounds
- 3-layer parallax stars (165 total) with truly random positions
- Procedurally generated asteroid shapes (8-12 sided polygons)
- Neon glow effects on ship and asteroids
- Color-coded controls:
- Real-time mini map overlay (250x250px) showing asteroid positions
- Explosion particle effects
📱 Building the Game
bash
cd /home/jon/AndroidStudioProjects/MyApplication2
./gradlew assembleDebug
📦 Installation
bash
adb -s <DEVICE_ID> install -r app/build/outputs/apk/debug/app-debug.apk
adb -s <DEVICE_ID> shell am start -n com.example.myapplication/.MainActivity
🎮 Gameplay Tips
📈 Version History
- v2.1 - DJ Mixer Controls & Random Stars
- v2.0 - Complete game redesign to Asteroids
- v1.0 - Initial Gravity Drift (previous game)
🎯 Future Enhancements
- [ ] Enemy ships that shoot back
- [ ] Power-ups (shields, rapid fire, spread shot)
- [ ] High score leaderboard
- [ ] Sound effects and music
- [ ] Particle trails for bullets
- [ ] Ship destruction animation
- [ ] Bonus levels
- [ ] Multiple ship types with different stats
📄 License
Created for personal use and learning.
🙏 Credits
Inspired by the classic arcade game "Asteroids" (1979) by Atari. Rebuilt from scratch in native Android/Kotlin using Jetpack Compose.
Current Version: 2.1 Last Updated: 2025-10-07