🐾 Super Pets 2.0 - Advanced VS Code Extension

An advanced and fully customizable evolution of VS Code Pets! This extension adds interactive animals that can freely move anywhere on your screen, with expanded animations, physics-based behavior, and direct user control.
✨ Features
🦁 14 Different Pets
Choose from a diverse collection of animals:
- 🐱 Cat - Agile climber, loves yarn and fish
- 🐕 Dog - Loyal companion, loves balls and bones
- 🐧 Penguin - Waddles around, loves fish
- 🐴 Horse - Fast runner, loves carrots
- 🦁 Lion - King of the jungle
- 🐯 Tiger - Powerful climber
- 🐍 Snake - Slithers and climbs
- 🕷️ Spider - Wall crawler
- 🐔 Chicken - Pecks around for seeds
- 🐰 Rabbit - Hops energetically
- 🦊 Fox - Cunning and quick
- 🐻 Bear - Strong climber, loves fish
- 🦋 Butterfly - Graceful flyer
- 🐆 Cheetah - Fastest pet
🎮 Interactive Features
Pet Management
- Add Multiple Pets: Have as many pets as you want!
- Remove Pets: Remove individual pets or clear all
- Pet Stats: Monitor mood, hunger, and energy levels in real-time
Feeding System
Feed your pets with 7 different food types:
- 🐟 Fish
- 🥩 Meat
- 🦴 Bone
- 🥕 Carrot
- 🌾 Seeds
- 🥛 Milk
- 🍎 Apple
Each pet has favorite foods that boost their mood more!
Toy System
Throw toys for your pets to play with:
- ⚽ Ball
- 🏏 Stick
- 🐭 Mouse
- 🧶 Yarn
- 🪶 Feather
Pets will chase and interact with toys, boosting their mood!
Backgrounds
Change the environment with 6 different backgrounds:
- 🏢 Office
- 🌲 Forest
- 🏖️ Beach
- 🌌 Space
- 🌸 Garden
- ⬜ Transparent
🎨 Advanced Animations
Each pet features multiple animation states:
- Idle - Resting peacefully
- Walk - Casual strolling
- Run - Fast movement
- Jump - Leaping action
- Sleep - Restoring energy
- Happy - Joyful expression
- Angry - Upset mood
- Play - Playing with toys
- Eat - Consuming food
- Climb - Scaling surfaces (for climbing pets)
🎯 Smart AI Behavior
- Autonomous Movement: Pets move on their own
- Follow Cursor: Toggle cursor-following mode
- Physics Simulation: Realistic gravity and collisions
- State Machine: Complex behavior patterns
- Collision Detection: Pets interact with food and toys
- Mood System: Dynamic mood based on hunger and energy
💾 Persistent State
- Automatically saves pet positions
- Remembers mood, hunger, and energy levels
- Saves background preferences
- Restores state on VS Code restart
🚀 Getting Started
Installation
From Source:
cd vscode-pets-advanced
npm install
npm run compile
Run in Development:
- Press
F5 to open a new VS Code window with the extension loaded
- Or use the "Run Extension" debug configuration
Usage
Basic Commands
Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P) and type:
Super Pets: Show Pets Panel - Open the pets panel
Super Pets: Add Pet - Add a new pet
Super Pets: Feed Pet - Feed your pets
Super Pets: Throw Toy - Throw a toy
Super Pets: Change Background - Change the environment
Super Pets: Toggle Follow Cursor - Make pets follow your cursor
Super Pets: Remove Pet - Remove a pet
Super Pets: Reset All Pets - Clear everything
Interactions
- Click on a pet to make it jump!
- Move your mouse to see pets react
- Feed pets when their hunger is low
- Throw toys to boost their mood
- Watch the stats panel to monitor pet health
🛠️ Development
Project Structure
vscode-pets-advanced/
├── src/
│ ├── extension.ts # Main extension entry point
│ ├── petPanel.ts # Webview panel management
│ ├── stateManager.ts # State persistence
│ ├── types.ts # TypeScript type definitions
│ └── petConfigs.ts # Pet configurations
├── media/
│ ├── main.js # Webview game engine
│ └── style.css # Webview styles
├── assets/ # Future: Pet sprites and images
├── package.json # Extension manifest
└── tsconfig.json # TypeScript configuration
Building
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes
npm run watch
# Package extension
npm run package
Adding New Pets
Add the pet type to src/types.ts:
export type PetType = 'cat' | 'dog' | 'yourpet';
Add configuration to src/petConfigs.ts:
yourpet: {
type: 'yourpet',
name: 'Your Pet',
canClimb: false,
canFly: false,
speed: 2.5,
jumpHeight: 90,
favoriteFood: ['meat'],
favoriteToys: ['ball'],
size: 1.0
}
Add to webview config in media/main.js:
yourpet: {
speed: 2.5,
jumpHeight: 90,
canClimb: false,
size: 1.0,
color: '#FF5733'
}
Adding Custom Sprites
Place sprite sheets in assets/animals/{petType}/:
idle.png - Idle animation
walk.png - Walking animation
run.png - Running animation
- etc.
Update the sprite loading logic in media/main.js to use actual images instead of colored circles.
🎨 Customization
Adjusting Pet Behavior
Edit media/main.js to customize:
- Movement speed: Adjust
config.speed multipliers
- Gravity: Change gravity constant in
updatePet()
- AI behavior: Modify state machine logic
- Animation speed: Adjust
currentFrame increment
Styling
Edit media/style.css to customize:
- Stats panel appearance
- UI colors and themes
- Animations and transitions
🐛 Known Issues
- Sprite images not yet implemented (using colored circles)
- Climbing behavior needs refinement
- Performance may degrade with 20+ pets
🗺️ Roadmap
- [ ] Add actual sprite animations
- [ ] Implement climbing on code editor
- [ ] Add sound effects
- [ ] Pet customization (colors, accessories)
- [ ] Achievement system
- [ ] Multiplayer (share pets with team)
- [ ] Pet leveling and evolution
- [ ] More backgrounds and environments
- [ ] Weather effects
- [ ] Day/night cycle
📝 License
MIT License - Feel free to modify and distribute!
🤝 Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
💖 Credits
Created with ❤️ for the VS Code community.
Inspired by the original VS Code Pets extension.
Enjoy your new virtual companions! 🐾
If you encounter any issues or have suggestions, please open an issue on GitHub.