Hello there, aspiring game developers! Are you ready for a fun, festive ScratchJr project? This tutorial guides you through creating an exciting Father Christmas catch game where you control Santa as he collects falling holly, all while aiming for a special, game-winning piece!
This ScratchJr game is brilliant for practising character design, implementing precise controls, and using delays to manage the flow of falling objects—making it a perfect ScratchJr project for beginners and kids!
Step 1: Designing Father Christmas, Holly, and the Scene
Let’s start by setting up our characters and environment.
- Create Father Christmas (Santa): Start by transforming the default cat sprite using the paint editor. You’ll draw the white trim and red top of his hat, the pom-pom, and the big white beard (
[00:00:24]). Adjust his size and place him at the bottom of the screen ([00:01:34]). - Set the Background: Choose the Winter background and use the paint tools to remove the trees for a cleaner gameplay area (
[00:01:44]). - The Collectibles (Holly): Create a sprite for the holly, complete with red berries and green leaves (
[00:02:02]). Duplicate this multiple times. - The Golden Holly: Create one special piece of holly—the ‘golden’ one—to serve as the winning collectible. You can simply make it a different colour or placement to distinguish it (
[00:03:30]).
Step 2: Coding the Falling Holly Obstacles
The main challenge is coding the holly to fall continuously and start at staggered intervals.
The code for the regular holly pieces follows this structure:
- Continuous Falling: Use the
green flagstart block, followed by ashowblock. Add arepeatblock (e.g., 4 times) containing themove downblock (set to 15 steps, or the full height of the screen) ([00:06:13]). This makes the holly continuously drop. - Staggered Start: To prevent them from all falling at once, you must insert a
waitblock after theshowblock. Use increasing delays for each piece (e.g., 10, 20, 30 tenths of a second) to ensure a steady, staggered flow ([00:07:01]). - Collection and Disappearance: Use the
bumpblock. When the holly touches Santa, it muststopthe code andhideto simulate a successful catch ([00:06:47]).
The Winning Condition
- Code the Golden Holly: For the special golden holly, use the same falling code, but change the collision action: when this holly is touched, it uses the
go to page 2block ([00:07:48]). - The Win Screen: Create a second page displaying your Santa sprite and a “Merry Christmas” message (
[00:03:53]).
Step 3: Giving Father Christmas His Controls
You need simple left and right controls for Santa to navigate the falling holly.
- Create Control Buttons: Design two button sprites, one for Left (blue) and one for Right (red) (
[00:04:40]). - Send Messages: Code the buttons to send a unique message when tapped (Blue message for left, Red message for right) (
[00:05:27]). - Receive and Move: Go back to the Santa sprite. Use the
receive messageblocks:- Blue message: Triggers the
move leftblock ([00:05:37]). - Red message: Triggers the
move rightblock ([00:05:47]).
- Blue message: Triggers the
Once the code is in place, you have a complete, fun, and highly playable ScratchJr project! Now get ready to test your speed and skill to catch that golden holly!
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.
Alternatively, if you are looking for Coding Tutor in Hertfordshire to support your children with this, I can also help.
Leave a comment