CODE CREATIVE
SPACE SHOOTER
Good 'ol button mashing fun!
TASK #1
The "Space Shooter" program will present the user with a spaceship that can rotate to the left and right and shoot bullets that destroy incoming enemy robots.
The first task is to watch the introduction video below
to get an idea of what the project entails. An extension exercise here is to add Power Ups that upgrade the flower weapon of the spaceship.
After watching the video, be sure to
open up the "Starter Pack"
. Make sure you click on the remix button after Scratch opens up so that it saves on your account.
TASK #2
TASK:
Get the ship to rotate using the
"A"
and
"D"
keys.

HINT #1:
Use the
"When Key Pressed"
,
"Repeat Until Not"
,
"Key Pressed"
, and
"Turn Degrees"
blocks.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #3
TASK:
Add a robot at the edge of the screen and have it move towards the ship.

HINT #1:
Use the
"Hide/Show"
,
"Goto X/Y"
,
"Repeat"
,
"Point towards"
,
"Wait"
and
"Move"
blocks.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #4
TASK:
Clone the robot repeatedly and move towards the ship from all four sides.

HINT #1:
Use the
Repeat
,
Hide
,
Create Clone
,
When I Start as a Clone
, and the
Wait
blocks.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #5
TASK:
Program the ship to disappear if it is touching a robot.

HINT #1:
Use the
Forever
,
If
,
Touching
, and
Hide
blocks.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #6
TASK:
Have the ship fire the ‘flower’ when the space key is pressed.

HINT #1:
Use the
When Key Pressed
,
Broadcast
,
When I Receive
,
Goto x/y
,
Repeat
, and
Move Steps
blocks.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #6.5
TASK:
Keep track of the angle that the spaceship is facing.

HINT #1:
Use the
When Key Pressed
,
Change variable by
, and
Set variable to
blocks.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #7
TASK:
Keep track of the angle the ship is pointed at.

HINT #1:
Create a
variable ‘angle’
, use the
Change By
, and
Point in Direction
blocks.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #8
TASK:
Have the ship fire ‘flower’ in the angle the ship is pointing.

HINT #1:
Create a
variable ‘angle’
, use the
MOD
operator and use the
Change By
, and
Point in Direction
blocks.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #9
TASK:
Create your own block that makes the flowers disappear when they exit the screen.

HINT #1:
Use the
If
,
Touching
, and
Delete this Clone
blocks.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #10
TASK:
Use the If, Touching, Broadcast, and Delete this Clone blocks.

HINT #1:
Create a
variable ‘angle’
, use the
MOD
operator and use the
Change By
, and
Point in Direction
blocks.

CHECK UP:
Watch the video below to check that you completed the task.
CHALLENGES EXERCISES
  1. Create a ‘Power Up’ sprite that appears randomly and flies in a random path until it leaves the screen.

  2. Add an extra ‘flower’ each time a ‘Power Up’ is hit.

  3. Increase the speed the ‘flowers’ fire each time a ‘Power Up’ is hit.

  4. Add increasingly more difficult levels.

  5. Add a beginning/ending screen.

  6. Add cut scenes between levels.

  7. Add money that can buy ships(speed), guns(type and speed) and power ups(number of bullets) between levels.