Scratch Arts Digital Art
Intermediate
60 mins
Teacher/Student led
125 points
What you need:
Chromebook/Laptop/PC or iPad/Tablet

Pattern Snake

In this lesson, students will learn how to create an interactive 'Pattern Snake' using Scratch. They will draw a sprite, code it to follow the mouse pointer, create a trailing effect with clones, and add colour changes. The lesson also includes adding costumes for different shapes and celebrating the final creation.
Learning Goals Learning Outcomes Teacher Notes Lesson Files

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - Introduction

    Welcome to our exciting Scratch project, 'Pattern Snake'! In this project, we will create a fun and colorful snake pattern that follows your mouse pointer around the screen. You will learn how to draw a sprite, make it follow your mouse, create clones, change colors, and add costumes for different shapes. By the end of this project, you will have a stunning visual snake pattern that you can show off to your friends and family. Let's get started!

    2 - Create a new Scratch project

    Go to the Scratch website, create a new project and delete the cat sprite.

    scratch.mit.edu


    3 - Draw a sprite

    In this project we will draw a sprite and then code it to follow our mouse around the screen and create a trail behind it with some added effects.

    Create a new sprite and draw a shape. It can be any shape and any colour you like. Keep it small and drag it into the centre of the box.
    Or if you don't want to draw a shape, you can just add the Ball sprite from the sprite library and program that using the code in the following steps.

    4 - Follow you mouse pointer

    To make the snake pattern we will code the sprite to follow your mouse around the stage area.

    Add the following code to the sprite to make it start at a random position and then follow your mouse pointer.

    when green flag clicked go to (random position v) forever move (10) steps if on edge, bounce point towards (mouse-pointer v) end

    Click on the green flag and your sprite should follow your mouse around.

    5 - Create clones

    To make the trailing snake effect we will create clones of our sprite, leave them where they were created and then delete them after 5 seconds.

    Add the following new code blocks to your sprite.

    when green flag clicked go to (random position v) forever move (10) steps if on edge, bounce point towards (mouse-pointer v) create clone of (myself v) // add this block end when I start as a clone // add these blocks wait (5) seconds delete this clone

    Click on the green flag and the clones should make a snake effect before deleting after 5 seconds.

    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of Coding Ireland. Unauthorised use, copying or distribution is not allowed.

    Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. It is available for free at https://scratch.mit.edu
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more