A sleek and modern Snake Game built with Flutter, featuring intuitive gameplay, smooth animations, and a responsive user interface. This project leverages BLoC (Business Logic Component) for efficient state management, Dependency Injection to decouple code, and Hive for storing past scores. It's designed to offer a fun and engaging experience for players of all ages.
(Include screenshots here to showcase gameplay, start screen, leaderboard, dark/light themes, etc.)
- Classic Snake Gameplay: Enjoy the retro snake game with a modern UI twist.
- BLoC State Management: Ensures smooth gameplay with reactive state updates.
- Dependency Injection: Simplifies the codebase and enhances maintainability.
- Hive Storage: Stores past scores locally, allowing users to track their progress.
- Material Design: A visually appealing UI that adheres to Material Design principles.
- Leaderboard: Displays the highest scores to encourage re-playability.
- Flutter: Cross-platform framework for building mobile apps.
- Dart: Programming language used for Flutter development.
- BLoC: Efficient state management for a reactive UI.
- Hive: Lightweight local storage solution for saving high scores.
- Dependency Injection: Ensures scalability and easier code maintenance.
- Ensure that Flutter is installed. Follow the installation guide here.
- Clone this repository:
git clone https://github.com/arpit24sahu/snake_game_flutter.git
- Navigate to the project directory:
cd snake-game - Get all dependencies:
flutter pub get
- Run the app:
flutter run
- Game Board: A grid where the snake moves and grows by consuming food.
- Snake Control: Players can change the snake's direction using swipe gestures or on-screen controls.
- Score Tracking: Each food consumed increases the score and the snake's length.
- Leaderboard: High scores are stored using Hive and displayed on a separate leaderboard page.
snake-game-flutter/
├── lib/
│ ├── bloc/ # BLoC files for state management
│ ├── di/ # Dependency injection configuration
│ ├── screens/ # Game models and business logic
│ ├── widgets/ # UI files and widgets
│ ├── main.dart # Main entry point
└── pubspec.yaml # Project dependencies
- Theming: Introduce customizable themes and color schemes.
- Multiplayer Mode: Play against friends or compete in real-time.
- Power-Ups: Add special items that provide temporary boosts.
- Daily Challenges: Introduce new challenges to keep players engaged.
Contributions are welcome! Feel free to submit issues or pull requests to enhance the game.
This project is licensed under the MIT License. See the LICENSE file for more details.
Developed by Arpit Sahu. Feel free to reach out for any questions or feedback!