Challenges we ran into
Accomplishments that we're proud of
Inspiration
The inspiration for this desktop pet came from three simple but warm ideas: Many people feel lonely or tired when working/studying in front of a computer for a long time. A small, lively companion on the screen can bring comfort and joy. I wanted to create a cute, useful, and non‑intrusive helper that integrates naturally into daily computer use.The cross‑time‑space story between Xiaojin and Xiaobai also gave me a gentle theme: small kindnesses and silent companionship across worlds.This project is not just a tool — it is a friendly digital companion that helps you while keeping you company.
What we learned
Through developing this desktop pet, I gained knowledge and experience in many fields: (1) Programming & Software Development
GUI development using frameworks such as Electron / PyQt / Tkinter
System API calls: file operations, tray icons, window behavior
Frontend and backend logic separation: UI rendering, data processing, background tasks
(2) API Integration & Data Processing
Calling public weather APIs to obtain real‑time temperature, weather conditions, humidity, wind speed
JSON data parsing and error handling for network requests
Local caching mechanism to reduce repeated requests
(3) File Organization Algorithm
Design rules for automatic file classification by extension, date, size
Folder structure generation: Documents/Images/Videos/Audios/Zip
Safety mechanisms: avoid overwriting, backup prompts, error recovery
(4) Interactive AI & Animation
Simple pet state machine: idle, sleeping, happy, working, reacting
Mouse follow, click reaction, drag interaction
Smooth frame animation and UI feedback
(5) Project Management
Requirement splitting: core functions → optional functions → polishing
Version iteration: test → fix → optimize → repeat
User experience design: simple, intuitive, non‑disturbing
How we built it
The entire project was built in four clear stages: Stage 1: Requirement Design I defined three core functions:
Desktop Pet Interaction: idle animation, click reaction, status changes
Real‑time Weather: display current weather, temperature, forecast
File Organizer: one‑click automatic classification of messy folders
Stage 2: Environment & Tech Stack I chose a lightweight, easy‑to‑maintain stack:
Language: Python
GUI: PyQt5 / Tkinter
Weather API: Open‑Weather‑Map / 和风天气
File processing: OS, Shutil, Pathlib
Animation: frame playback, timer control
Stage 3: Core Implementation (1) Pet UI & Interaction I created a transparent window without borders. The pet’s behavior is controlled by a state machine: S={idle, happy, sleep, work, surprise} Each state corresponds to different images and movements. (2) Weather Module Send HTTP request → get JSON → parse display: W=(Ttemp, Ccity, Sstatus, Hhumidity) Update every 30 minutes to keep data fresh. (3) File Organizer Scan the target folder → judge file type → move to corresponding folder: F(x)→Di where x = file, Di = target directory. Stage 4: Testing & Optimization
Test interaction fluency
Fix network error exceptions
Optimize CPU and memory usage
Improve visual effects and feedback
- Challenges I Faced & How I Solved Them Challenge 1: Transparent & Click‑Through Pet Window The pet window blocked other software and affected use. Solution: Used system layer properties to enable mouse penetration so the pet floats on the screen without interfering with operations. Challenge 2: Unstable Weather API Requests Network failure or slow response caused the pet to freeze. Solution: Added timeout control + local cache + error retry to ensure stability even offline. Challenge 3: File Organization Risk Wrong path or duplicate files could cause loss. Solution: Added backup before sorting, confirmation prompts, and skip rules to ensure absolute security. Challenge 4: Making Pet Actions Natural The pet’s movements were stiff and not lively enough. Solution: Used a timer to switch frames smoothly and added random small actions to simulate real creature behavior.
Final Project Summary This desktop pet is not just a programming project — it is a warm little companion that:
Greets you with real‑time weather Plays with you through interactions Helps you organize messy folders automatically
Through this project, I learned GUI programming, API integration, file algorithms, interaction design, and truly experienced the process from idea → design → code → completion. In the future, I plan to add more functions such as:
Schedule reminder
To‑do list
More pet appearances
Voice interaction
Thank you for reading my story!
Log in or sign up for Devpost to join the conversation.