A thrilling space adventure where you pilot a spaceship through asteroid fields, dodging danger while collecting cosmic treasures!
Space Dodger is an exciting mobile game that combines classic arcade gameplay with modern mobile features. Navigate your spaceship through treacherous asteroid fields, collect valuable coins, and achieve the highest score possible while customizing your gaming experience with various settings and difficulty levels.
- ๐ฏ Intuitive Controls: Simple left/right touch controls for smooth gameplay
- โก Dynamic Difficulty: Adjustable difficulty from 0.5x to 6.0x for all skill levels
- ๐ Smart Scoring: Score multipliers based on difficulty and strategic choices
- โค๏ธ Lives System: Multiple lives (1-3) for extended gameplay sessions
- ๐จ Beautiful Graphics: Space-themed visuals with particle effects and smooth animations
- ๐ Immersive Audio: Sound effects and background music for enhanced experience
- โ๏ธ Customizable Settings: Tailor the game to your preferences
- Spaceship Navigation: Control your ship with responsive touch controls
- Asteroid Dodging: Navigate through falling red asteroids to survive
- Coin Collection: Collect yellow coins to increase your score
- Progressive Speed: Game speed increases as your score grows
- Lives System: Start with 1-3 lives (configurable in settings)
- Difficulty Scaling: 0.5x to 6.0x difficulty multiplier
- Higher difficulty = more asteroids + better scoring
- 3x difficulty = 3 points per coin, 6x difficulty = 6 points per coin
- Coin Magnet: Enable to collect coins from any height
- Magnet Bonus: +5 points when coin magnet is OFF (skill reward)
- Speed Control: Adjustable game speed from 30ms to 120ms
- Max Score Tracking: Persistent high score tracking
- Space Theme: Beautiful cosmic graphics with detailed sprites
- Particle Effects: Explosions, coin collection effects, and engine trails
- Smooth Animations: 60 FPS gameplay with fluid movements
- Sound Effects: Coin collection, explosions, and game over sounds
- Background Music: Immersive space-themed audio
- Lives Selection: Choose 1, 2, or 3 lives
- Difficulty Slider: Fine-tune challenge level (0.5x - 6.0x)
- Game Speed: Adjust base game speed for your preference
- Coin Magnet: Toggle automatic coin collection
- Visual Effects: Enable/disable particle effects
- Sound Settings: Control audio experience
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ Space Dodge ๐ โ
โ โ
โ ๐ โ
โ โ
โ โญ ๐ฅ โ
โ โ
โ ๐ฅ โญ โ
โ โ
โ [โ] [โถ] โ
โ โ
โ Score: 150 โค๏ธโค๏ธโค๏ธ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Gameplay with lives display and score tracking
- Flutter SDK: 3.0.0 or higher
- Dart SDK: Latest stable version
- Development Environment: Android Studio, VS Code, or your preferred IDE
- Device/Emulator: Android device, iOS device, or emulator
-
Clone the repository
git clone https://github.com/yourusername/space-dodger.git cd space-dodger -
Install dependencies
flutter pub get
-
Run the game
flutter run
Android APK:
flutter build apk --releaseAndroid App Bundle (Recommended for Play Store):
flutter build appbundle --releaseiOS App:
flutter build ios --releaseWeb Version:
flutter build web --release- Left Button (โ): Move spaceship to the left
- Right Button (โถ): Move spaceship to the right
- Settings Icon (โ๏ธ): Access game settings and customization
- Pause Icon (โธ๏ธ): Pause/resume the game
- Refresh Icon (๐): Restart the current game
- Objective: Collect as many coins as possible while avoiding asteroids
- Scoring System:
- Base score = difficulty multiplier ร 1 point
- Magnet bonus = +5 points when coin magnet is OFF
- Example: 3x difficulty + magnet OFF = 8 points per coin
- Lives: Start with 1-3 lives (configurable)
- Game Over: Lose all lives when colliding with asteroids
- Progression: Game speed increases with higher scores
- Beginner: Start with 1.0x difficulty and coin magnet ON
- Intermediate: Try 2.0x-3.0x difficulty for better scoring
- Expert: Challenge yourself with 4.0x-6.0x difficulty and magnet OFF
- High Score: Combine high difficulty with magnet OFF for maximum points
- 1 Life: Hardcore mode - one mistake and you're done
- 2 Lives: Balanced challenge - room for one mistake
- 3 Lives: Casual mode - forgiving gameplay for beginners
- 0.5x: Very Easy - Few asteroids, perfect for learning
- 1.0x: Easy - Standard gameplay
- 2.0x: Medium - More challenging
- 3.0x: Hard - High asteroid density
- 4.0x: Very Hard - Intense gameplay
- 5.0x: Extreme - Maximum challenge
- 6.0x: Insane - Ultimate test of skill
- 30ms: Very Fast - For experienced players
- 60ms: Fast - Standard speed
- 90ms: Moderate - Balanced gameplay
- 120ms: Slow - Relaxed pace for beginners
- ON: Automatic coin collection from any height
- OFF: Manual collection only (requires precise positioning) + 5 bonus points
space-dodger/
โโโ lib/
โ โโโ main.dart # App entry point
โ โโโ screens/
โ โ โโโ game_screen.dart # Main game screen and logic
โ โโโ models/
โ โ โโโ game_objects.dart # Game entities (Ship, Bomb, Coin)
โ โ โโโ sound_manager.dart # Audio management
โ โโโ widgets/
โ โโโ game_painter.dart # Custom painting for game graphics
โ โโโ settings_panel.dart # Settings dialog widget
โ โโโ space_background.dart # Animated background
โโโ assets/
โ โโโ app_icon.png # Custom app icon
โ โโโ sounds/ # Audio files
โโโ android/ # Android-specific configuration
โโโ ios/ # iOS-specific configuration
โโโ pubspec.yaml # Dependencies and configuration
- GameScreen: Main game controller, UI, and game loop
- Ship: Player-controlled spaceship with movement logic
- Bomb: Hazardous asteroids that must be avoided
- Coin: Collectible items that increase score
- GamePainter: Custom rendering for optimized graphics
- SettingsPanel: Comprehensive game configuration interface
- SoundManager: Audio playback and management
- Input Processing: Handle touch inputs and continuous movement
- Entity Updates: Move ship, bombs, and coins based on game speed
- Collision Detection: Check for collisions and coin collection
- Scoring System: Calculate points based on difficulty and settings
- State Management: Update lives, score, and game state
- Visual Effects: Render particles, explosions, and animations
- Audio Feedback: Play appropriate sound effects
- Efficient Collision Detection: Optimized hitbox calculations
- Object Pooling: Reuse game objects to minimize memory allocation
- Custom Painting: Direct canvas rendering for smooth 60 FPS
- State Management: Minimal widget rebuilds with proper state handling
- Memory Management: Automatic cleanup of off-screen objects
- New Game Objects: Extend
game_objects.dartwith new entity classes - Visual Enhancements: Modify
game_painter.dartfor new graphics - UI Improvements: Update
game_screen.dartorsettings_panel.dart - Game Logic: Enhance game loop in
game_screen.dart - Audio: Add new sounds to
sound_manager.dart
- Follow Flutter/Dart best practices
- Use meaningful variable and function names
- Add comments for complex game logic
- Maintain consistent code formatting
# Run tests
flutter test
# Run with coverage
flutter test --coverage
# Debug mode
flutter run --debugGame won't start:
- Ensure Flutter SDK is properly installed
- Run
flutter doctorto check setup - Try
flutter clean && flutter pub get
Performance issues:
- Disable visual effects in settings
- Close other apps to free memory
- Use a device instead of emulator
Touch not responding:
- Check device/emulator connection
- Restart the app
- Verify touch input is enabled
Build errors:
- Update Flutter:
flutter upgrade - Clean project:
flutter clean - Reinstall dependencies:
flutter pub get
# Check Flutter installation
flutter doctor
# Clean and rebuild
flutter clean
flutter pub get
# Run in debug mode
flutter run --debug
# Build release APK
flutter build apk --releaseThis project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow existing code style and conventions
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting
- GitHub Issues: Report bugs or request features
- Discussions: Join community discussions
- Email: Contact the development team
- Documentation: Check this README and code comments
- Flutter Team: For the amazing framework
- Dart Team: For the powerful programming language
- Flutter Community: For excellent documentation and support
- Game Development Community: For inspiration and best practices
- Beta Testers: For valuable feedback and bug reports
- Multiplayer mode
- Power-ups and special abilities
- Different ship types
- Achievement system
- Leaderboards
- More visual themes
- Enhanced sound effects
- Tutorial mode