Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game

A classic Snake game built from scratch in Python with pygame — no external game engine, just core programming logic: game loops, collision detection, and state management.

Problem

Wanted hands-on practice with real-time game loops, keyboard input handling, and collision detection — the fundamentals behind most 2D games.

Features

  • Smooth grid-based movement with keyboard controls
  • Progressive difficulty — speed increases as your score grows
  • Pause / resume with P
  • Game-over detection (wall and self collision) with instant restart via R
  • Clean, minimal visual style

Project structure

snake-game/
├── snake_game.py     # the full game
├── requirements.txt
└── README.md

Setup

python3 -m venv venv
source venv/bin/activate      # on Windows: venv\Scripts\activate
pip install -r requirements.txt

Usage

python snake_game.py

Controls

Key Action
Arrow keys Move
P Pause / resume
R Restart (after game over)
Esc Quit

Tech stack

Python, pygame

Author

Rushikesh Pimple — LinkedIn

About

A classic Snake Game built from scratch in Python using Pygame, featuring smooth gameplay, score tracking, progressive difficulty, and collision detection. python, pygame, snake-game, game-development, 2d-game, arcade-game, beginner-project, python-game.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages