How to Make an Aquaman Game in ScratchJr

Introduction

In this exciting ScratchJr project, we will dive deep into the ocean to help the superhero Aquaman recover his lost trident. Your pupils will love creating this underwater adventure where they build a custom on-screen controller to guide their hero. The goal is simple yet engaging: swim around the ocean to collect the scattered pieces of the powerful trident while avoiding the sea creatures. This tutorial is perfect for young coders mastering ScratchJr, teaching them about message sending, collision detection, and linking scenes together to tell a story. Let’s make a splash and start coding!

The Video Embed

What You Need

  • Main Character: Aquaman (You can edit the Scuba Diver character in the paint editor to look like a superhero).
  • Collectibles: 5 Trident parts (Draw simple rectangles or shapes that form the weapon).
  • Controller Buttons: 4 Arrows (Up, Down, Left, Right).
  • Obstacles: Various sea animals (Fish, Crabs, Seahorses).
  • Background: An Underwater scene.
  • Scenes: You will need 2 scenes (one for the game, one for the victory screen).

Step-by-Step Instructions

Step 1: Create the Joypad Controller

First, we need to create the buttons that will control Aquaman. We cannot use the standard keyboard arrows on a tablet, so we build our own.

  1. Add four arrow characters to the screen (Up, Down, Left, Right).
  2. For each arrow, use the Start on Tap block (triggering when you touch the screen).
  3. Connect a Send Message block to each one. Assign a specific colour for each direction:
    • Send Orange Message for Up.
    • Send Red Message for Down.
    • Send Yellow Message for Left.
    • Send Green Message for Right.

[Insert screenshot of the arrow button code here]

Step 2: Coding Aquaman’s Movement

Now, let’s make Aquaman move when those messages are received.

  1. Select your Aquaman character.
  2. Add four separate scripts, each starting with a Start on Message block.
  3. Match the colours to your buttons:
    • Start on Orange Message → Move Up.
    • Start on Red Message → Move Down.
    • Start on Yellow Message → Move Left.
    • Start on Green Message → Move Right.

Step 3: The Trident Parts

The goal is to collect the trident pieces. These pieces should enter the screen and wait to be caught.

  1. Place your trident parts outside or at the edge of the screen initially.
  2. Use a Wait block (e.g., set to 20) so they don’t all appear at once.
  3. Add a Move block to bring them into the play area and a Turn block if you want them spinning.
  4. To make them “collectible”, add a new script: Start on Bump → Hide. This makes the part disappear when Aquaman touches it.

[Insert screenshot of the trident part code here]

Step 4: The Final Piece and Scene Change

The last piece of the trident is special because collecting it wins the game.

  1. On the final trident part, use the same movement code as the others.
  2. For the collision code, use: Start on Bump → Go to Page 2.
  3. This will automatically transport the player to the victory scene once the final piece is collected.

Step 5: The Victory Scene

On the second page (Scene 2), we want to show Aquaman swimming happily with his fully assembled trident.

  1. Place Aquaman and the full trident image on the screen.
  2. Give the trident the exact same movement code (Joypad code) as Aquaman.
  3. This ensures that when you move Aquaman, the trident moves in perfect sync with him, making it look like he is holding it while he swims.

Troubleshooting/Tips

  • Avoid Accidental Collisions: The trident parts use the Start on Bump block, which means anything touching them will make them disappear. Ensure your background fish and sea animals move in areas where they won’t accidentally touch the trident parts before Aquaman does.
  • Colour Matching: If Aquaman isn’t moving, double-check that the letter colours in your Send Message blocks match the Start on Message blocks exactly (e.g., Orange triggers Up).
  • Timing: Use the Wait block to stagger the release of the trident parts so the game doesn’t feel too chaotic at the start.

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