Computer Lab Project

Computer Lab Project

The Suspiciously Emotional Space Pet

Keep an alien pet fed, rested, and reasonably trusting. It remains suspicious of the snack button.

  • Variables
  • State
  • Events
  • Conditions
  • Timers
  • Messages

Project brief

What students build

  • At least two changing needs
  • Actions that affect those needs
  • Visible mood or state
  • Time-based change
  • A recovery path
  • A reset and demonstration state

What students learn

  • Variables as memory
  • Initialization
  • Connected state changes
  • Threshold decisions
  • Balancing systems
  • Explaining emergent behaviour

What students need

  • Browser
  • Scratch editor
  • Keyboard or mouse
  • Student-created pet design

Students choose the pet's needs, the scale for each value, and the rules connecting them. Different models are welcome if their behaviour can be explained.

Computer Lab brief

Choose the pet's needs and the rules connecting them. The finished version must show how its current values produce its visible mood.

Required systems

What must exist.

  • At least two changing needs
  • Actions that affect those needs
  • Visible mood or state
  • Time-based change
  • A recovery path
  • A reset and demonstration state

Suggested build order

One useful route through the problem.

  1. Choose the needs Define two or three values the pet must remember.
  2. Create care actions Connect buttons or keys to feeding, resting, or playing.
  3. Let time matter Change at least one need at a controlled interval.
  4. Show the state Use expressions, messages, or animation to show when a value crosses a threshold.
  5. Test difficult combinations Try low energy, high hunger, and competing care actions.

Checkpoints

  1. 1Each variable has a clear name and starting value.
  2. 2Each action changes the intended values once.
  3. 3The change is slow enough to observe and test.
  4. 4Someone watching can tell why the pet looks different.
  5. 5The pet always has a recoverable state.

Challenge cards

Choose one, combine compatible cards, or propose an equivalent challenge.

CHALLENGE 1

Add a trust variable.

CHALLENGE 2

Make actions have trade-offs.

CHALLENGE 3

Create a day/night state.

CHALLENGE 4

Add a short care history.

Test questions

  • Do all needs reset?
  • Can one click update twice?
  • Can values leave the intended range?
  • Does the visible mood match the values?
  • Can the pet recover from its lowest state?

Common mistakes

  • Needs are never initialized.
  • Two scripts fight over the same state.
  • Values move too quickly to understand.
  • The pet becomes permanently stuck.

Extension ideas

  • Add a trust variable.
  • Make actions have trade-offs.
  • Create a day/night state.
  • Add a short care history.

Challenge levels

LEVEL 1

Builder

Keep two needs inside sensible boundaries.

LEVEL 2

Inventor

Make care actions affect several needs differently.

LEVEL 3

Boss Level

Create named pet states from combinations of values.

What to demonstrate

  • Known starting values
  • Two care actions
  • Time-based change
  • A visible state
  • A recovery path
  • One explained rule trade-off