A Flutter implementation of a Candy Crush-style match-3 puzzle game with smooth animations and modern UI.
- 8x8 Dynamic Grid: Colorful candy tiles with unique icons and colors
- Drag-to-Swap: Intuitive touch controls for swapping adjacent candies
- Match Detection: Automatic detection of 3+ matching candies in rows and columns
- Cascade Effects: Multiple matches trigger automatically for combo effects
- Rotation Animation: Matched candies rotate before disappearing
- Drop Animation: Candies fall down to fill empty spaces
- Fill Animation: New candies appear at the top with smooth transitions
- Visual Feedback: Selected candies scale up and have highlighted borders
- Score System: Points awarded for matches with bonuses for longer chains
- Level Progression: Automatic level-ups based on score milestones
- Game Reset: Easy restart functionality
- Invalid Move Detection: Prevents invalid swaps with user feedback
- Null Safety: Full Dart null safety implementation
- Modular Architecture: Separated game logic, UI components, and models
- Responsive Design: Adapts to different screen sizes
- Smooth Performance: Optimized animations and state management
- Red: Heart icon
- Blue: Water drop icon
- Green: Eco/leaf icon
- Yellow: Star icon
- Purple: Diamond icon
- Orange: Fire icon
- Base score: 10 points per matched candy
- 4-match bonus: +20 points
- 5+ match bonus: +50 points
- Level up every 100 points
- Each level increases the challenge
- Swap Candies: Tap or drag to swap adjacent candies
- Create Matches: Align 3 or more of the same candy type horizontally or vertically
- Watch Combos: Multiple matches trigger automatically for higher scores
- Progress: Earn points to level up and unlock new challenges
lib/
├── main.dart # App entry point
├── models/
│ └── candy.dart # Candy model and types
├── services/
│ └── game_logic.dart # Core game logic and algorithms
├── screens/
│ └── game_screen.dart # Main game screen
└── widgets/
├── candy_tile.dart # Individual candy tile widget
└── game_grid.dart # Game grid container
- Flutter SDK (3.8.1 or higher)
- Dart SDK
- Android Studio / VS Code with Flutter extensions
- Clone the repository:
git clone <repository-url>
cd candycrush_dt
- Install dependencies:
flutter pub get
- Run the game:
flutter run
For Android:
flutter build apk --release
For iOS:
flutter build ios --release
For Web:
flutter build web --release
- Model-View-Service: Clean separation of concerns
- State Management: Flutter's built-in setState for simple state management
- Animation System: Custom animation controllers for smooth transitions
- Match Detection: Efficient horizontal and vertical pattern matching
- Grid Management: Dynamic grid updates with position tracking
- Cascade Processing: Recursive match detection for combo effects
- Efficient grid operations with minimal object creation
- Optimized animation controllers with proper disposal
- Responsive UI with adaptive sizing
- Sound effects and background music
- Power-ups and special candies
- Time-based challenges
- Multiplayer support
- Achievement system
- Custom themes and candy sets
- Save/load game progress
- Tutorial mode for beginners
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the classic Candy Crush Saga game
- Built with Flutter for cross-platform compatibility
- Uses Material Design principles for modern UI/UX