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 from GitHub and install dependencies:
GitHub Repository: https://github.com/HattoriMan/SnakeByte
Note: Follow the instructions in the repository README.
Usage
- Start the game(default)
snake
or
snake play
- Debug mode
snake play --debug
- View statistics
snake stats
- Reset all data
snake reset
๐ฎ Controls
| Action | Default Keys |
|---|---|
| Move Up | W / โ |
| Move Down | S / โ |
| Move Left | A / โ |
| Move Right | D / โ |
| Pause / Resume | P |
| Instructions | I |
| Quit | Q / Esc |
๐๏ธ 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 and Data Storage
Data is stored in your system's user data directory (via appdirs), depending on your OS:
- Linux:
~/.local/share/snakebyte/ - Windows:
%LOCALAPPDATA%\snakebyte\ - macOS:
~/Library/Application Support/snakebyte/
These are the specific logging files stored:
- Game history:
logs/app.jsonl - High scores:
logs/score.json - Error traces / Debug logs:
logs/error_traceback.log - Key bindings:
key_config.json
Example:
{
"left": ["a", "left"],
"right": ["d", "right"]
}
๐ 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.1.0.tar.gz.
File metadata
- Download URL: snakebyte-1.1.0.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fe97a38e18f1ab93e0a5a0c67936ba32e5ba4d2035b4cdb7121fe8f84a40ba5
|
|
| MD5 |
b8f98d28e67cfa861ddc922510d65196
|
|
| BLAKE2b-256 |
3362e01a6226099d836602f842ff32846e7a50c6c36c853bf182205db615858a
|
File details
Details for the file snakebyte-1.1.0-py3-none-any.whl.
File metadata
- Download URL: snakebyte-1.1.0-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b844edcca3b33588101aad49640133231fc8eb1dbd5d99b7c756ab3abc8920b
|
|
| MD5 |
e30adf8815e7b5daefb109f4639cbac7
|
|
| BLAKE2b-256 |
8efb77ce6fe916d35abd686032d6d63f5f4e9053285f9279099f7b9a9f6db1eb
|