Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Knowledge Base
  3. Tutorials
  4. 2D - SDG 3 - Care Bots for Older Persons (Difficulty: 1)

2D - SDG 3 - Care Bots for Older Persons (Difficulty: 1)

Scheduled Pinned Locked Moved Tutorials
2 Posts 2 Posters 12.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CreatiCodeI Offline
    CreatiCodeI Offline
    CreatiCode
    wrote on last edited by admin
    #1

     

    Key Topics Covered

    • Arrow blocks for moving
    • Say Things
    • Set or Change Sprite Size
    • Paint Costumes
    • Switch Costumes
    • Broadcasting messages
    • Hiding or showing sprites

     
     

    Introduction

    The SDGs are 17 goals adopted by the United Nations in 2015. They are a to-do list for everyone to work on together.

    This tutorial is about the well-being of older persons, which is related to the 3rd goal of “good health and well-being”.

    For people over 65 years old, many of them live alone at home. To take care of them, one solution is to use healthcare robots (“care bots”) in their home.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/ca50debb-ec90-4a5e-9061-e5fd0f98c138.png" width="1000" style="">

     
    This project will show more people what care bots can do. Grandpa will ask a care bot named “Joy” to help him find his book, and the user will use the keyboard to control Joy to fetch the book.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/15359bee-bc74-42e9-98a7-a763dc240002.gif" width="500" style="border-radius: 5px; border: 1px solid #29622d;">

     

    Step 1 - Remix a Template Project

    First, please click this link to open the project template:

    https://play.creaticode.com/projects/0b30ffc8fe2cf7e5928b868d

    Click the “remix” button to make a remix project of your own. Note that you need to be signed in to do this. If you are not signed, please sign in first, then click the above link again to load the project.

    9447b4b8-6118-4575-8997-85801552e955-image.png

    This project contains 4 sprites:

    • The “Grandpa” sprite is the person who needs Joy’s help to fetch things;
    • The “Joy” care bot has 16 costumes for walking in all 4 directions;
    • The “Room” sprite contains a simple costume of the walls;
    • The “Object” sprite contains some commonly used objects that Grandpa might be looking for, such as a book or glasses.

     

    Step 2 - Paint a Backdrop Color

    First, please select the stage, and use a rectangle to cover the entire costume. Pick a color that’s different from the sprites.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/54094d10-0390-4b42-85a4-396fd08e38aa.png" width="1000" style="border-radius: 5px; border: 1px solid #29622d;">

     

    Step 3 - Grandpa Calls for Help

    When the project starts, Grandpa needs to tell Joy what he is looking for. You can use the “say” block to show his request on the screen, such as “Joy, where is my book?” Note that you need to add these 2 blocks in the “Grandpa” sprite:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/a211de0c-e817-42ef-9cdb-102d414d0940.gif" width="800" style="border-radius: 5px; border: 1px solid #29622d;">

     

    Step 4 - The “Start” Message

    After saying the request, Grandpa will “tell” the “Object” sprite to move to a random place on the stage. He can do so by broadcasting a “Start” message after the “say” block:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/fe1dc1f4-c619-4954-bec3-fd034179c423.gif" width="1000" style="border-radius: 5px; border: 1px solid #29622d;">

    In the “Object” sprite, when it receives the “Start” message, it should go to a random position.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/2ae3e829-493c-4a42-97a5-5182c17cc3c0.gif" width="1000" style="border-radius: 5px; border: 1px solid #29622d;">

     

    Step 5 - Hide and Show the Book

    Instead of showing the book to move randomly, we should hide it at the beginning, then show it after it has moved to a new position.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/f0ce86a8-ccaf-4f36-85f2-e6247b947237.png" width="250" style="">

    Now the book will be hidden at first, then show up in a random position:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/a30799c9-94af-431e-aa46-0746d54c5947.gif" width="500" style="border-radius: 5px; border: 1px solid #29622d;">

     

    Step 6 - Joy Starts at the Center

    Now let’s add some code to the “Joy” sprite. First of all, we would want Joy to always start at the center of the stage. This makes it easier for the player to get started.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/2144ce41-17c6-4276-9906-8ed2a044ed61.png" width="210" style="">

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/200218df-7b2c-494f-b66f-249559d29d06.gif" width="500" style="border-radius: 5px; border: 1px solid #29622d;">

     

    Step 7 - Joy Walks to the Right

    When the player presses the right arrow key on the keyboard, we would like to make Joy turn to the right. There are 4 costumes with Joy facing the right “R1”, “R2”, “R3” and “R4”. We will just use “R2” for now.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/4203f0b8-47e8-4d99-8fed-68cd8ac91776.png" width="700" style="border-radius: 5px; border: 1px solid #29622d;">

    We also need to make Joy move to the right a little bit using the right arrow block.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/c79873f3-9804-43db-a647-4c0f089a4c97.png" width="300" style="">

    Now each time we press the right arrow key, Joy will move a bit to the right:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/f1339fd6-00d7-4aa4-ac1c-48e76bc2af1c.gif" width="500" style="border-radius: 5px; border: 1px solid #29622d;">

     

    Step 8 - Add the Other 3 Directions

    The code blocks for moving in the other 3 directions are very similar. Please also add them to the Joy sprite:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/032b95c7-ebd7-415b-8e4e-84ab6c1d5662.png" width="700" style="">

    Now we can move Joy to anywhere on the stage:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/41964ee6-efe5-459a-b70b-214fa307bda1.gif" width="500" style="border-radius: 5px; border: 1px solid #29622d;">

     

    Step 9 - Restart If Touching the Walls

    Currently, Joy can walk through the walls in the room. To make the game more interesting, we can make Joy go back to the center point when it touches any wall.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/921c478c-b428-4f2f-8c2a-568e4f9f4334.png" width="300" style="">

    Now test it out by making Joy walk into a wall:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/a468103f-2ad2-43e8-8f7c-d9a95c43ef16.gif" width="500" style="border-radius: 5px; border: 1px solid #29622d;">

     

    Step 10 - Add a “Well Done” Message

    When the player successfully moved Joy to the book object, we need to show a message. Please add a new sprite named “Success”, and draw a success message. Here is an example:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/c753d9f1-415b-4b51-925a-121b8dbe7318.gif" width="900" style="border-radius: 5px; border: 1px solid #29622d;">

     

    Step 11 - Hide the “Success” Sprite on Start

    At the beginning of the game, we should hide the “Success” sprite. Please add these blocks to that sprite’s code:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/923abab6-0bf4-489e-9ded-03851fab784c.png" width="200" style="">

     

    Step 12 - Show the “Success” Sprite

    When the Joy sprite touches the book object, we need to show the “Success” sprite.

    First, we need to broadcast a new message “success”, whenever the Joy sprite touches the “Object” sprite. These blocks should go into Joy’s code:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/56b77748-0214-476f-9cc8-12c24b46c09a.png" width="230" style="">

    In the “Success” sprite, when we receive the “success” message, we should show this sprite, and also move it to the center of the screen:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/99c33260-780a-45a7-a86c-2b503f2df1cc.png" width="250" style="">

    Now our game is ready:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/15359bee-bc74-42e9-98a7-a763dc240002.gif" width="500" style="border-radius: 5px; border: 1px solid #29622d;">

     

    Next Steps

    There are many ways you can extend this project. Here are some examples:

    • Draw a Different Room: You can replace the “Room” sprite’s costume with your own drawings.

    • Find 2 Objects: You can change Grandpa to ask the player to find 2 objects instead of just one. The success condition needs to be changed as well.

    1 Reply Last reply
    1
    • CreatiCodeI CreatiCode pinned this topic on
    • C Offline
      C Offline
      Connie Dunn
      wrote on last edited by
      #2

      This is my WIP and a few changes I’ve made. https://play.creaticode.com/projects/GcggcFcLPeaHDkGDF

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • CreatiCode