/snake-game

🐍 Classic game of snake in python.

Primary LanguagePython

Snake Game in Python using Pygame

Preview

Classic Game of Snake using Pygame in Python 🐍

Show support:
Star 🌟 the Project: GitHub stars
Follow 🤝 on GitHub: GitHub followers

Made by maxontech

Table of contents

Description

This is the Snake Game using Pygame written in Python.

YouTube Videos

Building the Snake Game using Python & Pygame

Installation

Requirements: You must have Python installed and preferably a code editor like PyCharm.

  1. Clone the repository
  2. In the terminal, navigate to the directory where the repository was cloned, e.g., C:\Users\Max\PycharmProjects\snake-game
  3. Create a virtual environment, activate it, and install pygame by running the following commands in the terminal:
    python -m venv venv #This creates a virtual environment
    venv\Scripts\activate #This activates the virtual environment
    pip install -r requirements.txt #This installs the required libraries
  4. Run the game by running the following command in the terminal:
    python main.py

Note on PyCharm: Often PyCharm detects the requirements and asks you to install them and create a virtual env.

Controls

  • You can control the snake with the arrow keys.

Libraries

  • pygame: Pygame is a cross-platform set of Python modules designed for writing video games.

FAQ

Contact

Feel free to reach out to me on Twitter if you have any questions or feedback! Hope you find this useful!