Crab Game

This guide has been design to help you create a simple game. Follow these step-by-step instructions to create an interesting set of effects.

Stage 1 - Making the Background

Start a new Scratch project - "File" and then "New"

Click on the stage ...

Click on "Backgrounds" then "import"...

... choose the "Nature" folder ...

... then the "beach-malibu" background. Press OK.

You can delete the white background.

Stage 2 - Making "Anna"

Click on "Choose new sprite from file"...

... choose the "Peaople" folder ...

... then choose "anna-1". Press "OK".

You should delete the cat; right click on it and select "Delete".

Stage 3 - Making "Anna" move

Now add the following blocks of code (threads) to Anna.

Drag "When space key pressed" into the script area and change "Space" to be "Up arow".

Add the two code blocks "point in direction" (and change the direction to 0 - up) and "move 10 steps".

Add similar code blocks for the other three directions; left. right and down.

Make sure that you change the settings for "Anna" so that she does not rotate.

Stage 4 - Making the crab

Add the crab sprite to the game. Click on "Choose a new sprite from file"...

... the go to the "Animals" folder...

... and the chose "crab1-a". Press "OK".

Resize the crab sprite by right clicking on the crab and using the slider to make the crab smaller.

Stage 5 - Keeping score

Now make a variable for the crab to keep score. Click on "Variables" then "Make a variable" then type in "score" then press "OK".

Now add this code block to the crab and you should be able to try and dodge it on the beach.

Save your project as "Crab game".

Stage 6 - Extension

Use the additional costumes for Anna and the crab to animate these characters. Make sure that "Anna" jumps up and down when she is "nipped" by the crab. Hint: Anna has 3 costumes.

 

Recent Posts

July 24

Repairing a hyperspace window

Phasellus quam turpis, feugiat sit amet ornare in, hendrerit in lectus semper mod quisturpis nisi consequat etiam lorem. Phasellus quam turpis, feugiat et sit amet ornare in, hendrerit in lectus semper mod quis eget mi dolore.

July 18

Adventuring with a knee injury

Phasellus quam turpis, feugiat sit amet ornare in, hendrerit in lectus semper mod quisturpis nisi consequat etiam lorem. Phasellus quam turpis, feugiat et sit amet ornare in, hendrerit in lectus semper mod quis eget mi dolore.

July 14

Preparing for Y2K38

Phasellus quam turpis, feugiat sit amet ornare in, hendrerit in lectus semper mod quisturpis nisi consequat etiam lorem. Phasellus quam turpis, feugiat et sit amet ornare in, hendrerit in lectus semper mod quis eget mi dolore.

Spotlight

Neural Implants

The pros and cons. Mostly cons.

Phasellus quam turpis, feugiat sit amet ornare in, hendrerit in lectus semper mod quisturpis nisi consequat ornare in, hendrerit in lectus semper mod quis eget mi quat etiam lorem. Phasellus quam turpis, feugiat sed et lorem ipsum dolor consequat dolor feugiat sed et tempus consequat etiam.

Lorem ipsum dolor quam turpis, feugiat sit amet ornare in, hendrerit in lectus semper mod quisturpis nisi consequat etiam lorem sed amet quam turpis.