Hello, festive coders! If you’re looking for a fun and engaging way to hone your coding skills this season, look no further. This tutorial will guide you through building a fantastic Elf Christmas jump game—a perfect ScratchJr project for beginners and children ready to create a playable challenge!
In this ScratchJr game, you’ll control a charming elf who must jump over a continuously rolling Christmas pudding. It’s an excellent way to master movement, animation, and collision detection!
Step 1: Design Your Elf and Set the Scene
Before the action starts, we need to bring our characters and background to life.
- Create Your Elf: Start by modifying the default cat sprite using the paint editor. Give your character a simple but distinct elf hat, using red and green shapes (
[00:00:22]). Once complete, position your new elf ready to jump ([00:00:53]). - Set the Background: Choose the Winter background for a festive feel. The video recommends using the eraser tool to remove the trees, giving you a wider and cleaner area for your gameplay (
[00:01:10]). - Design the Obstacle: Create a new sprite for the Christmas Pudding. Build a brown circle base, add white icing, and finish it off with red berries and green holly leaves (
[00:01:24]). Ensure it’s sized appropriately to be a challenging obstacle!
Step 2: Coding the Rolling Christmas Pudding
The Christmas pudding is the main obstacle, and it needs two continuous actions: moving and rotating.
The code for the Christmas Pudding requires two simultaneous actions, using forever blocks:
- Continuous Movement: When the
green flagis pressed, use aforeverblock containing themove leftblock. This will make the pudding continuously roll across the screen ([00:04:53]). - Rotation: Also starting on the
green flag, use aforeverblock containing theturn counter-clockwiseblock ([00:05:03]). This gives the visual effect of the pudding actually rolling, which looks great! - Game Over Condition: The most important rule: if the pudding touches the elf, the game ends. Use the
start on bumptrigger, connected to thestopblock, followed by asay "Game Over"block ([00:05:26]).
Step 3: Implementing Elf Controls and the Jump Arc
You need buttons for the player to control the elf’s movement and, most importantly, the jump!
- Create Control Buttons: Design three simple square sprites to act as controls: one for Jump (blue), one for Move Left (red), and one for Move Right (purple) (
[00:02:54]). - Send Messages: Code each button to send a unique colour-coded message when tapped (Blue, Red, Purple) (
[00:03:18]). - Receive and Move: Go to the Elf sprite and use the
receive messageblocks:- Purple Message: Triggers the
move rightblock ([00:03:39]). - Red Message: Triggers the
move leftblock ([00:03:48]).
- Purple Message: Triggers the
- The Jump Arc: The jump requires a sequence of movement blocks for a smooth, arcing jump: When the Blue Message is received, use the
jump upblock (e.g., 6 steps), then a sequence ofmove right, awaitblock, and amove leftto bring the character back to their starting horizontal position ([00:03:58]).
This ScratchJr project is a fantastic way to understand how movement, collision, and animation blocks work together to create a playable game. Test your jump timing and see how long your elf can avoid the rolling pudding!
If you’re eager to continue your festive coding journey, you can find the rest of the challenges in this series and explore more engaging Christmas coding projects on my website and please click here if you missed yesterday’s Xmas ScratcH Project.
Alternatively, if you are looking for Coding Tutor in Hertfordshire to support your children with this, I can also help.
Leave a comment