Skip to main content

A terminal-based snake game with levels, power-ups, and high score tracking.

Project description

๐Ÿ SnakeByte - Terminal Snake Game

A feature-rich, interactive Snake game playable entirely in your terminal! Built with Python and the curses module, this game supports color display, multiple levels, power-ups, score tracking, key remapping, and pause functionality.


๐ŸŽฎ Features

  • ๐ŸŸฉ Colorful terminal graphics

  • ๐Ÿง  Multiple difficulty levels: Easy, Medium, Hard

  • โšก Power-ups with dynamic effects:

    • โ–ฒ Speed Up
    • โ–ผ Slow Down
    • ร— Shrink Snake
    • + Bonus Score
    • - Score Penalty
  • โŒจ๏ธ Customizable controls via key_config.json

  • โธ๏ธ Pause menu with instructions

  • ๐Ÿ’พ High score tracking per difficulty level

  • ๐Ÿ“œ Gameplay logs stored in JSON format

  • ๐Ÿ” Seamless restart from game over


๐Ÿš€ Getting Started

๐Ÿ”ง Prerequisites

  • Python 3.7 or higher
  • Compatible with Linux, macOS, and Windows (Windows installs windows-curses)

๐Ÿ“ฆ Installation

Install via pip:

pip install snakebyte

Or clone manually and install dependencies:

git clone https://github.com/HattoriMan/SnakeByte
cd SnakeByte
pip install -r requirements.txt

โ–ถ๏ธ Run the Game

From source:

python game.py

Or if installed via pip (from anywhere):

snake

Optional debug mode:

python game.py --debug

๐ŸŽฎ Controls

Action Default Keys
Move Up W / โ†‘
Move Down S / โ†“
Move Left A / โ†
Move Right D / โ†’
Pause / Resume P
Instructions I
Quit Q / Esc

๐Ÿ”ง Customize Keys

You can customize key bindings in the key_config.json file.


๐Ÿ—‚๏ธ Project Structure

snakebyte/
โ”œโ”€โ”€ snakebyte/              # Main game package
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ game.py             # Main game logic and entry point
โ”‚   โ”œโ”€โ”€ utils.py            # Game utilities
โ”‚   โ”œโ”€โ”€ config.py           # Game configuration
โ”‚   โ””โ”€โ”€ key_config.py       # Key handling logic
โ”œโ”€โ”€ key_config.json         # User-customizable key bindings
โ”œโ”€โ”€ logs/                   # Game logs and high scores (auto-created on run)
โ”œโ”€โ”€ pyproject.toml          # Modern Python packaging configuration
โ”œโ”€โ”€ MANIFEST.in             # Package data inclusion rules
โ”œโ”€โ”€ README.md               # Project documentation
โ””โ”€โ”€ LICENSE                 # MIT License file


๐Ÿงช Levels & Gameplay

  • Levels: Easy, Medium, Hard
  • Snake wraps around screen edges
  • Avoid biting your own body
  • Collect food (โ—‰) to grow and score
  • Power-ups spawn periodically

๐Ÿ“ Logging

  • Game history: logs/app.jsonl
  • High scores: logs/score.json
  • Error traces: logs/error_traceback.log

๐Ÿ”œ Upcoming Features

โœจ Planned enhancements:

  • ๐Ÿ”Š Sound effects
  • ๐Ÿ’พ Save/Load game state
  • ๐Ÿงฉ Challenges & achievements
  • ๐ŸŒ Online high score leaderboard

๐Ÿ“„ License

MIT License โ€“ free to use, modify, and distribute.


๐Ÿ™Œ Acknowledgements

Thanks to the Python community and open-source contributors for making this possible. Inspired by the classic Snake game we all loved.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snakebyte-1.0.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snakebyte-1.0.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file snakebyte-1.0.0.tar.gz.

File metadata

  • Download URL: snakebyte-1.0.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for snakebyte-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d7e770f2397519c995654c6a83890685b2f925eec14d89d520e377f25691e6f0
MD5 37c87b8f67e5d45835b0cb0939cb432a
BLAKE2b-256 7c8b383441643a02fde1218e5f57a5cb3b9b1dae2152f7f9d1b486bd6f41df82

See more details on using hashes here.

File details

Details for the file snakebyte-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: snakebyte-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for snakebyte-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5cd60f5e8350bb0da838e19a61cf404ea218821f56aa508510c3ea41cbb8d5ef
MD5 f1177d5e901ecafd5e0f454cc83acea7
BLAKE2b-256 e6302ce86798209abc41a246662eedebface7b6599b2d616b7cde51f08b71666

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page