Leap Over Obstacles: Code a Christmas Fairy Jump ScratchJr Project!

Hello, coding friends! Ready for a magical new ScratchJr project? This tutorial is all about creating a fun and challenging Christmas Fairy jump game. You’ll learn how to implement continuous movement, full character control, and a simple “Game Over” condition.

This ScratchJr game is an excellent way to practice making a character interact with obstacles and mastering basic game physics in ScratchJr!


Step 1: Setting Up the Fairy, Star, and Background

Every game needs a hero and a hazard!

  • Select Your Fairy: Start a new project by deleting the cat sprite and adding the Fairy sprite ([00:00:18]). Make her a good size for jumping ([00:00:29]).
  • Set the Scene: Choose the North Pole background to set the winter stage ([00:00:34]).
  • The Obstacle (The Star): Add a Star sprite. The video recommends slightly editing it to make it a bright yellow to stand out ([00:00:45]).

Step 2: Coding the Continuous, Rotating Star

The star is the obstacle the fairy must jump over, and it needs to move and spin continuously across the screen.

The Star’s code is set up for two simultaneous actions:

  1. Continuous Movement: Use the green flag start block, followed by a forever block containing a move right block set to a distance that covers the screen (e.g., 22 steps) ([00:01:20]). This makes the star continuously travel from one side of the screen to the other.
  2. Rotation: Also starting on the green flag, use a forever block containing the turn clockwise block ([00:02:05]). This gives the visual effect of the star spinning as it moves, making it look much more dynamic!

Step 3: Coding the Fairy’s Full Movement and Jump

This game uses a joystick setup, giving the player control over moving left, right, and jumping.

  • Create Control Buttons: Create three button sprites: one for Jump (red), one for Left (purple), and one for Right(green) ([00:02:45]).
  • Send Messages: Code each button to send a unique colour-coded message when tapped (Red, Purple, Green) ([00:03:43]).
  • Receive and Move: Go to the Fairy sprite and code the movement based on receiving these messages:
    • Purple Message: Move Left ([00:04:11]).
    • Green Message: Move Right ([00:04:20]).
  • Receive and Jump: The jump is slightly more complex for a smooth animation. When the Red Message is received, use a sequence of blocks: jump up (e.g., 6 steps), then move right, a wait block, and finally move left ([00:04:29]). This creates a realistic arc for the jump.

Step 4: Adding the “Game Over” Condition

To make it a true challenge, the game must end if the fairy touches the star.

  • Collision Detection: On the Star sprite, add a separate code block using the start on bump trigger ([00:06:01]).
  • End Action: Connect the start on bump block to the stop block, which halts all code in the project. Follow this with a say block that displays “Game Over” ([00:06:10]).

Now you have a complete jump-and-dodge game! Test your skills to see how many laps the star can complete before you fail to jump.


Looking for more holiday-themed coding fun? Be sure to check out the rest of the challenges in this series! Find more exciting Christmas coding projects and, if you missed it, here is the link to yesterday’s Xmas ScratchJr Project.

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

One response to “Leap Over Obstacles: Code a Christmas Fairy Jump ScratchJr Project!”

  1. Catch the Festive Fun: Code a Gingerbread Man ScratchJr Project! – Alternative Educational Resources & Ideas Avatar

    […] sleigh-load of exciting new Christmas coding projects to try next, and here is yesterday’s ScratchJr Christmas Project in case you missed […]

Leave a reply to Catch the Festive Fun: Code a Gingerbread Man ScratchJr Project! – Alternative Educational Resources & Ideas Cancel reply