A terminal-based virtual pet game with ASCII art, stats, and random events.
Project description
๐พ pocket-creatures
A cozy little virtual pet game that lives in your terminal. Adopt a creature, keep it happy, and watch it grow โ all from your command line!
/\_/\ (\(\
( o.o ) ( -.-)
> ^ < o_(")(")
Your new best friend is waiting...
๐ What Is pocket-creatures?
pocket-creatures is a terminal-based virtual pet game written in Python. You adopt a creature, give it a name, and take care of it by feeding it, playing with it, and putting it to sleep. Your pet has real stats โ hunger, happiness, health, and energy โ that change over time. Neglect your creature and it'll get grumpy; shower it with attention and it'll thrive!
Random events keep things interesting: your pet might find a treasure, catch a cold, or learn a new trick when you least expect it.
Perfect for:
- Python beginners who want a fun first project to install and run
- Anyone who misses the Tamagotchi era
- People who spend a lot of time in the terminal and want some company
โจ Features
- ๐ฑ Multiple creature types โ each with unique ASCII art and personality
- ๐ Real-time stats โ track Hunger, Happiness, Health, and Energy at a glance
- ๐ฒ Random events โ surprises that keep every session fresh
- ๐พ Auto-save โ your pet's progress is saved automatically when you quit
- ๐จ ASCII art animations โ your creature reacts visually to its mood
- ๐ Milestones & aging โ watch your creature grow through life stages
- ๐ฉบ Status effects โ pets can get sick, tired, or extra-hyper
- ๐ Colourful terminal UI โ works on Windows, macOS, and Linux
๐ฅ๏ธ Before You Begin: What You'll Need
Don't worry if you've never run a Python program before โ this section walks you through everything step by step.
1. Check if Python is Installed
Open your terminal (instructions below) and type:
python --version
or, on some systems:
python3 --version
You should see something like Python 3.8.0 or higher. pocket-creatures requires Python 3.8 or newer.
How to open a terminal:
- Windows: Press
Win + R, typecmd, press Enter. Or search for "Command Prompt" or "Windows Terminal" in the Start Menu.- macOS: Press
Cmd + Space, type "Terminal", press Enter.- Linux: Press
Ctrl + Alt + T, or search for "Terminal" in your app launcher.
2. Install Python (if needed)
If you got an error like 'python' is not recognized or your version is below 3.8:
- Visit https://www.python.org/downloads/
- Click the big yellow "Download Python" button
- Run the installer
- โ ๏ธ Windows users: On the first screen of the installer, make sure to tick the box that says "Add Python to PATH" before clicking Install!
- Close and reopen your terminal, then check
python --versionagain
๐ฆ Installation
Once Python is ready, installing pocket-creatures is just one command!
pip install pocket-creatures
What is
pip? It's Python's package manager โ a tool that downloads and installs Python programs from the internet automatically. It comes bundled with Python.
If you see a "permission denied" error, try:
pip install --user pocket-creatures
Upgrading to the Latest Version
Already have it installed and want the newest version?
pip install --upgrade pocket-creatures
Verifying the Installation
After installing, confirm it worked by checking the version:
pocket-creatures --version
You should see a version number printed. If you do โ you're all set! ๐
๐ Running the Game
Starting pocket-creatures is simple. In your terminal, type:
pocket-creatures
The game will launch directly in your terminal window. On your very first run, you'll be greeted with a welcome screen and asked to:
- Choose your creature type โ pick the one that calls to you!
- Give your creature a name โ make it personal ๐พ
- Watch your adventure begin
Tip: Make your terminal window a bit wider and taller for the best experience. Aim for at least 80 columns ร 24 rows.
Alternative Launch Commands
# You can also run it as a Python module if the command isn't found:
python -m pocket_creatures
# Or with python3 specifically:
python3 -m pocket_creatures
๐ฎ How to Play
The Main Screen
When you launch the game, you'll see your creature displayed with ASCII art in the centre of the screen. Around it you'll find:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐พ Biscuit | Age: 3 days โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ /\_/\ โ
โ ( ^.^ ) "I'm hungry!" โ
โ > ~ < โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โค Health โโโโโโโโโโ 80% โ
โ ๐ Happiness โโโโโโโโโโ 60% โ
โ ๐ Hunger โโโโโโโโโโ 40% โ
โ โก Energy โโโโโโโโโโ 100% โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ [F]eed [P]lay [S]leep [Q]uit โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Controls & Commands
Press a key at any time โ no need to press Enter after single-letter commands!
| Key | Action | Effect on your pet |
|---|---|---|
F |
Feed | Reduces hunger, slightly increases happiness |
P |
Play | Boosts happiness and energy (costs some hunger) |
S |
Sleep | Restores energy and health (pet is unavailable while sleeping) |
M |
Medicine | Cures sickness (only appears when your pet is ill) |
C |
Clean | Cleans up your pet's space, boosts happiness |
I |
Info | Shows detailed stats and your creature's history |
H |
Help | Displays an in-game help screen |
Q |
Quit | Saves your game and exits |
Keyboard shortcut tip: You can also use the arrow keys to navigate menus and press Enter to confirm selections.
๐ Understanding Your Pet's Stats
Your creature has four core stats. They all change over time, so check in regularly!
โค๏ธ Health (0โ100)
Your pet's overall wellbeing. Health drops slowly when your pet is hungry or exhausted for too long. Give medicine when sick.
- 80โ100: Thriving
- 50โ79: Doing okay
- 20โ49: Needs attention
- 0โ19: Critical โ act fast!
๐ Happiness (0โ100)
How cheerful your creature is. It drops when your pet is ignored, hungry, or sick.
- Play with your pet and keep it fed to maintain high happiness.
- A very unhappy pet may refuse to eat or play.
๐ Hunger (0โ100)
How hungry your pet is โ higher is hungrier. Feed your pet before this gets too high!
- Hunger rises steadily over time.
- At 80+, your pet starts losing health.
- At 100, your pet is starving โ health drops quickly.
โก Energy (0โ100)
How energetic your creature is. Playing costs energy; sleeping restores it.
- At low energy, your pet becomes sluggish and won't want to play.
- At 0, your pet falls asleep automatically.
๐ฒ Random Events
Life with your creature is full of surprises! Random events can happen any time you interact with your pet. Some are good, some are bad โ all are part of the adventure.
Examples of events you might encounter:
| Event | Description |
|---|---|
| ๐ Found a treasure! | Your pet discovered a shiny object โ happiness boost! |
| ๐คง Caught a cold | Your pet is sick and needs medicine |
| โจ Learned a trick! | Your creature discovered a new skill |
| โ๏ธ Stormy night | Bad weather made your pet anxious โ happiness drops |
| ๐ Extra energetic | Your pet is buzzing with energy today |
| ๐ค Feeling extra sleepy | Your pet needs more rest than usual |
Events are displayed as a pop-up message on screen. Read them carefully โ some require action from you!
๐ฑ Creature Life Stages
Your creature grows and changes over time. Each life stage brings new ASCII art and behaviors:
| Stage | Age | Description |
|---|---|---|
| ๐ฅ Egg | Day 0 | Your adventure begins! |
| ๐ฃ Baby | Days 1โ2 | Tiny and needy โ check in often |
| ๐พ Young | Days 3โ6 | Playful and curious |
| ๐ Adult | Days 7โ13 | Well-rounded and independent |
| ๐ Elder | Day 14+ | Wise and a little slower-paced |
๐พ Saving & Loading
pocket-creatures automatically saves your progress whenever you quit with Q. The next time you launch the game, your pet will be right where you left it.
Where is my save file?
| Operating System | Save file location |
|---|---|
| Windows | C:\Users\YourName\AppData\Local\pocket_creatures\ |
| macOS | ~/Library/Application Support/pocket_creatures/ |
| Linux | ~/.local/share/pocket_creatures/ |
Note:
~means your home folder.YourNameis your Windows username.
Backing Up Your Pet
Want to keep your save safe? Copy the save.json file from the folder above to a safe place. To restore it, just copy it back.
๐ ๏ธ Troubleshooting
"pocket-creatures: command not found"
This usually means Python's script folder isn't in your system's PATH. Try these alternatives:
python -m pocket_creatures
# or
python3 -m pocket_creatures
Permanent fix on Windows:
- Search for "Environment Variables" in the Start Menu
- Click "Edit the system environment variables"
- Click "Environment Variablesโฆ"
- Under "User variables", find
Pathand click Edit - Add
%APPDATA%\Python\Python3x\Scripts(replace3xwith your Python version number, e.g.312) - Restart your terminal
"pip: command not found"
Try using pip3 instead:
pip3 install pocket-creatures
Or invoke pip through Python directly:
python -m pip install pocket-creatures
# or
python3 -m pip install pocket-creatures
The ASCII art looks broken or garbled
Your terminal may not support Unicode characters fully. Try:
- Windows: Use Windows Terminal (download free from the Microsoft Store) instead of the classic Command Prompt
- All platforms: Make sure your terminal's font is set to a monospace font like
Consolas,Courier New, orFira Code - Set your terminal's encoding to UTF-8:
# Windows Command Prompt only: chcp 65001
Colors aren't showing / terminal looks plain
Some older terminals don't support colors. pocket-creatures detects this automatically and falls back to plain text. For the best experience, use:
- Windows: Windows Terminal or VS Code's integrated terminal
- macOS: The default Terminal app or iTerm2
- Linux: Any modern terminal emulator (gnome-terminal, konsole, alacritty, etc.)
My pet's stats seem wrong after reloading
If your save file gets corrupted (this is rare!), you can reset your game:
pocket-creatures --reset
โ ๏ธ Warning: This will permanently delete your current pet. Make a backup first if you want to keep your save!
The game crashes on startup
- Make sure you have Python 3.8 or newer:
python --version - Try reinstalling:
pip install --upgrade --force-reinstall pocket-creatures - Check if there's an error message โ if so, copy the full message and open an issue on GitHub (link below)
๐ Project Structure (for the curious)
If you're a developer or just want to peek under the hood:
pocket_creatures/
โโโ __init__.py # Package entry point
โโโ __main__.py # Launch point (python -m pocket_creatures)
โโโ game.py # Core game loop and logic
โโโ creature.py # Creature class, stats, and life stages
โโโ events.py # Random event system
โโโ renderer.py # ASCII art and terminal UI rendering
โโโ save.py # Save/load game state to disk
โโโ assets/
โโโ ascii_art/ # ASCII art files for each creature and mood
๐ค Contributing
Found a bug? Have an idea for a new creature type or random event? Contributions are warmly welcomed!
- Fork the repository on GitHub
- Create a feature branch:
git checkout -b my-new-feature - Make your changes and add tests if applicable
- Open a Pull Request with a clear description of what you changed
Please be kind and constructive in all interactions โ this is a friendly project!
๐ Reporting Bugs
If something goes wrong, please open a GitHub issue and include:
- Your operating system and version (e.g. Windows 11, macOS 14, Ubuntu 24.04)
- Your Python version (
python --version) - Your pocket-creatures version (
pocket-creatures --version) - The full error message or a description of what happened
- Steps to reproduce the problem
๐ License
pocket-creatures is released under the MIT License โ free to use, modify, and share. See LICENSE for full details.
๐ Acknowledgements
- Inspired by the classic Tamagotchi virtual pets of the 1990s
- ASCII art crafted with love
- Built with โค๏ธ for anyone who ever wished their terminal had a little more life in it
Made with ๐พ ย |ย Happy creature-keeping!
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
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 pocket_creatures-1.0.4.tar.gz.
File metadata
- Download URL: pocket_creatures-1.0.4.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71a64e43cfeb80da6a424e483e920af9fa4a1bd098d329d1ec487f0bfde51c40
|
|
| MD5 |
8a09b0a299977999e4a2872db0837501
|
|
| BLAKE2b-256 |
1498101a0eb2a923a4c2c3c8d15ca715a638fb4dd1c597de057118492c1001a6
|
File details
Details for the file pocket_creatures-1.0.4-py3-none-any.whl.
File metadata
- Download URL: pocket_creatures-1.0.4-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c082718e814ddb58120b176b572795045f0b94a4a0af09c806a1b8b1779c565
|
|
| MD5 |
fc8a2d4b6927a4da0701a1c22754186b
|
|
| BLAKE2b-256 |
507e02d73bf45192139087e0db0bab869a5f709e469c3132aa6992c848805599
|