A pixel-art desktop pet built with Python + Tkinter. Features a mini floating character on the desktop and a full home-garden mode with four explorable scenes.
Mini mode: Transparent floating pixel character with walk animation (128px, white oval background)
Garden mode: 850×560 window with four scenes connected by doorways
Care system: Hunger / Mood / Cleanliness / Health with decay and recovery
Controls: Arrow keys or WASD to walk, E to interact with doorways, T for debug mode
Right-click menu: Feed 🍔 / Bathe 🛁 / Play 🎮 / Medicine 💊
scripts/desktop_pet.py to target directoryassets/ into an assets/ subdirectory next to desktop_pet.pybash
cd <target-dir>
pip install Pillow
TK_SILENCE_DEPRECATION=1 python3 desktop_pet.py
text
target-dir/
├── desktop_pet.py
└── assets/
├── room_bg.png # Indoor scene (1F)
├── upstairs_bg.png # Upstairs scene (2F, mirrored + warm)
├── exterior_bg.png # Outdoor scene
├── forest_bg.png # Forest scene
├── walk_right.gif # Character walk right (8 frames, 32×32)
└── walk_left.gif # Character walk left (8 frames, 32×32)
overrideredirect(True) + systemTransparent for floating mini windowTK_SILENCE_DEPRECATION=1 to suppress Tk warningsFromTriggerToIndoor 1FWalk to staircase (top-left) + EUpstairs 2FIndoor 1FWalk to carpet (bottom-right) + EOutdoorUpstairs 2FWalk to staircase (top-right) + EIndoor 1FOutdoorWalk to left edge + EForestOutdoorWalk to door + EIndoor 1FForestWalk to right edge + EOutdoor
assets/ (850×526px recommended)frame%600 in code (higher = slower decay)_INDOOR_WALLS / _OUTDOOR_WALLS arraysW_M, H_M for mini mode, W_G, H_G for garden mode