Scratch Game
Advanced
60 mins
Teacher/Student led
+120 XP
What you need:
Chromebook/Laptop/PC or iPad/Tablet

Scratch Zombie Shooter

For this project, we are going to create a game where we fight off zombies by shooting them. 

Lesson Files

Teacher Class Feed

Load previous activity

    1 - Creating a Scratch Project

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

    We can also add a backdrop to our game. For this project, we are going to be using the Blue Sky 2 backdrop. 

    To add the Blue Sky 2 backdrop, we click on the Backdrop Button on the lower right side of the screen and once we can see the backdrops, we can search for the Blue Sky 2 backdrop.


    2 - Creating a Countdown Timer

    We want our players to be ready before the zombie army invades. To do this, we can create a countdown timer sprite to help our players get ready.

    For our countdown timer sprite, we need to have five costumes in this order; Costume number 1 will be Ready?, Costume number 2 will be our number 3, Costume number 3 will be our number 2, Costume number 4 will be our number 1 and Costume number 5 will be our Go! costume.

    To create the countdown timer sprite, we can go to the Scratch Sprite Library and look for the Number 3 sprite.

    Then, we can add the number 2 and 1 costumes by adding more costumes to our sprite. To create the Ready and Go! costumes, we can duplicate our number 3 costume and change the number 3 to the words Ready? and Go!. We should also keep in mind the we need to correctly order our costumes based on what order we want them to be.

    when green flag clicked show switch costume to (Ready v) wait (2) seconds switch costume to (3 v) start sound (D Elec Piano v) wait (1) seconds switch costume to (2 v) start sound (D Elec Piano v) wait (1) seconds switch costume to (1 v) start sound (D Elec Piano v) wait (1) seconds switch costume to (Go!!! v) start sound (Gong v) broadcast (Start v) hide



    3 - Creating the Player and the Tank

    For this project, we want to have a Player sprite and a Tank sprite. 

    The Player sprite will handle the movement of our character while the Tank sprite will handle the shooting of zombies.

    To create our Player sprite, we can go to the Scratch Paint Editor and create our own Player sprite. For this Player sprite, we want to use a simple circle.

    To create our Tank sprite, we can go also to the Scratch Paint Editor and create the Tank sprite. For this Tank sprite, we can use two squares to make it look like a tank.




    4 - Coding the Player

    Now, we want our player to move around the game area. We can use the W,A,S and D keys to move our player sprite. 

    To make our player move, we can use the code below. 

    when I receive [Start v] go to x:(0) y:(0) hide forever if <key (a v) pressed?> then change x by (-10) end if <key (d v) pressed?> then change x by (10) end if <key (w v) pressed?> then change y by (10) end if <key (s v) pressed?> then change y by (-10) end


    5 - Coding the Tank

    Now, we want to add codes to our Tank sprite. 

    We want to hide our Tank sprite when we start the game. To do this, we can use the code below.

    when green flag clicked hide

    Next, we want our Tank sprite to follow our Player sprite wherever it goes. We also want our Tank sprite to point towards wherever our Mouse pointer is.

    when I receive [Start v] show point in direction (90) wait (1) seconds forever point towards (mouse-pointer v) go to (Player v)


    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 2017 - 2025. 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