ufo flyover -...
TRANSCRIPT
CamilleMcCue,PhD2017
UFO Flyover
Side-scrolling animation creates the illusion of a UFO hovering over a city.
CamilleMcCue,PhD2017
Code itInequalities and a forever loop enable building andstar sprites to constantly drift stage left. Add thesebuilding sprites from the Scratch library; then drawa few new sprites to look like star clusters. When thex-coordinate of each scrolling sprite reaches aminimum (lowest negative value), the sprite hides;it is then repositioned at the maximum positivevalue at screen right where it reappears (shows).Additionally, add a color change command to theeach sprite, making these sprites appear to twinkle.
Draw the costume for the alien spaceship spriteusing vector graphics. Code the spaceship to hovergently around the center of the stage, forevergliding up and then down slowly, but neverchanging its x-c00rdinate.
Include spacey, UFO sound effects for an alien flair!
Play ItStart the action by clicking the green flag.
CamilleMcCue,PhD2017
UFO Flyover
Stage – Sounds
1
Choose sound from library, adding all three sounds
CamilleMcCue,PhD2017
Stage – Backdrop
2
CamilleMcCue,PhD2017
UFO Sprite – Costume
UFO Flyover
3
Construct UFO from circles; fill with gradient of grayand white; use the Reshape tool to adjust UFO dome
CamilleMcCue,PhD2017
UFO Sprite – Script
4
CamilleMcCue,PhD2017
Building Sprite – Costume
UFO Flyover
5
CamilleMcCue,PhD2017
Building Sprite – Script
6
Copy and paste the first building sprite to create multiple buildings containing the same code (principle: reuse code); change the costume on each sprite
CamilleMcCue,PhD2017
Stars Sprite – Script
UFO Flyover
7
CamilleMcCue,PhD2017
Stars Sprite – Script
8
Copy and paste the first star cluster sprite to create multiple star clusters containing the same code (principle: reuse code)
CamilleMcCue,PhD2017
Extend It
How can portions of the code in this project bereused to create a Flappy Bird-style game? Considerthat the columns are like the buildings and stars.
What portions of the code will need to be rewritten?Consider that the bird will require up-down arrowkey control. Further, you will need to devise ascoring method (hint: because the bird neverchanges its x-coordinate, increase the score when acolumn moves past the bird without colliding).