Skip to content

devyanic11/Snake-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake-Game

Welcome to the Snake Game repository! This classic Snake Game is a simple yet addictive game built using Python and the Pygame library. It's a great project for both beginners looking to learn game development and experienced developers wanting to create a fun, retro-style game.

Snake Game Screenshot

Table of Contents

Getting Started

To get started with the Snake Game, follow these instructions:

Prerequisites

  • Python 3.x installed on your computer. You can download it from python.org.
  • Pygame library installed. You can install it using pip:
pip install pygame

Installation

  • Clone this repository to your local machine:
git clone https://github.com/devyanic11/Snake-Game.git
  • Navigate to the project directory:
cd Snake-Game
  • Run the game:
python snake_game.py

How to Play

  • Use the arrow keys (Up, Down, Left, Right) to control the snake's direction.
  • The objective is to eat the food that appears on the screen to grow longer.
  • Avoid running into the walls or the snake's own body, as this will end the game.
  • Try to achieve the highest score possible by eating as much food as you can without colliding with obstacles.

Features

  • Classic Snake gameplay.
  • Simple and intuitive controls.
  • Score tracking to keep track of your progress.
  • Game over screen displaying your final score.
  • Fun and addictive gameplay.

Customization

You can customize the game by modifying the following variables in the snake_game.py file:

  • SCREEN_WIDTH and SCREEN_HEIGHT: Adjust the size of the game window.
  • SNAKE_SIZE and FOOD_SIZE: Change the size of the snake and food.
  • SNAKE_SPEED: Adjust the speed of the snake's movement.
  • FONT_SIZE and FONT_COLOR: Customize the font used for the score display.

Feel free to experiment and make the game your own!

Contributing

If you'd like to contribute to this project, please follow these guidelines:

  • Fork the repository.
  • Create a new branch for your feature or bug fix.
  • Make your changes and test them thoroughly.
  • Ensure your code follows the PEP 8 style guide.
  • Create a pull request with a clear description of your changes.

We welcome contributions from the community!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages