Catch the Festive Fun: Code a Gingerbread Man ScratchJr Project!

Hello there, coding champions! Looking for a sweet new challenge to get you into the Christmas spirit? This ScratchJr project shows you how to make a charming and fast-paced Gingerbread Man catch game! You’ll learn essential coding techniques like creating custom characters, managing multiple falling sprites, and setting up a clear win condition.

This is a fantastic beginner ScratchJr game that allows you to flex your creative muscles while mastering movement and timing blocks!


Step 1: Design Your Gingerbread Man and Scene

Every great game starts with a great character. In this tutorial, you’ll custom-design your hero!

  • Create the Gingerbread Man: Using the paint editor, you’ll build your Gingerbread Man sprite from basic shapes, colouring him brown and adding fun details like buttons (in blue and yellow) and a smile ([00:00:19]). Adjust his size and place him on the screen ([00:02:33]).
  • Set the Scene: The video suggests choosing the North Pole background to give your game a frosty, festive setting ([00:02:43]).
  • Create Collectibles: Design your main collectible: Stars. Create multiple star sprites, making sure to vary their size and position ([00:02:48]). Crucially, create one special star—the Red Star—which acts as the winning item ([00:04:00]).

Step 2: Coding the Falling Stars and Timing

The stars are the items the Gingerbread Man must catch. To make the game challenging, they need to fall continuously and start at different times.

The code for each star requires three main actions:

  1. Continuous Falling: Use the green flag start block, followed by a forever block containing the move down block (e.g., set to 20 steps) ([00:04:43]). This ensures the star repeatedly falls from the top of the screen.
  2. Staggered Start: To stop all the stars falling at once, add a wait block after the show block. Set a different delay for each star (e.g., 10, 20, 30, and 40 tenths of a second) to ensure a steady, staggered flow of items ([00:05:05]).
  3. Collection and Disappearance: Use the bump block. When the star touches the Gingerbread Man, it must hide and stop ([00:04:51][00:08:20]).

The Winning Condition

For the special Red Star, you’ll use the same code, but the end action is different: when this star is touched, it uses the go to page 2 block ([00:06:29]). Page 2 simply shows a “Merry Christmas” screen, signalling the player has won!


Step 3: Giving the Gingerbread Man Controls

Your hero needs to be able to move to catch the stars! You’ll create simple directional buttons for movement.

  1. Create Control Buttons: Design two buttons, one for Right (red) and one for Left (green) ([00:06:54]).
  2. Send Messages: Code the buttons to send a unique message when tapped (Red message for right, Green message for left) ([00:07:31]).
  3. Receive and Move: Go back to the Gingerbread Man sprite. Use the receive message blocks (green and red) to trigger the corresponding move left or move right blocks ([00:07:47]).

Once the code is in place, you’ll have a fantastic, fully-functional ScratchJr project where you must control your Gingerbread Man to catch all the falling stars before the Red Star appears!

Ready to take on more holiday coding fun? You can find a whole sleigh-load of exciting new Christmas coding projects to try next, and here is yesterday’s ScratchJr Christmas Project in case you missed it.

Alternatively, if you are looking for Coding Tutor in Hertfordshire to support your children with this, I can also help.

One response to “Catch the Festive Fun: Code a Gingerbread Man ScratchJr Project!”

  1. Ho Ho Ho! Code a Catch Game for Father Christmas: Your Next ScratchJr Project! – Alternative Educational Resources & Ideas Avatar

    […] Ready to tackle more holiday coding fun? You can find a whole sleigh-load of exciting new Christmas coding projects to try next or click here for yesterday’s ScratchJr Xmas Coding Project. […]

Leave a comment