In this codelab, you'll learn how to make a pictionary-like game.

What you'll learn

Open the starter project and click Remix.

First, let's program the pencil to draw.

Challenges

  1. Program the pencil to follow the mousepointer.
  2. Make the pencil draw.
  3. Clear the canvas when the green flag is clicked.

You may have noticed that the pencil draws whenever it moves. Let's make the game more user-friendly by only drawing when the mouse is held down.

Challenges

  1. If the mouse button is pressed, make the pencil draw.
  2. If the mouse button is not pressed, make the pencil stop drawing.

Now, we want to ask Player 1 what she will draw. We are going to use a variable to store the correct answer.

Challenges

  1. When the green flag is clicked, make the monkey ask "What will you draw?"

  2. Create a variable called Right Answer.
  3. Save the user's answer using the Right Answer variable.
  4. Make the monkey send a confirmation message.

We want Player 2 to guess what Player 1 drew. If Player 2 guesses correctly, show a victory message!

Challenges

  1. When the monkey is clicked, make it ask "What do you think the drawing is?"
  2. If the answer is correct, show a victory message. If the answer is wrong, show a Try Again message.

You have made a pictionary game on Scratch.

What we've covered

If you finish early, implement one or more of the following features for a bonus checkoff.