← Weird & Experimental
🐾
Virtual Pet
Raise a digital pet that gets hungry, bored, and sleepy even when you close the tab.
🟡 MediumDifficulty
3-4 hoursTime
Python, JavaScriptLanguages
What you're building
A tamagotchi-style virtual pet with hunger, happiness, and energy stats that decay over time -- even while you're gone, because it calculates elapsed real time when you reopen the page. Feed it, play with it, put it to bed, or watch it get grumpy if you forget.
What you'll unlock 🔓
You'll need
- Basic JavaScript
- A code editor
- A browser
🗺️ Build roadmap
01 Setup
→
02 Build the pet display
→
03 Add stat decay over time
→
04 Add feed/play/sleep actions
→
05 Persist state across visits
→
06 Add mood faces and a game-over state
🔒
Log in to start building
Your first project is free -- create an account to unlock it.
Log in Sign up free