← Back CP 🎮 Pixel Pet
🎮 Game Dev Lab — Welcome to the final boss of the Creator Path! You've collected every power-up: variables, math, conditionals, strings, arrays, loops, functions, and the DOM. Now combine them all to build a living Pixel Pet that eats, plays, sleeps, and reacts to your care. Real game, real code, made by YOU.

🏆 Your First Project — Combine Every Tool

In Chef's Checklist you built a list app with arrays and CRUD. Now go bigger: a whole mini-game! Your pet is an object full of variables. Buttons call functions that change its stats with math. Conditionals decide its mood. An array collects treats, and a loop shows them all. DOM events make it tap-able, and DOM style makes it react. This is graduation — every tool, one game!

// your pet is a bundle of variables:
var pet = { name: "Pixel", fullness: 40, happiness: 60 };
function feed() { pet.fullness += 25; } // math + function
if (pet.fullness > 70) { mood = "Happy!"; } // conditional
🎯 Missions Name your pet! Feed your pet a treat! Finish all 5 challenges!
🎮 pixel-pet.js — Live Code
1// your pet = an object full of variables
2var pet = {
3  name: "Pixel",
4  fullness: 40,
5  happiness: 60,
6  energy: 70
7};
8 
9// REUSABLE FUNCTIONS + MATH
10function feed() { pet.fullness += 25; }
11function play() { pet.happiness += 25; }
12function rest() { pet.energy += 30; }
13 
14// CONDITIONAL — decides the mood
15if (all > 70) mood = "Okay";
16 
17// ARRAY + LOOP — show every treat
18var treats = ["🍎","🎾","🍪"];
19for (var i = 0; i < treats.length; i++) {
20  show(treats[i]); // render treat
21}
✨ Live Game — tap to play!
🐱
Pixel
Okay 🙂
🍎Fullness
40
🎾Happiness
60
Energy
70

🎒 Treats (3)

📜 Action Log

🎯 Game Dev Challenges

1
✏️ Name your pet: Type a name and press Set — you used variables + strings!
var
2
🍎 Feed it: Tap Feed — a function runs and math raises fullness. Watch the code update!
fn
3
😄 Make it Happy: Use all 3 buttons to get every stat above 60 — that's a conditional!
if
4
🎒 Collect 5 Treats: Feed your pet 5 times to fill the array — a loop renders them!
array
5
🏆 MAX LEVEL: Get ALL stats above 70 at once to graduate!
capstone
🌟 Game Dev Progress0%

🎮 Welcome to Game Dev Lab!

This is the Creator Path capstone — your graduation project! Combine every coding tool you've learned to build a living Pixel Pet game. Feed it, play with it, and keep it happy!

✏️Name your pet — uses variables & strings
🍎Feed / Play / Rest — calls functions + does math
😄Conditionals decide your pet's mood
🎒Arrays + loops collect and show your treats
🏆Reach MAX LEVEL to graduate the Creator Path!