Sorry Charlie

Sorry Charlie is a game program that will be built by you. The main character is a shark
called Charlie which is controlled by the mouse and wanders around the screen eating fish.
Yellow fish taste nice but eating a red fish will give the Charlie indigestion.
Save your finished game in a folder named "Charlie_YourName" and place in my Network
Teacher Dropbox also send it to me as an email attachment.
You can play the game by Clicking Here.

1

Part 1

The basic principles behind of this type of game can be used to make many different
games simply by changing the background and the graphics of the sprites. A game set in
space with a rocket chasing astronauts and aliens would be simple to create using
Sorry
Charlie
as a base.

We can build the game from scratch in simple stages:

  1. Create the shark sprite and control movement with the mouse.
  2. Create the yellow fish sprite with random movement.
  3. Change the shark costume when touching the yellow fish so it looks as though it is
    eating the fish.
  4. Make the yellow fish disappear when it is eaten.
  5. Copy the yellow fish sprite so that there are several fish in the game.
  6. Add a red fish and the behavior for the shark to get indigestion.

Shark Costume

Select the default scratch cat sprite and change the costume to look like a shark by
pressing the
Import button on the Costumes tab. Select shark-a from the animals folder
and then delete the other costumes by pressing the
delete buttons. You should also
rename the sprite to
shark.

2

Mouse-following Shark

Creating sprite behavior to follow the mouse is made easy by the point towards block
available in the
Motions tab. Select the block and change the setting to show the
mouse-pointer
as shown below. A forever loop taken from the Controls blocks is used to
control the movement and the shark first points towards the mouse and then
moves 5
steps
. You can control the speed of the shark by changing this setting to speed up or
slow down the action. It is good practice to always add a
wait block whenever you have a
forever control loop to make sure that all sprites can take their turn. Finally, you can
attach the forever loop to the
green flag so that the shark starts moving when the game
starts. Notice also that the initial
size of the shark is set here also.

3

Random Movement Sprite

The yellow fish sprites move randomly around the screen. Create the sprite by pressing
the
Choose new sprite from file button.

4

Choose the fish3 image from the animals folder and remember to name the sprite
yellowfish.

5

Random movement is created by using a forever loop to make the fish move at a
constant speed and the
random block from the Numbers section to turn the sprite a little
with each loop as shown below.

6

The game now has two sprites which move around the screen. The shark sprite follows
the mouse and the yellowfish sprite moves randomly around the screen.

Show the Shark eating the Yellowfish

Import a second costume for the shark sprite using the shark-b image from the animals
folder. We can now alter the forever loop controlling the shark's behavior and change the
costume whenever the shark is actually touching a yellow fish by using the
touching
sensor
inside an if-else control block. The shark turns and opens it's mouth if it is
touching the yellowfish sprite.

We also tidy up a feature of the mouse following behavior which makes the shark flash
by only moving towards the mouse if we are more than a short distance away.

7

Actually Eat the Yellow Fish and increase the Score

Make a variable to show the score and make sure that it is made available to all sprites.
Select the
stage and add a control block to set the score to zero each time the game starts.

8

Now add an if control block inside the forever loop of the yellowfish sprite using the
touching sensor block
to get the sprite eaten if it is touching the shark sprite. The
behavior plays a
sound and increments the score variable before using the hide block
from the Looks blocks to disappear from the game. The corresponding
show block is
added at the start of the game to reset the game when the green flag is clicked.

9

The following blocks allow the yellowfish sprite to to appear from the left or the right of
the screen when the game starts and also when it has just been eaten. The behavior
waits up to five seconds and then places the sprite randomly on the left or the right of
the screen by exploiting the fact the the coordinates of the screen vary from -240 to +240
on the
x-axis and -90 to +90 on the y-axis. This behavior is added when the game starts
and just after the sprite has been eaten.

11

The behavior of the yellowfish sprite is now complete but we want to have more than one
fish in the game. We can now export the sprite and import three more. Select the sprite
and export it into your local folder and then use the
Choose new sprite from file (see above) button to import three copies of the sprite (4 yellowfish) into the game.

12

You will just have to edit the script of each new yellowfish sprite to set the if touching
shark
control block to specify the shark sprite. You may also need to save and reopen the
project for the scoring to work with the new sprites.

Create the Red Fish sprite

The game is nearly finished now. Import another yellowfish sprite but this time change the
name of the sprite to
redfish and the costume to the fish4 image in the animals folder.
Remember to set the sprite to the shark in the if
touching control block. The behavior
remains the same as the Yellow fish as we will be altering the shark's behavior when it
touches the red fish.

Import the shark-c costume from the animals folder into the shark sprite and add the
following behavior inside the forever loop which will play a drum and change the colors of
the shark before setting the score to zero and putting the costume back to normal.

13

Change the Background

The final step is to select the stage and import the underwater image from the nature
folder as the background. That wasn't so hard and now have one cool game that can be transformed into many others.

Did you notice Charlie doesn't always open his mouth to eat? See if
you can fix this small
error (in the touching shark block) of the program before you send it in to me.

Remember to save your finished game in a folder named "Charlie_YourName" and place in
my Network Teacher Dropbox also send it to me as an email attachment.

Assessment Rubric
Working, error free program = 100 pts.
Working but the Yellowfish error not removed = 90 pts.
Working program with Yellowfish and other minor error remaining = 80 pts.
Working but not all components are present = 70 pts.
Program not working and not all components present = 60 pts.
Program not working and only 2 components present = 50 pts.
Program not working and only 1 component present = 40 pts.
No attempt made = 0 pts.

 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 

Part 2

Charlie_2

Now it is time to give our game a beginning and ending.
Add an introduction page that includes what the game is about and instructions on how
to play the game.
Then tell the user to press the S key to start the game.

The way the game is now there is no ending. We can just eat all day long, but let’s setup
the game so that the game comes to a conclusion.
Make a limit of 3 red fish eaten before stopping the game. We will make this how many
lives Charlie has. He will have 3 lives to start with and countdown 1 each time he eats a
red fish until he has no more.
Add a small window next to fish eaten that shows how many lives Charlie has left.

Make an ending page that gives a score and how well the game was played. In your own
words display that if they have eaten more than 20 fish eaten tell them that they did a
good job if less tell them not bad but try again.

Save your finished game in a folder named "Charlie2_YourName" and place in my
Teacher Dropbox also send it to me as an attachment.

 

Assessment Rubric
Working, error free program = 100 pts.
Working but the introduction or ending page has error = 90 pts.
Working program but score window has error = 80 pts.
Working but not all components are present = 70 pts.
Program not working and not all components present = 60 pts.
Program not working and only 2 components present = 50 pts.
Program not working and only 1 component present = 40 pts.
No attempt made = 0 pts.

 

 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 

Let's see what you can do with this seed!

Bonus - Your next project is to use this seed and show me what you can do with it.
Change the background, change the sprits, make your own sprits or add new
features.  
Come up with your own new game.