TASK #1
The "Density" program will start with a sprite of a Blackhole and the
goal is to eat the raining stars and planets.
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 will add more dimension to the game.
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:
Have the ‘black_hole’ sprite start in the middle of the screen and set it’s size to 5%.
HINT #1:
Use the "Goto"
and "Set Size"
blocks.
CHECK UP:
Watch the video below to check that you completed the task.
TASK #3
TASK:
Get the ‘black_hole’ sprite to move using the keys ‘WASD’.
HINT #1:
Use "NOT"
operator and the "When Key Pressed"
,
"Repeat Until"
, "Key Pressed"
and
"Change X/Y"
blocks.
CHECK UP:
Watch the video below to check that you completed the task.
TASK #4
TASK:
Have the earth sprite fall from the top to the bottom of the screen at a slow speed.
HINT #1:
Use the "Set Size"
,
"Go to X/Y"
, "Repeat"
, and
"Change Y By"
blocks.
CHECK UP:
Watch the video below to check that you completed the task.
TASK #5
TASK:
Create a clone of the earth sprite
that appears every 0.1 seconds and falls from the top of the screen starting at a random x location..
HINT #1:
Use the "Hide/Show"
, "Wait"
,
"Create Clone"
, "Forever"
,
"When I Start as Clone"
, and "Pick Random"
blocks.
CHECK UP:
Watch the video below to check that you completed the task.
TASK #6
TASK:
Have the clones disappear when they reach the bottom of the screen.
HINT #1:
Use the "EQUALS"
operator and "If"
,
"Set Y Position"
and "Delete this Clone"
blocks.
CHECK UP:
Watch the video below to check that you completed the task.
TASK #7
TASK:
Create clones of the planet and sun sprites, but have the planets appear every 0.8 seconds and the sun appear every 2 seconds.
HINT #1:
None.
CHECK UP:
Watch the video below to check that you completed the task.
TASK #8
TASK:
Create a variable called ‘density’ and initialize its value to zero. Also, make the 'density' of the black_hole go up if it touches the saturn or the sun.
HINT #1:
Use "Make Variable"
and
the "Set Variable To"
blocks.
CHECK UP:
Watch the video below to check that you completed the task.
TASK #9
TASK:
Change the value of density by 1 if the 'black_hole'
touches the earth sprite, or 3 if it touches the saturn or 7 if it touches the sun. Also, make sure the saturn and sun disappear if touching the earth.
HINT #1:
Use the "Change Variable By"
block.
CHECK UP:
Watch the video below to check that you completed the task.
TASK #10
TASK:
Make the size of the 'black_hole'
the square root of its density.
HINT #1:
Use the "Set Size To"
,
"Square Root"
and
"Density Variable"
blocks.
CHECK UP:
Watch the video below to check that you completed the task.
CHALLENGES EXERCISES
- Create a beginning and ending screen.
- Add sound effects.
- Make the gameplay harder by slowing down the 'black_hole' as its density goes up.
- Animate the 'black_hole' when it eats an object.
- Create a 2 player version.
- Add an ending animation where one 'black_hole' grows and eats everything upon winning.
- Create power ups: faster, double density, 0.5 density for opponent, double size black_hole, double sized planets.