Kawaii Face Maker pt.1

St Patrick’s Online Coding Lessons with Mr Darch

Kawaii Face Maker pt.1

This is part 1 of a fun project that allows us to harness the power of a computer to see a lot of different possibilities in a very short time. In part one of this project we’ll create three heads, three different eyes and three different mouths and use the arrows keys along with on screen buttons to change our cute “kawaii” characters face.

Notes for parents: Each child will work at their own pace on this. I’ve uploaded video and written instructions for each step. With Scratch children ideally need access to a keyboard to name sprites and enter numbers but much of this project can be done on an iPad or tablet without any issue.

Children should be encouraged to work at their own pace and enjoy playing what they’ve made as they go. Do encourage them to watch the video for each step again if they get stuck. Some will complete this is in half an hour, others might like to come back to this project 3 or 4 times to complete it. 

Please direct any feedback or suggestions to dave@alittlelearning.org

Happy Scratching!

We are learning to:
  • Create and control User Interface (UI) elements
  • Use the Scratch programming language to solve computer science problems in a fun and engaging way.
  • Read code in the first person to help us understand what’s really going on.
  • Use the sprite editor in Scratch
  • Write code to control each sprite (character) in the game
  • Use loops to repeat parts of our program
  • Use conditional statements (IF) to allow our program to make decisions about what should happen and when.
  • Use variables to store and retrieve data from within our game
  • Use conditional statements in conjunction with variables to make things happen once certain criteria is met
  • Initialise code in our game to ensure that sprites are in the right place and values stored in variables are reset ready for each play of our game

Getting started

We’ll be using the free web app at www.scratch.mit.edu again for this lesson. You don’t need an account to take part.

Try to watch each video a few times before you read the instructions. This will help you to clearly understand what you need to do.

Step 1

  • create a head sprite
  • draw three heads on 3 different costumes
  • name them 1, 2, 3

Step 2

  • create a eyes sprite
  • draw three different eyes on 3 different costumes
  • name them 1, 2, 3

Step 3

  • create a mouth sprite
  • draw three mouths on 3 different costumes
  • name them 1, 2, 3

Step 4

  • create a new sprite
  • name it “selectHead”
  • create a rectangle
  • write the word “Head”

Step 5

  • right click the selectHead sprite and duplicate it 2 more times
  • change one of the sprites to say “Eyes”
  • change the other to say “Mouth”
Key learning:

Did you play the game?

What happened when the red dot sprite touched the bug sprite?

That’s right NOTHING!

Why not? Because we haven’t written any code to make that happen!

We need to add more code to make something happen when these sprites touch.

Step 6

  • create a variable and call it selected
  • write code for selector buttons

  • drag to each select sprite and modify for each one

Test your code by first clicking the green flag then clicking each select sprite and watch to see if the value of the variable changes.

Step 7

  • create the code for head

Step 8

  • copy by dragging the code across to the eyes and mouth sprites
  • change the code for each sprite
  • use initialisation so that the select sprites are always in the right place

Now you’re ready to test your code. Click the green flag then click on the head, eyes or mouth selector button. Use the up and down arrow keys to change through each of the face parts.

Extension Challenges:

  • Can you make left and right arrow keys select face, eyes and mouth?
  • How would you control that? What logic would you use?
  • Which sprite would that code go on?

Think “If this is happening, make that happen”

  • Search google for “kawaii faces” for more face ideas
  • Make three more eyes and three more mouths

Next time we’ll add arms, legs as well as random button to create unlimited possibilities!