Skip to content

millipede-cpu/snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

32 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Snake Game

A retro snake game built with Python, Pygame and available to play on Github Pages with pygbag here ๐Ÿ

Prerequisites

Before running the game, make sure you have Python 3 and Pygame installed.

1. Install Python 3

  • 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`
    

2. Create a virtual environment (recommended):

python3 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate

3. Install pygame

pip install pygame

Check pygame version: python3 -m pygame --version

Setup

  1. Activate the virtual environment (.venv): source .venv/bin/activate # On Windows: .venv\Scripts\activate

  2. Install dependencies: pip install -r requirements.txt

  3. Run the game locally:

  • From VS Code: Open main.py and click the โ–ถ๏ธ play button in the toolbar.
  • From Terminal: Navigate to the project folder and run: python3 main.py
  1. ๐Ÿ•น๏ธ Game controls:
  • Use the UP, RIGHT, LEFT AND DOWN keys to control the snake and eat those apples. Have fun!

About

Pygame Snake ๐Ÿ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages