Memory Game

This project will see your pupils use the “wait”, “hide” and “show” blocks to create a challenging game that will also serve as a memory work-out.
It will also provide an excellent opportunity to introduce the concepts of timelines and event sequencing. Your students will have to figure out and plan the sequence in which the events of the game will play out, as well as decide on the time intervals between each event.

You can explain the rules of the game by preparing and presenting an example project. Your students could first watch your game animation and later create ones of their own.
The idea is simple – different characters appear onscreen and disappear after a brief interval, effectively flashing in and out of sight. Your students’ goal is to memorize what characters appear onscreen and in what order.

Your example project

Your example project could start with three different characters, each appearing for half a second (argument 5 on the “wait” block). The more characters you add, and the shorter screen time you allot them, the more difficult the game will be.

First, choose three characters and add them to the project. When you run it, all of them should be hidden. Then, the first character will appear onscreen for half a second. The second character will wait three seconds before appearing and disappearing. The third character will wait another six seconds.

Below, you’ll find a video of the project playing out and a set of relevant scripts:

ScratchJr memory game solution.

Run your project and show it to your pupils. They should watch the animation closely and try to remember which characters appear onscreen, and in what order.
It’s not a very difficult task with three characters, but if you increase their number to, say, five, the game will be much more challenging. Try to adjust the difficulty level to your students’ age and capabilities by picking the right number of characters for your game, as well as the intervals between their individual appearances.

Plan your own animation

If you’re sure your pupils have understood the game, it’s time to show them how they can put together similar scripts of their own. Discuss which blocks should be used during the project, and how to use the “wait” block.
In order to help your students understand the rules and plan their own scripts, you can start by mapping them out on worksheets:

ScratchJr memory game worksheet.
Memory Game worksheet

Your pupils can work on their own or in small groups. Be sure to prepare an individual timeline worksheet for each group or student (you can download the worksheet via the form below). The sequence of events (i.e. when each character appears and disappears) is laid out on the timeline. The students check the timing of each event and fill in relevant script arguments. The goal of this exercise is to make the kids understand how to calculate and assign proper arguments to the “wait” blocks.

After the exercise, put away the worksheets and have your pupils prepare their own animations on the tablets. Remind them that at the beginning all the characters should be hidden (each has to be hidden individually after getting added to the project, their initial “absence” isn’t part of the scripts).

Two final suggestions

If you were to prepare a five-character game, the last character to appear onscreen would have to do so after 120 seconds, however, the maximum value one can assign a “wait” block is 99. How to deal with that? Simply connect two (or more) blocks:

An animation for the memory game could also be „played in reverse” – in the beginning the pupils see all the characters, who begin to disappear at even intervals. When all are gone, the pupils’ task is to list from memory which characters were present during the game and what order they disappeared in.

To download the worksheets, simply fill out the form below.

Happy coding!


Leave a Reply

Your email address will not be published.