Tanada Logo
Super Mario Scratch Game Instructions

Scratch Game Instructions: Super Mario Adventure

Block Color Guide

Events
Control
Motion
Looks
Sensing
Variables
Sound
Operators

🔍 HOW TO READ NESTED BLOCKS 🔍

When blocks are INSIDE other blocks, they will be:

This helps you see which blocks go inside loops and if-then statements!

Step 1: Set Up Mario and Make Him Move (10 minutes)

1
Choose a Mario-like sprite. (In the example, Giga was selected, and a duplicate of Giga walk2 was made and flipped to show her walking to the left.)
Choose a Sprite button
2
Add these blocks to make Mario move left and right:
when green flag clicked
FOREVER LOOP forever
INSIDE FOREVER
IF-THEN if key right arrow pressed then
INSIDE IF-THEN change x by 5 switch costume to [mario-right]
IF-THEN if key left arrow pressed then
INSIDE IF-THEN change x by -5 switch costume to [mario-left]
3
Now let's add jumping with the up arrow key:
when green flag clicked
FOREVER LOOP forever
INSIDE FOREVER
IF-THEN if key up arrow pressed then
INSIDE IF-THEN change y by 70 wait 0.3 seconds glide .3 secs to x: x position, y -40

Where to find the blocks:

Events blocks are YELLOW - Look for them on the left side

Control blocks are ORANGE - Look for them on the left side

Motion blocks are BLUE - Look for them on the left side

Sensing blocks are LIGHT BLUE - Look for them on the left side

Looks blocks are PURPLE - Look for them on the left side

4
Test your Mario by clicking the green flag!
Green Flag button
Tip: If Mario moves too fast or too slow, you can change the numbers in "change x by" and "change y by" blocks. Smaller numbers make him move slower, larger numbers make him move faster.

Step 2: Add Coins to Collect (10 minutes)

1
Choose a coin sprite. (The example uses a Star.)
Choose a Sprite button
2
Create a Score variable: (click Variable, Make a Variable button, type "Score", check "For all sprites", OK)
3
Add these blocks to the coin sprite:
when green flag clicked set Score to 0 go to x: 200 y: 0
FOREVER LOOP forever
INSIDE FOREVER change x by -3
IF-THEN if touching [Mario] then
INSIDE IF-THEN change Score by 1 play sound [coin or collect] go to x: 200 y: (pick random 200 to -40)
IF-THEN if x position < -240 then
INSIDE IF-THEN go to x: 200 y: (pick random 200 to -40)

Where to find the blocks:

Variables blocks are ORANGE - Click "Make a Variable" first

Sound blocks are PINK - Look for them on the left side

Operators blocks are GREEN - Look for them on the left side

Tip: You can add more coins by duplicating the coin sprite (right-click on the sprite and select "duplicate"). Each coin will follow the same rules!

Step 3: Add Goomba (Shark) Enemies (10 minutes)

1
Choose a Goomba-like sprite (or any enemy character). In the example, shark2-b2 was duplicated then flipped to face left.
Choose a Sprite button
2
Add these blocks to make the Goomba move:
when green flag clicked hide set Score to 0 wait 0.5 seconds show go to x: 200 y: -40
FOREVER LOOP forever
INSIDE FOREVER change x by -5
IF-THEN if x position < -240 then
INSIDE IF-THEN go to x: 200 y: -40
3
Now, let's make Mario lose points if he touches the Goomba from the side, but defeat the Goomba if he jumps on it:
when green flag clicked
FOREVER LOOP forever
INSIDE FOREVER
IF-THEN if touching [Mario] then
INSIDE IF-THEN
IF-THEN-ELSE if [y position] of [Mario] > (y position + 0) then
INSIDE IF (JUMPED ON) change Score by 2 play sound [collect] go to x: 200 y: -40
else
INSIDE ELSE (HIT FROM SIDE) change Score by -2 play sound [Bite] wait 1 seconds
Tip: The Goomba checks if Mario's y-position is above it to determine if Mario jumped on top of it. You can adjust the "+10" value if needed to make it easier or harder to defeat the Goomba.

Step 4: Add a Timer and Final Touches (5 minutes)

1
Create a Timer variable:
Create a Timer variable: (click Variable, Make a Variable button, type "Timer", check "For all sprites", OK)
2
Add these blocks to the Mario sprite:
when green flag clicked set Timer to 30
REPEAT UNTIL LOOP repeat until Timer = 0
INSIDE REPEAT UNTIL change Timer by -1 wait 1 seconds
stop all
3
Add a Mario-style background:

Click on the Stage in the sprite list (bottom right)

Click the "Backdrops" tab at the top

Click "Choose a Backdrop" and find a sky or outdoor background

4
Optional: Add Mario-style music!
when green flag clicked play sound [mario theme] until done
5
Test your complete game! How many coins can you collect and Goombas can you defeat in 30 seconds?
Tip: Challenge yourself! Can you add more features like power-up mushrooms that make Mario bigger or give him special abilities?

Bonus Challenge (if time permits)

If you finish early, try one of these challenges:

Congratulations!

You've created an amazing Super Mario game! You used:

Events blocks Control blocks Motion blocks Sensing blocks Variables blocks Operators blocks

You're now a Mario coding expert! What adventure will you program next?

Here is the link to the Scratch Mario Example