Code Adventure Free Scratch Coding Activity

We’ve put together a step-by-step guide for children to have a go at coding their own RPG Adventure game in Scratch.

  1. 1

    Go to the Scratch website: https://scratch.mit.edu/

  2. 2

    Sign in or register for Scratch

    If you already have a Scratch account, click ‘Sign in’ and enter your login details. Otherwise click ‘Join Scratch’ and create your free Scratch account.

  3. 3

    Open this starter file: https://scratch.mit.edu/projects/918136173/

  4. 4

    Click the “Remix” button to make your own copy

  5. 5

    Start by clicking on the "Player" sprite to make sure it's selected.

  6. 6

    Now drag some blocks in from the left to start coding...

    With these blocks we can move the player character up and down with arrow keys.

  7. 7

    Next add these blocks for left and right movement.

  8. 8

    Press the Green Flag and try using the arrow keys to move!

  9. 9

    Next let's code the guards that our character needs to avoid.

    The first guard will walk back and forth forever.

  10. 10

    Now select "Guard 2"...

    This guard will look in different directions over and over.

  11. 11

    Time to test it out! Press the Green Flag.

    Do you see the guards start to move?

  12. 12

    Let's code what happens when our player runs into the guards...

    This code will stop the game if the player gets caught by either of the guards.

  13. 13

    Press the Green Flag again to test.

    What happens if you run into the guards?

  14. 14

    Finally, we want to collect the key!

    This code checks to see if our player touched the key, and makes the key hide if so.

  15. 15

    Awesome work! Click the Green Flag to play the full game.

Thanks for building a game with us!

If you enjoyed this coding activity be sure to sign up for our online coding classes for kids. Our coding classes are a lot of fun, but they’re also really effective at teaching coding techniques and challenging students to develop their skills. You’ll learn about loops, variables and functions - and everything in between - and you’ll build your own games and animations with a small group of kids of the same age and experience level as you.

Sign up for one of our free coding lessons