Rik explains: stretching Scratch

Scratch, a free drag-and-drop programming language, is the perfect place to start out if you are new to coding. But, just because it is accessible for beginners, doesn’t mean that you can only create simple programmes. In this blog post, Interim Head of Content and Curriculum and Code Club leader Rik Cross explains how to start creating sophisticated games with Scratch.


Sometimes I encounter learners who feel like they’re “done with Scratch”, or say things like:

“Scratch isn’t a ‘proper’ programming language.”
“I want to make a real game!”
“I’ve done Scratch before.”

In response, I often show them examples of more sophisticated things that have been made with Scratch, such as open-world games and 3D graphics.

Scratch is a rich, full-featured programming environment, and moving past the basics into Scratch mastery can really help to develop and embed programming skills and knowledge.

In this blog post I’ll share some tips for stretching more advanced learners in Scratch.


Making ‘proper’ games

When learners talk about wanting to make ‘proper’ games, it’s usually because they are trying to replicate a feature seen in a game they play themselves. This provides a great source of motivation, and learners are often surprised to find that these features can easily be developed in Scratch.

Take the example of creating a game in which movement is ‘forwards’ into the stage, rather than from left to right. In this 3D ‘sprint’ game, forward movement is created by alternately pressing the left and right arrow keys. This causes the finish line (and other scenery such as trees and spectators) to move down the stage and increase slightly in size, giving the illusion of movement in a 3D world.


Background music

Learners are often keen to include background music in their games. It’s very easy to add this by repeatedly playing a sound until it is finished. It’s also possible to add a volume control: display a variable as a slider, and use its value to set the volume.

Here’s a simple Scratch project that demonstrates this: Music with volume.


Multiple screens

Multiple screens can be achieved in Scratch through the use of backdrops and button sprites — there is an example of this in the Code Club Brain Game project.
Each separate ‘screen’ is created by broadcasting messages and then showing or hiding the elements required for each screen. You can even add special effects to change how buttons look when they are clicked or when the mouse cursor hovers over them.


Through the use of multiple backdrops and ‘touching colour’ blocks, it’s relatively easy to Create your own world in the form of an open-world game that spans many rooms. Backdrops contain coloured ‘doors’ that transport the player to the next (or previous) backdrop as well as setting the player’s position. In-game sprites can also be programmed to only appear in a particular room.


Developing algorithms

Once learners are familiar with programming concepts and can use them in isolation, the next step is to be able to combine and apply those concepts to solve a problem. You could compare this to working towards fluency when learning a spoken language, and sticking with Scratch — rather than moving onto another language — makes this journey much easier.

One way to facilitate this is to support learners in developing algorithms. An example of such an algorithm is a high score feature. To begin with, this could be a simple ‘high score’ variable that is checked against a score each time a game is played, but it could be as involved as creating and updating a table for storing the ten highest scores.

Other examples of algorithms that could be developed are a scrolling background and a line-following sprite.

Finishing a project

A lot of the skill in programming comes from finishing a project -— combining ideas, adding in little extras, and removing bugs. This is often the time when real Scratch mastery happens: dealing with unexpected side-effects and smoothing the edges of a project.

Where possible, I always ask a learner to share their project when they’ve finished it, as this provides motivation for producing a high-quality finished product. This sharing can be with other club members, or more widely through the Scratch website. Having a real audience gives learners a reason to thoroughly test their project, and they can use feedback to drive improvements. This sharing, feedback, and improvement cycle can also uncover things that the creator may not have thought of, such as communicating instructions for controlling a project.


Have you created an awesome Scratch project in your Code Club that you want to share with the world?

Coolest Projects is a showcase where young people can exhibit the cool ideas they have been working on throughout the year. This year, for the first time, Coolest Projects will be coming to the UK, with an event held at Here East in London on Saturday 28 April.

If you’d like to showcase a project, register your idea to apply for a place at by 25 March. Find out more at at coolestprojects.org/uk.