/snake-game

Classic snake game

Primary LanguagePython

Snake Game in Pygame

This is a simple Snake game built using Pygame library in Python. The game involves controlling a snake to eat food, and trying to score as many points as possible.

Installation

To play this game, you need to have Python and Pygame installed on your system. You can download Python from the official website: https://www.python.org/downloads/

To install Pygame, you can use pip, the package installer for Python. Open a terminal or command prompt and run the following command:

pip install pygame

How to Play

To start the game, run the snake-game.py file using Python. You can use the arrow keys on your keyboard to control the snake's movement: up, down, left, or right. The snake will move continuously, and your goal is to eat the food that appears randomly on the screen.

If the snake hits the wall or its own body, the game will end.

snake game

Features

This Snake game features:

  • Randomly generated food
  • Score keeping
  • Game over screen with final score display
  • Simple and intuitive controls

Development

This game was developed using Python 3.10.9 and Pygame 2.1.0.

Credits

This game was inspired by the classic Snake game and was built as a personal project by ME.

Acknowledgements

Tutorial used to build the game: Youtube Video

Author

Feel free to connect with me on my socials as listed above. 😊