dogandcrab

by redware
  scripts
  sprites
See inside
Notes and Credits

A quick game to copy with two sprites and simple mouse following movement.

Use the mouse to follow the crab and watch the crab run away.

We have a video tutorial showing how to make this game as part of our lesson plan at www.redware.com/scratch/dogandcrab.html.

The elements of making a simple game like this are:

1. Put a green flag contol event on each sprite to set up the poistions at the beginning of the game. Here the dog goes to the middle and the crab is randomly placed on the stage.

2. Add a forever loop on the main control sprite to control movement. In this case the dog follows the mouse.

3. Add a sensing component into the forever loop to work out when things happen. In this case when the dog touches the crab.

4. Do some stuff when the dog touches the crab but also broadcast a message so the other sprites (or the stage) can also react.

5. Add a receive event onto the crab so it runs away when the dog broadcasts a message to say that it has touched the crab.
Messaging between sprites is better than lots of sensing on each sprite.

6. Add a background and voila - c'est finis (it is finished).

BTW my wife Kathy (42) helped me with this.

Shared: 3 Feb 2008 Modified: 3 Feb 2008
Favorite this project 6
Love this project 1
Total views 1898
View the remix tree  27
  
More projects by redware