How to Make a Wolverine Platform Game in ScratchJr

Introduction

In this exciting tutorial, we are going to learn how to create a superhero-themed platform game featuring the legendary Wolverine! Your child will love designing their own levels and coding a character that can jump, run, and explore. We will be creating a unique ScratchJr project where Wolverine must navigate obstacles and leap onto platforms to find the secret files regarding his mysterious past. Using ScratchJr, we will explore how to create custom backgrounds and use clever motion combinations to simulate gravity and jumping mechanics. It is a fantastic way to introduce logic and game design concepts in a fun, engaging way.

The Video Embed

What You Need

To build this game, you will need to prepare a few assets within the ScratchJr paint editor:

  • Characters:
    • Wolverine: You can edit the standard ‘Tick’ (Cat) character to look like Wolverine by adding claws and changing the colours.
    • Filing Cabinet: Use the standard cabinet character, colour it grey, and paint a large ‘X’ on it (Weapon X).
    • Buttons: Four distinct buttons for controls (Yellow, Green, Red, and Orange).
  • Background:
    • A custom background where you have drawn blocks or platforms.
    • Tip: Draw the platforms at specific heights so Wolverine can land on them (e.g., 3 grid squares high).

Step-by-Step Instructions

Step 1: Setting Up the Controls

First, we need to program the buttons that will control Wolverine. We use message blocks to tell Wolverine what to do when we tap the screen.

  • For the Yellow Button: Add a Start on Tap block and connect it to a Send Yellow Message block.
  • For the Green Button: Add a Start on Tap block and connect it to a Send Green Message block.
  • Repeat this for the Red Button (Send Red Message) and Orange Button (Send Orange Message). [Insert screenshot of the button code here]

Step 2: Coding the Walking Movement

Now, let’s make Wolverine walk left and right. Click on your Wolverine character to add these scripts:

  • Add a Start on Yellow Message block and connect a Move Left block.
  • Add a Start on Green Message block and connect a Move Right block. Now, when you tap the yellow or green buttons, Wolverine should walk across the floor.

Step 3: Coding the Jump (The Platform Logic)

This is the clever part! To make Wolverine jump onto a platform, we need him to move sideways and upwards at the same time, but only come down a little bit so he lands on the box.

  • The Jump Left (Red Button):
    • Script 1: Start on Red Message -> Move Left (set number to 4).
    • Script 2: Start on Red Message -> Move Up (set number to 4) -> Move Down (set number to 1).
  • The Jump Right (Orange Button):
    • Script 1: Start on Orange Message -> Move Right (set number to 4).
    • Script 2: Start on Orange Message -> Move Up (set number to 4) -> Move Down (set number to 1).

Note: By going Up 4 but only Down 1, Wolverine stays in the air, creating the illusion he has landed on the platform![Insert screenshot of the jumping logic here]

Step 4: Winning the Game

We need a goal for Wolverine.

  • On the Wolverine character, add a Start on Bump block (triggering when he touches another character).
  • Connect this to a Go to Page 2 block.
  • Ensure the Filing Cabinet is placed at the end of the level so Wolverine touches it to win.

Step 5: The Ending Scene

Create a second page (Scene 2) showing the Filing Cabinet.

  • Add Wolverine and the Cabinet.
  • Code Wolverine to Start on Green FlagMove Left towards the cabinet, and use a Say block to display a message like “I have found the secrets of my past!”.

Troubleshooting/Tips

  • Landing in mid-air? Remember that the platforms in ScratchJr are not solid objects; they are just drawings. If Wolverine jumps but misses the drawing, he will still ‘float’ at that height. You must line up your background drawings to match the jump height (Up 4, Down 1 means a net height gain of 3).
  • Jumping too far? If Wolverine overshoots the platform, reduce the number on the Move Left or Move Rightblocks in the jump scripts.
  • Simultaneous Movement: Ensure you have two separate scripts for the jump (one for horizontal, one for vertical) starting on the same message colour so they happen at the same time.

If you are interested in doing more coding with your children and pupils, please check out the other ScratchJr tutorials I have created.