A retro snake game built with Python, Pygame and available to play on Github Pages with pygbag here ๐
Before running the game, make sure you have Python 3 and Pygame installed.
- macOS: Download the latest stable version from python.org and run the installer.
- Windows: Download and install from python.org.
- Linux: Use your package manager, for example:
sudo apt update sudo apt install python3 python3-venv python3-pip Check Python version: `python3 --version`
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install pygame
Check pygame version: python3 -m pygame --version
-
Activate the virtual environment (.venv):
source .venv/bin/activate# On Windows:.venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt -
Run the game locally:
- From VS Code: Open
main.pyand click theโถ๏ธ play button in the toolbar. - From Terminal: Navigate to the project folder and run:
python3 main.py
- ๐น๏ธ Game controls:
- Use the UP, RIGHT, LEFT AND DOWN keys to control the snake and eat those apples. Have fun!