savinmax eaa6947e93 Refactor gem swap logic to handle invalid moves and animations
- Add proper validation for null gems during swap operations
- Implement swap-back animation for invalid moves (no matches)
- Restructure swap flow to emit animation states before match detection
- Add move limit validation before processing matches
- Improve error handling and logging for edge cases
2025-09-28 13:00:45 +02:00

Match 3 Game - Flutter/Flame

A cross-platform Match 3 puzzle game built with Flutter and Flame game engine.

Technology Stack

  • Framework: Flutter
  • Game Engine: Flame
  • State Management: Bloc/Cubit
  • Platforms: iOS, Android, Web, Desktop

Features

  • Classic match-3 gameplay (8x8 grid)
  • Smooth animations and particle effects
  • Multiple game modes (Classic, Timed, Moves-limited)
  • Power-ups and special gems
  • Progressive difficulty levels
  • Score tracking and achievements
  • Cross-platform compatibility

Project Structure

lib/
├── main.dart
├── game/
│   ├── match_three_game.dart      # Main game class
│   ├── components/                # Game components
│   │   ├── grid_component.dart
│   │   ├── gem_component.dart
│   │   └── ui_overlay.dart
│   ├── systems/                   # Game systems
│   │   ├── match_detector.dart
│   │   ├── gravity_system.dart
│   │   └── score_system.dart
│   └── models/                    # Data models
│       ├── gem.dart
│       ├── grid.dart
│       └── game_state.dart
├── screens/                       # UI screens
│   ├── menu_screen.dart
│   ├── game_screen.dart
│   └── settings_screen.dart
├── bloc/                         # State management
│   ├── game_bloc.dart
│   └── menu_bloc.dart
└── utils/
    ├── constants.dart
    └── helpers.dart

Getting Started

  1. Install Flutter SDK
  2. Add Flame dependency
  3. Run flutter pub get
  4. Launch with flutter run
Description
Match Three game
Readme 299 KiB
Languages
Dart 95.8%
Ruby 1.5%
Swift 1.4%
HTML 1.3%