Hello, festive coders! Ready for another thrilling ScratchJr project? This tutorial will guide you through creating a fun, time-based collection game starring Rudolph the Red-Nosed Reindeer! You’ll control Rudolph as he zooms around, gathering presents before the clock runs out.
This ScratchJr game is fantastic for practising full directional movement, creating custom sprites, and implementing a countdown timer—essential skills for any engaging ScratchJr project!
Step 1: Design Rudolph and Set Up Full Controls
First, let’s bring our hero to life and give the player complete control.
- Create Rudolph: Start by modifying the default cat sprite. Use the free draw tool to add antlers and give him his signature red nose (
[00:00:21]). Adjust his size and place him ready for action ([00:01:15]). - The Joystick: Design four simple square sprites to act as a directional joystick: Left (red), Right (blue), Up(green), and Down (purple) (
[00:01:24]). - Code the Movement: Each button needs to send a unique colour-coded message when tapped (
[00:02:10]). Go to the Rudolph sprite and use thereceive messageblocks to connect the messages to the corresponding movement blocks:- Red Message:
Move Left([00:02:41]). - Blue Message:
Move Right([00:02:48]). - Green Message:
Move Up([00:02:48]). - Purple Message:
Move Down([00:02:54]).
- Red Message:
Step 2: Creating the Presents (Collectibles)
Rudolph needs something to collect! We’ll create multiple presents and code them to disappear when caught.
- Create Presents: Design several gift-box sprites using the paint tool. Vary the colours of the boxes (e.g., orange, red, purple) and their ribbons for visual interest (
[00:03:09]). - Code the Collection: The code is very simple: when a present is touched by Rudolph (using the
bumpblock), it should immediatelyhideto disappear from the screen ([00:05:00]). Make sure to copy this code onto all your present sprites ([00:07:07]).
Step 3: Implementing the Countdown Timer
To make the game a race, we need a time limit.
- Create Timer Sprites: Create a new page for your winning screen (
[00:05:46]). On the main game screen, create two sprites for the timer: a circular backdrop (e.g., black) and a rotating arrow (e.g., white) ([00:05:18]). - Code the Timer Logic: On the arrow sprite, use the following code:
- Start with the
green flagblock. - Use the
repeatblock and set it to repeat 12 times. - Inside the repeat block, add the
turn clockwiseblock (to rotate the arrow) and awaitblock set to 3 tenths of a second ([00:06:33]). This creates a basic 12-tick countdown. - End Game Action: Once the 12 rotations are finished, use the
go to page 2block to switch to your Win Screen, which should display a “Merry Christmas” message ([00:06:48]).
- Start with the
Once the code is complete, you have a thrilling, timed ScratchJr project! Use your directional controls to help Rudolph collect every present before the clock strikes zero!
Ready for more seasonal coding fun? You can find a whole sleigh-load of exciting new Christmas coding projects to try next! If you missed yesterday’s projects, please click here.
Alternatively, if you are looking for Coding Tutor in Hertfordshire to support your children with this, I can also help.
Leave a comment