Skip to main content

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, type cmd, 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:

  1. Visit https://www.python.org/downloads/
  2. Click the big yellow "Download Python" button
  3. Run the installer
  4. โš ๏ธ Windows users: On the first screen of the installer, make sure to tick the box that says "Add Python to PATH" before clicking Install!
  5. Close and reopen your terminal, then check python --version again

๐Ÿ“ฆ 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:

  1. Choose your creature type โ€” pick the one that calls to you!
  2. Give your creature a name โ€” make it personal ๐Ÿพ
  3. 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. YourName is 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:

  1. Search for "Environment Variables" in the Start Menu
  2. Click "Edit the system environment variables"
  3. Click "Environment Variablesโ€ฆ"
  4. Under "User variables", find Path and click Edit
  5. Add %APPDATA%\Python\Python3x\Scripts (replace 3x with your Python version number, e.g. 312)
  6. 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:

  1. Windows: Use Windows Terminal (download free from the Microsoft Store) instead of the classic Command Prompt
  2. All platforms: Make sure your terminal's font is set to a monospace font like Consolas, Courier New, or Fira Code
  3. 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

  1. Make sure you have Python 3.8 or newer: python --version
  2. Try reinstalling: pip install --upgrade --force-reinstall pocket-creatures
  3. 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!

  1. Fork the repository on GitHub
  2. Create a feature branch: git checkout -b my-new-feature
  3. Make your changes and add tests if applicable
  4. 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

pocket_creatures-1.0.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

pocket_creatures-1.0.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pocket_creatures-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f13dce098c0385f22064f1fd6ad7d8d70b75bfb9d393db82822d56fccf2e5085
MD5 13114213a4ea6be3836491c77c4967c4
BLAKE2b-256 ecd22f4fbcd59fa715d2cc3b36d86cb31f543d3961bf8bb1dafb4515a640ac1c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pocket_creatures-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac6fa16a6d0fcf6a177fae51537cc3c8a5499d703b7e7831fcab464ca3a50e31
MD5 19dc73c6230bdaa20133cb121f63fde3
BLAKE2b-256 ed92b2358fd832450968bcfa3047dc83d38b68c8a0ad7538fd65c2cdcd0a7d28

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