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:
- Open ScratchJr and create a new project.
- Click on the "Backdrops" tab and add a new backdrop (e.g., a green hill).
- Resize the backdrop to fit your game's dimensions.
Creating Lily:
- Go to the "Sprites" tab and click on the "New Sprite" button.
- Choose a character that represents Lily (e.g., a cartoon girl).
- Resize the sprite to fit your game's dimensions.
Adding Platforms:
- Click on the "Backdrops" tab again and add new backdrops for each platform level.
- Use the "Paint" tool to draw platforms, enemies, and power-ups on each backdrop.
- Set the platform's y-coordinate (the vertical position) by dragging the sprite down or up.
Making Lily Jump:
- In the "Scripts" tab, click on the "New Script" button.
- Add a "When Flag Clicked" block to create an event when the user clicks the flag.
- Add a "Forever" loop and inside it, add a "Move 10 Steps" block (up or down) to make Lily jump.
Adding Gravity:
- Add a "Wait 0.5 Secs" block after the jump to simulate gravity (Lily will fall back down).
- Add another "Move 10 Steps" block (down) to move Lily back down to the platform.
Creating Enemies:
- Create a new sprite for each enemy (e.g., a cartoon monster).
- Set the enemy's x-coordinate (the horizontal position) by dragging it left or right.
- Add a "Forever" loop and inside it, add a "Move 5 Steps" block (left or right) to make the enemy move.
Adding Power-ups:
- Create a new sprite for each power-up (e.g., a star).
- Set the power-up's x-coordinate by dragging it left or right.
- Add a "Forever" loop and inside it, add a "Move 5 Steps" block (left or right) to make the power-up move.
Game Logic:
- 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.
- Add scorekeeping and lives using "Variables" and "Show" blocks.
Testing and Refining:
- Test your game by clicking on the flag and playing through each level.
- 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