ufo flyover -...

11
Camille McCue, PhD 2017 UFO Flyover Side-scrolling animation creates the illusion of a UFO hovering over a city.

Upload: truonghanh

Post on 30-Apr-2019

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: UFO Flyover - startupincubator.sitestartupincubator.site/uploads/3/4/8/1/34817887/ufo_flyover.pdfCamille McCue, PhD 2017 UFO Flyover Side-scrolling animation creates the illusion of

CamilleMcCue,PhD2017

UFO Flyover

Side-scrolling animation creates the illusion of a UFO hovering over a city.

Page 2: UFO Flyover - startupincubator.sitestartupincubator.site/uploads/3/4/8/1/34817887/ufo_flyover.pdfCamille McCue, PhD 2017 UFO Flyover Side-scrolling animation creates the illusion of

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.

Page 3: UFO Flyover - startupincubator.sitestartupincubator.site/uploads/3/4/8/1/34817887/ufo_flyover.pdfCamille McCue, PhD 2017 UFO Flyover Side-scrolling animation creates the illusion of

CamilleMcCue,PhD2017

UFO Flyover

Stage – Sounds

1

Choose sound from library, adding all three sounds

Page 4: UFO Flyover - startupincubator.sitestartupincubator.site/uploads/3/4/8/1/34817887/ufo_flyover.pdfCamille McCue, PhD 2017 UFO Flyover Side-scrolling animation creates the illusion of

CamilleMcCue,PhD2017

Stage – Backdrop

2

Page 5: UFO Flyover - startupincubator.sitestartupincubator.site/uploads/3/4/8/1/34817887/ufo_flyover.pdfCamille McCue, PhD 2017 UFO Flyover Side-scrolling animation creates the illusion of

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

Page 6: UFO Flyover - startupincubator.sitestartupincubator.site/uploads/3/4/8/1/34817887/ufo_flyover.pdfCamille McCue, PhD 2017 UFO Flyover Side-scrolling animation creates the illusion of

CamilleMcCue,PhD2017

UFO Sprite – Script

4

Page 7: UFO Flyover - startupincubator.sitestartupincubator.site/uploads/3/4/8/1/34817887/ufo_flyover.pdfCamille McCue, PhD 2017 UFO Flyover Side-scrolling animation creates the illusion of

CamilleMcCue,PhD2017

Building Sprite – Costume

UFO Flyover

5

Page 8: UFO Flyover - startupincubator.sitestartupincubator.site/uploads/3/4/8/1/34817887/ufo_flyover.pdfCamille McCue, PhD 2017 UFO Flyover Side-scrolling animation creates the illusion of

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

Page 9: UFO Flyover - startupincubator.sitestartupincubator.site/uploads/3/4/8/1/34817887/ufo_flyover.pdfCamille McCue, PhD 2017 UFO Flyover Side-scrolling animation creates the illusion of

CamilleMcCue,PhD2017

Stars Sprite – Script

UFO Flyover

7

Page 10: UFO Flyover - startupincubator.sitestartupincubator.site/uploads/3/4/8/1/34817887/ufo_flyover.pdfCamille McCue, PhD 2017 UFO Flyover Side-scrolling animation creates the illusion of

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)

Page 11: UFO Flyover - startupincubator.sitestartupincubator.site/uploads/3/4/8/1/34817887/ufo_flyover.pdfCamille McCue, PhD 2017 UFO Flyover Side-scrolling animation creates the illusion of

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).