
We’ve put together a step-by-step guide for children to have a go at coding their own RPG Adventure game in 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.

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



The first guard will walk back and forth forever.

This guard will look in different directions over and over.

Do you see the guards start to move?

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

What happens if you run into the guards?

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


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