Skip to content

Woodmatthewj522/PythonSnakeGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ Matts OG Snake

A modern twist on the classic Snake game โ€” built with Python and Pygame.

Created by: mw Date: 09/17/2025 IDE: Visual Studio 2022

๐ŸŽฎ Overview

Matts OG Snake is a simple yet polished recreation of the classic Snake game made using Python and Pygame. It includes smooth controls, a pause feature, and a persistent leaderboard to track the top scores locally.

โœจ Features

๐Ÿ•น๏ธ Classic Snake gameplay

๐Ÿ’พ Persistent leaderboard stored in leaderboard.txt

โธ๏ธ Pause and resume functionality (SPACE key)

๐Ÿ† Top 3 leaderboard display during pause and game over

๐Ÿ‘ค Player initials input upon losing

๐Ÿ” Option to restart or quit after game over

๐ŸŽจ Clean, dark-themed visuals

๐Ÿงฉ Controls

Key Action W / โ†‘ Move Up A / โ† Move Left S / โ†“ Move Down D / โ†’ Move Right SPACE Pause / Resume ENTER Submit initials (after game over) R Clear leaderboard (when paused) Q Quit the game (after game over) C Restart the game (after game over)

๐Ÿ“‚ File Structure

snake_game/

โ”œโ”€โ”€ snake.py # Main game file

โ”œโ”€โ”€ leaderboard.txt # Stores leaderboard data (auto-created)

โ”œโ”€โ”€ README.md # This file

โš™๏ธ Requirements

Python Version: 3.8+

Dependencies:

pygame

Install dependencies using:

pip install pygame

โ–ถ๏ธ How to Run

Clone or download this repository.

Open the folder in Visual Studio 2022 or any Python IDE.

Run the game using:

python snake.py

Enjoy the game!

๐Ÿ Gameplay Notes

The snake grows by one block each time it eats food.

The game ends if the snake hits the wall or itself.

After losing, you can enter your initials to save your score.

The leaderboard keeps the top 5 scores, showing the top 3 during gameplay.

๐Ÿ“œ License

This project is open-source and free to use for educational or personal purposes.

๐Ÿ’ก Future Improvements (Ideas)

Add sound effects and background music

Include difficulty levels or speed progression

Display full leaderboard in a separate screen

Add customizable themes or snake colors

About

Pygame Snake game! Local manageable leaderboard, easily built on, simple

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages