Coding Materials

Jump through planes game with Scratch

This Scratch guide for a game with Scratch has been a free product in my TPT shop for a while now. Users seems to like it, and now I’m bringing it for all of you to use with your students or family. We are starting from the default Scratch project.

Remove Sprite1 (the cat). Draw a new sprite that has single-colored shoes. You can use a rectangle for that.

Remove the cat by right clicking it and selecting delete. Then click new sprite (white cat with + in blue circle.)

Select some clear color for fill and set outline to 0.

Draw simple rectangle shaped “shoes.”

And the rest of your sprite:

Add green soil and planes to the backdrop

Select backdrop1 and go to the backdrops tab.

Select line tool and green color. Adjust line width. Here it’s 20 but it can be even more. 

And draw your backdrop:

Now let’s start coding the player sprite. Make player go down couple coordinate units whenever shoes are not touching green color.

You’ll need color __ is touching __? from sensing.

Click the first color on that block and select color picking tool. (See arrows in the adjacent picture.)

Then, move your mouse over the player’s shoes and pick their color. 

After that, pick the green color in a similar way. Put this block inside not block from operators. 

Here is the whole code:

Test your code! Now add movement to left and right from arrow keys. 

This is quite straightforward:

Using different numbers will affect speed.

Now test your code again! You can still drag your player with your mouse, that’s good for testing.  We can remove that feature when the game is otherwise ready. 

Make code for jumping. When the space is pressed, the player should jump so high that he/she can land on planes. To be more realistic add an if block to check that player jumps only when he/she is standing on something.

You can use slightly different values. However, the number in change y by must be significantly greater than y’s decrease in the other loop. If not so, they will reverse each other’s effect and the player is not jumping properly.

Finally, make your player not draggable
And we’re done!

Another game for Scratch: Super easy labyrinth game with Scratch

By thebrigh

Hi! My name is Jenni and I used to be a math teacher in Finland. I have a master's degree in math and also studies in computer science and pedagogy. Talented students are close to my heart, hence the name of the site. But I also might write about other stuff.

Leave a Reply

Your email address will not be published. Required fields are marked *