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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7e770f2397519c995654c6a83890685b2f925eec14d89d520e377f25691e6f0
|
|
| MD5 |
37c87b8f67e5d45835b0cb0939cb432a
|
|
| BLAKE2b-256 |
7c8b383441643a02fde1218e5f57a5cb3b9b1dae2152f7f9d1b486bd6f41df82
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cd60f5e8350bb0da838e19a61cf404ea218821f56aa508510c3ea41cbb8d5ef
|
|
| MD5 |
f1177d5e901ecafd5e0f454cc83acea7
|
|
| BLAKE2b-256 |
e6302ce86798209abc41a246662eedebface7b6599b2d616b7cde51f08b71666
|