How axoleov/desktop-pets works
Desktop Pet is a small Tkinter desktop companion. The workflow starts in main.py, creates DesktopPet, loads pet animation frames, and runs its event-driven behavior: mouse interactions and timers update movement, sleep, energy, and happiness, while messages appear in a speech bubble. The README also documents pet/size switching, feeding, and stats. Edges reflect calls shown in excerpts or documented behavior; omitted portions of pet_app.py limit detail about some transitions and event handlers.
Main entry points: pet_app.py Pet controller · messages.py Message pools · sprite_loader.py Sprite frame loader · speech_bubble.py Speech bubble window
Components 14
Desktop runtime
- Application entry
main.py
Pet presentation
- Pet window
pet_app.py - Animation loop
pet_app.py - Sprite frame loader
sprite_loader.py - Speech bubble window
speech_bubble.py
Behavior and interactions
- Pet controller
pet_app.py - Mouse interactions
pet_app.py - Behavior and stats
pet_app.py - Hop and chase
pet_app.py - Pet and size switching
pet_app.py - Feed and stats
pet_app.py
Pet content
- Tiny Pets sprites
assets/Tiny Pets - Message pools
messages.py
Other components
- Desktop user
Connections 21
- Desktop user → Application entry: starts app
README.md - Application entry → Pet controller: creates pet
main.py - Pet controller → Pet window: sets up
pet_app.py - Pet controller → Sprite frame loader: loads frames
pet_app.py - Sprite frame loader → Tiny Pets sprites: reads sheets
sprite_loader.py - Pet controller → Speech bubble window: creates bubble
pet_app.py - Desktop user → Mouse interactions: clicks or drags
README.md - Mouse interactions → Behavior and stats: updates state
pet_app.py - Behavior and stats → Hop and chase: starts movement
pet_app.py - Behavior and stats → Message pools: selects chatter
pet_app.py - Mouse interactions → Message pools: selects reactions
pet_app.py - Hop and chase → Message pools: selects reactions
pet_app.py - Mouse interactions → Pet and size switching: switches pet or size
pet_app.py - Mouse interactions → Feed and stats: feeds or requests stats
pet_app.py - Feed and stats → Message pools: selects feed text
pet_app.py - Pet and size switching → Sprite frame loader: reloads frames
pet_app.py - Animation loop → Sprite frame loader: gets frames
pet_app.py - Pet controller → Animation loop: schedules frames
pet_app.py - Pet controller → Behavior and stats: schedules ticks
pet_app.py - Pet controller → Speech bubble window: shows text
pet_app.py - Message pools → Speech bubble window: provides text