TV on a Rolling Cart

How to Make a Virtual Pet in Scratch

From Scratch

How to Make a Virtual Pet in Scratch
7 min2nd3rd4th5thTechnology
access

Summary

A project tutorial building a virtual pet you feed and play with by clicking buttons, using variables to track hunger and happiness that change over time. A friendly first project that uses variables for a real purpose.

Viewer safety

All ages
Common Sense Media — not yet ratedIMDb Parents Guide — not yet rated

Our rating is a quick teacher-to-teacher guide — preview before showing.

Teaching resources

Discussion questions

Discussion

This video builds a virtual pet whose hunger and happiness change as you play.

  1. What variable does the pet have, and what makes it go up or down?
  2. What button blocks let the player take care of the pet?
  3. What other variable could you add to your pet (like energy or cleanliness)?

Quick work-a-long

Words to know: variable, value, button.

Try it: Create one variable for your pet and add a button that increases it by 1 when clicked.

How to Make a Virtual Pet in Scratch — TV on a Rolling Cart