Skip to content

AritraC1/Snake-Game

Repository files navigation

Snake Game

A sleek, modern take on the classic Snake game, built with Flutter. It features a dark-themed UI, fluid gesture-based controls, and a comprehensive records system.

App Logo

Download

Go to the Releases to download the latest APK.

✨ Features

🎮 Gameplay

  • Classic Mechanics: Smooth snake movement on a dynamic grid.
  • Gesture Controls: Intuitive swipe-based navigation (Up, Down, Left, Right).
  • Dynamic Growth: The snake grows longer as it eats "neon cores."
  • Collision Detection: Automatic game over when hitting walls or the snake's own body.
  • Score Tracking: Real-time score updates and high-score persistence.

📊 Stats & Progress

  • Personal Best: Tracks your all-time high score using Hive local storage.
  • Game History: View recent sessions with timestamps and scores.
  • Lifetime Stats: Monitor total food collected and total games played.

🧠 User Experience

  • Modern Dark UI: Neon-green accents on a deep black background for high contrast.
  • Interactive Rules: Built-in guide for mastering gesture controls.
  • Audio Settings: Customizable music and SFX preferences with a master volume slider using audioplayers.
  • Responsive Design: Adapts to different screen sizes.
  • Custom Branding: Includes a custom splash screen and launcher icons.

📷 Screenshots

Main Screens

Home Screen Game Screen Records Screen

Other Screen

Rules Settings Retry/Game Over Exit/Quit Game

🛠️ Tech Stack

  • Framework: Flutter
  • Language: Dart
  • Local Storage: Hive for high-performance persistent storage.
  • Audio: AudioPlayers for background music and sound effects.
  • State Management: Local state (StatefulWidget) and centralized storage utilities.

📂 Project Structure

lib/
├── core/           # Theme, constants, and Hive storage configuration
├── features/
│   ├── game/       # Game logic, models (Sessions, Stats), and gameplay screen
│   ├── home/       # Home landing page
│   └── records/    # Player statistics and history screens
├── shared/         # Common widgets (e.g., MainScaffold with IndexedStack)
├── utils/          # Audio player utilities, date formatters, and directions
├── app.dart        # Root MaterialApp widget
└── main.dart       # Entry point, initializes Hive and Audio settings

🕹️ Controls

Gesture Action
Swipe Up Move Up
Swipe Down Move Down
Swipe Left Move Left
Swipe Right Move Right

🚀 Getting Started

  1. Clone the repository:

    git clone https://github.com/AritraC1/Snake-Game.git
  2. Install dependencies:

    cd Snake-Game
    flutter pub get
  3. Generate Hive Adapters (if needed):

    dart run build_runner build
  4. Run the app:

    flutter run

About

A sleek, modern take on the classic Snake game, built with Flutter. It features a dark-themed UI, fluid gesture-based controls, and a comprehensive records system.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors