Skip to main content
Public
README.md 2.61 KB

Galaxy Shooter - Android Game

A space shooter game for Android built with Kotlin and Canvas API.

Features

  • Smooth 60FPS gameplay
  • Touch controls - Drag to move your ship
  • Auto-fire - Focus on dodging enemies
  • 6 enemy types with different behaviors:
  • Basic (red) - Standard enemy
  • Fast (orange) - Quick and agile
  • Tank (purple) - Heavy armor
  • Shooter (magenta) - Fires bullets
  • Elite (green) - Advanced attacks
  • Boss (red) - Massive health
  • 5 power-ups:
  • Health (red) - Restore HP
  • Weapon (yellow) - Upgrade firepower
  • Shield (cyan) - Temporary invincibility
  • Speed (green) - Move faster
  • Bomb (magenta) - Destroy all enemies
  • Level progression - Enemies get harder
  • Particle effects - Explosions and hits
  • Immersive fullscreen - No distractions
  • How to Build

    Requirements

  • Android Studio Hedgehog (2023.1.1) or newer
  • Android SDK 34
  • Kotlin 1.9.0
  • Steps

    1. Open Android Studio 2. Select "Open an existing Android Studio project" 3. Navigate to the GalaxyShooterAndroid folder 4. Wait for Gradle sync to complete 5. Connect your Android device or start an emulator 6. Click the Run button (β–Ά) or press Shift+F10

    Build APK

    BASH
    1
    2
    3
    # Debug APK
    

    ./gradlew assembleDebug

    # Release APK (requires signing) ./gradlew assembleRelease

    The APK will be in app/build/outputs/apk/

    Controls

  • Touch and drag anywhere on screen to move your ship
  • Your ship will follow your finger
  • Auto-fire is always active
  • Tap when on start/game over screen to begin
  • Game Structure

    TEXT
    1
    2
    app/src/main/java/com/galaxyshooter/
    

    β”œβ”€β”€ GameActivity.kt # Main activity β”œβ”€β”€ GameView.kt # SurfaceView for rendering β”œβ”€β”€ game/ β”‚ β”œβ”€β”€ GameEngine.kt # Main game logic β”‚ └── AssetManager.kt # Asset loading └── entities/ β”œβ”€β”€ Player.kt # Player ship β”œβ”€β”€ Enemy.kt # Enemy types β”œβ”€β”€ Bullet.kt # Projectiles β”œβ”€β”€ PowerUp.kt # Power-ups β”œβ”€β”€ Particle.kt # Visual effects β”œβ”€β”€ Explosion.kt # Explosion effects └── Star.kt # Background stars

    Customization

    Change Difficulty

    Edit GameEngine.kt:

  • spawnInterval - Enemy spawn rate
  • Enemy health, speed values
  • shootInterval - Enemy fire rate
  • Add New Enemy Types

    1. Add new type to EnemyType enum 2. Add configuration in Enemy.init 3. Add drawing method

    Change Colors

    Edit color values in entity classes or use colors.xml

    License

    MIT License - Feel free to use and modify!

    About

    A space shooter game for Android built with Kotlin and Canvas API.


    70 files
    41 folders
    9.18 MB total size
    0 open issues
    0 open pull requests
    0 watchers
    0 forks
    0 stars
    101 views
    Updated 2 days ago
    Languages
    XML 66.0%
    Kotlin 34.0%