Creating a Simple Platformer in Scratch Jr

Last updated: 8/9/2023
Creating a Simple Platformer in Scratch Jr

What a great idea!

ScratchJr is an amazing platform for kids to learn programming concepts and create fun games. Here's a step-by-step guide on how to create a simple platformer game in ScratchJr:

Game Concept: Our game will be called "Lily's Adventure." Lily, the main character, will need to navigate through a world filled with obstacles like platforms, enemies, and power-ups.

Setting up the Stage:

  1. Open ScratchJr and create a new project.
  2. Click on the "Backdrops" tab and add a new backdrop (e.g., a green hill).
  3. Resize the backdrop to fit your game's dimensions.

Creating Lily:

  1. Go to the "Sprites" tab and click on the "New Sprite" button.
  2. Choose a character that represents Lily (e.g., a cartoon girl).
  3. Resize the sprite to fit your game's dimensions.

Adding Platforms:

  1. Click on the "Backdrops" tab again and add new backdrops for each platform level.
  2. Use the "Paint" tool to draw platforms, enemies, and power-ups on each backdrop.
  3. Set the platform's y-coordinate (the vertical position) by dragging the sprite down or up.

Making Lily Jump:

  1. In the "Scripts" tab, click on the "New Script" button.
  2. Add a "When Flag Clicked" block to create an event when the user clicks the flag.
  3. Add a "Forever" loop and inside it, add a "Move 10 Steps" block (up or down) to make Lily jump.

Adding Gravity:

  1. Add a "Wait 0.5 Secs" block after the jump to simulate gravity (Lily will fall back down).
  2. Add another "Move 10 Steps" block (down) to move Lily back down to the platform.

Creating Enemies:

  1. Create a new sprite for each enemy (e.g., a cartoon monster).
  2. Set the enemy's x-coordinate (the horizontal position) by dragging it left or right.
  3. Add a "Forever" loop and inside it, add a "Move 5 Steps" block (left or right) to make the enemy move.

Adding Power-ups:

  1. Create a new sprite for each power-up (e.g., a star).
  2. Set the power-up's x-coordinate by dragging it left or right.
  3. Add a "Forever" loop and inside it, add a "Move 5 Steps" block (left or right) to make the power-up move.

Game Logic:

  1. Use "If-Then" blocks to create game logic:
    • If Lily touches an enemy, reset her position to the starting point.
    • If Lily touches a power-up, give her an extra life or boost.
  2. Add scorekeeping and lives using "Variables" and "Show" blocks.

Testing and Refining:

  1. Test your game by clicking on the flag and playing through each level.
  2. Refine your game by adjusting speeds, adding more levels, and tweaking game logic as needed.

And that's it! You now have a simple platformer game in ScratchJr. Keep exploring and experimenting to create even more amazing games!

Thank you for reading! If you have any questions, drop us an email: workbookscratchjr@gmail.com