Skip to content

A sleek and engaging Snake game built using Flutter, offering endless fun with a clean, intuitive interface. This mobile-first game is optimized for both Android and iOS platforms, making it easy to play on the go!

Notifications You must be signed in to change notification settings

arpit24sahu/snake_game

Repository files navigation

🐍 Snake Game Built with Flutter

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.


📱 Screenshots

(Include screenshots here to showcase gameplay, start screen, leaderboard, dark/light themes, etc.)


🎯 Features

  • 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.

🚀 Technologies Used

  • 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.

📦 Installation

  1. Ensure that Flutter is installed. Follow the installation guide here.
  2. Clone this repository:
    git clone https://github.com/arpit24sahu/snake_game_flutter.git
  3. Navigate to the project directory:
    cd snake-game
  4. Get all dependencies:
    flutter pub get
  5. Run the app:
    flutter run

🛠️ How It Works

  1. Game Board: A grid where the snake moves and grows by consuming food.
  2. Snake Control: Players can change the snake's direction using swipe gestures or on-screen controls.
  3. Score Tracking: Each food consumed increases the score and the snake's length.
  4. Leaderboard: High scores are stored using Hive and displayed on a separate leaderboard page.

📂 Folder Structure

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

🧩 Future Improvements

  • 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.

🤝 Contributing

Contributions are welcome! Feel free to submit issues or pull requests to enhance the game.


📜 License

This project is licensed under the MIT License. See the LICENSE file for more details.


👨‍💻 Author

Developed by Arpit Sahu. Feel free to reach out for any questions or feedback!

About

A sleek and engaging Snake game built using Flutter, offering endless fun with a clean, intuitive interface. This mobile-first game is optimized for both Android and iOS platforms, making it easy to play on the go!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published