Create & Learn
Background

Try Crabby and Turtle's Ocean Rush for fun Scratch Project!

Crabby and Turtle's Ocean Rush

Platform: Scratch
Level: beginner

In this interactive race, the player controls the Turtle with the Spacebar while the Crab is automated using a repeat loop with random steps. To slow down the Crab, the player can press the 'S' key to make the Turtle slide forward. If the sliding Turtle touches the Crab, a conditional block plays a sliding sound and temporarily pauses the Crab. Both characters use simple motion blocks to head towards the sea, and the game uses an 'if touching edge' conditional to declare the winner with a victory cheer.

Backdrop And Sprite Images For The Project

background
background
1280 x 896
Turtle
Turtle
1024 x 1024
Crab
Crab
1024 x 1024

Crabby and Turtle's Ocean Rush: Solution Outline

These are the high level steps to create this project. Try to create the project on your own first as much as possible, before checking the detailed solution samples below.

  1. Set up the Stage and starting positions for Turtle and Crab.
  2. Program the Turtle to move and slide.
  3. Automate the Crab with random movement and a collision check.
  4. Detect the winner and celebrate.

Crabby and Turtle's Ocean Rush Sample Solutions

This section provides detailed, step-by-step instructions on how to build the project. There are many ways to create a project, so feel free to explore different approaches. Please note that these instructions are Al-generated, so errors may occur and the coding blocks may not map to Scratch exactly. But it should serve as very valuable references. Stay attentive as you follow along, and enjoy!

Set up the Stage and starting positions for Turtle and Crab.

Choose an underwater or beach backdrop from the Scratch library. Add the 'Turtle' and 'Crab' sprites. Shrink them down so they fit comfortably on the screen, and place them on the left side to start the race.

Program the Turtle to move and slide.

Make the Turtle move forward slightly when the player presses the Spacebar. To add a sliding mechanic, use the 'S' key. When pressed, the Turtle switches to a sliding costume, moves forward quickly, plays a sound, and pauses briefly before switching back.

Automate the Crab with random movement and a collision check.

The Crab should run automatically towards the sea. Use a repeat until loop that moves the Crab forward by a random number of steps on each iteration. Inside the loop, add a conditional block: if the Crab touches the Turtle, play a collision sound and pause the Crab's movement to let the Turtle catch up.

Detect the winner and celebrate.

Create a mechanism to detect when either character reaches the right side of the screen (the edge). Use a forever loop with an 'if touching edge' condition for each sprite. When a sprite touches the edge, make it say a victory message, play a cheering sound, and stop the game.

Common Potential Issues in Crabby and Turtle's Ocean Rush Project

It is common to have bugs in the code. Here are some of issues you might run into.

  • The Crab starting position is too close to the left edge, causing it to trigger the 'touching edge' condition instantly at the start.
  • The Turtle can slide continuously without any delay, making it too easy to win; this can be fixed by adding a cooldown timer block.
  • Both characters might win at the exact same time if their speeds are not calibrated, so the winner check needs a brief delay or specific positioning check.

Extra Challenges For Crabby and Turtle's Ocean Rush

  • Animate the Turtle and Crab by swapping their costumes repeatedly during movement to make them look like they are swimming and crawling.
  • Add a golden starfish pickup in the middle of the track that boosts the speed of whoever touches it first.

Learn Scratch Coding Skills

Enroll your child in award-winning online Scratch coding classes led live by experts and designed by professionals from Google, Stanford, and MIT.

Scratch Junior
Scratch Junior

Grades K-2

Start coding with ScratchJr, and make interactive stories and games
Scratch Ninja
Free Intro
Scratch Ninja

Grades 2-6

Code games and animations with Scratch coding, beginner to advanced levels
Accelerated Scratch
Free Intro
Accelerated Scratch

Grades 5-9

Fast-paced introduction to Scratch coding: build games, stories, and animations
Intermediate Game Building with Scratch
Intermediate Game Building with Scratch

Grades 3-6

Code a new fun Scratch game every week

Explore More Fun Scratch Practice

The challenge continues: Enjoy even more Scratch tutorials dreamed up by other students or use your imagination to make your own!

Develop My Own Idea

Find Best Classes For Your Child

Explore your child's grade level to find computer science classes and learning pathways that set your student up for success.