Skip to content

This is a simple console-based Snake Game written in C++. It offers a classic Snake gaming experience with additional features, including multiple difficulty levels and the ability to advance to the second level by reaching a certain score.

Notifications You must be signed in to change notification settings

Hashan-Samarakkody/Snake_Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game in C++

  1. Introduction:

    This is a simple console-based Snake Game written in C++. It offers a classic Snake gaming experience with additional features, including multiple difficulty levels and the ability to advance to the second level by reaching a certain score.

  2. Features:

    1. Four color themes to choose from: Aqua, Yellow, White, and Purple.
    2. Three difficulty levels: Easy, Medium, and Hard.
    3. Two game levels, with different challenges in level 2.
    4. Pause and resume gameplay with the spacebar.
    5. Display of the player's score.
    6. An option to exit the game.
    7. Colorful user interface.
  3. Instructions

3.1) Controls:

  W: Move the snake upwards.
  S: Move the snake downwards.
  A: Move the snake leftwards.
  D: Move the snake rightwards.
  Space: Pause the game.
  X: Quit the game.

3.2) Gameplay:

  Collect all food items to increase your score.
  Avoid collisions with the snake's own body.
  In level 2, also avoid collisions with the center wall.

3.3) How to Run:

  1. Ensure you have a C++ compiler installed (e.g., g++, Visual C++).
  2. Compile the source code and run the executable.
  3. To run the code you may need to use the following command:-
        g++ snake_game.cpp -o snake_game.exe
        ./snake_game.exe
  4. Follow the on-screen instructions to choose the color theme and difficulty level.
  1. Color Themes:

    Aqua: Bright cyan-based theme. Yellow: Vibrant yellow theme. White: Classic white theme. Purple: Stylish purple theme.

  2. Levels:

    Level 1: Collect food items and avoid collisions with your snake's body. Level 2: In addition to level 1 rules, collect all food items and avoid the center wall.

  3. Scoring:

    Your score increases with each collected food item. The game advances to level 2 when you reach a specific score (configurable).

  4. Acknowledgments:

This Snake Game was developed as a collaborative project for the MIT course, serving as the culmination of our collective expertise in C++ programming. We extend our sincere gratitude to the instructors of the MIT course for their invaluable guidance and unwavering support throughout our educational journey. Additionally, I would like to express my profound appreciation to each member of our group who demonstrated a high level of commitment and dedication to the successful completion of this project.

  1. Additional Notes: This project represents a significant milestone in our C++ programming journey and serves as a testament to our newfound skills

About

This is a simple console-based Snake Game written in C++. It offers a classic Snake gaming experience with additional features, including multiple difficulty levels and the ability to advance to the second level by reaching a certain score.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages