Skip to content

rmottanet/snake-game-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game 2D (Python)

Welcome to Snake Game 2D in Python! This is a classic arcade-style game where you control a snake, guiding it to eat food and grow while avoiding collisions with walls and its own tail. This project utilizes Python and the Pygame library for graphics rendering and user input handling.

Requirements

To compile and run Snake Game 2D in Python, you need the following:

  • Python 3.x: Ensure you have a compatible version of Python installed.
  • Pygame: A cross-platform set of Python modules designed for writing video games. It handles graphical rendering, keyboard input, and window events.

Dependencies

Snake Game 2D depends on the following Python libraries:

  • pygame
  • random (Standard Python library for random number generation)
  • sys (Standard Python library for system-specific parameters and functions)

Usage

To run Snake Game 2D in Python, follow these steps:

  1. Install Dependencies: If you don't have Pygame installed, open your terminal or command prompt and run:

    pip install pygame
  2. Run the Game: Navigate to the project's root directory and execute the main game file:

    python snake_game.py

Enjoy playing Snake Game 2D!


Other Versions

This Snake Game 2D project is part of a series of implementations in different programming languages. Explore other versions:

  • C++ Version: Find the original C++ implementation using SFML here.
  • JavaScript Version: Play the web-browser version here, with its source code available here.

Old School Gaming Hub

Snake Game 2D is part of the Old School Gaming Hub organization on GitHub. Old School Gaming Hub is dedicated to developing 2D games in various programming languages, providing nostalgic gaming experiences for enthusiasts and developers alike. Explore more projects and games from Old School Gaming Hub.


Thank you for choosing Snake Game 2D! If you have any questions, issues, or suggestions, please don't hesitate to reach out. Happy gaming! 🐍🎮



Static Badge Static Badge Static Badge Static Badge

About

Snake Game 2D: Classic arcade fun! Control the snake, eat, grow, and avoid collisions. Python PyGame implementation.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages