Introduction to App Development

 

REALLY CHEESY AVOIDING GAME APP

Create a new Air Application for IOS or Android

Find 2 different angry bird images, one with on open beak and one with a closed beak (or any character you like with 2 different positions)

 

 

Step 2 - Use the images to create a movie clip so that it appears as if the mouth of the bird is opening and closing

 

Now set the properties of the movie clip for actionscript 3.0

Remove the movie clip from the stage.  This time we will add them through code.

Step 3 - Using addchild to create instances of the AngryBird. 

Just create 2 for now we will modify this later with Arrays. You could also create different birds!

Step 4 - Move the birds down the screen (The +2 and +3 are the speed of the birds)

Step 5 -  Your turn!!! Have the birds start over at the top when they reach the bottom.

HINT:  In the function use an if statement to check

if (AngryBird1_mc.y > than some number)
{

// reset y to -25

}

 

 

Step 6 - Randomly generate the x coordinate of the AngryBird instead of setting them to a specific number

AngryBird1_mc.x =

// change this at the start and add when the bird spawns at the top

 

Step 7 - Randomly generate the speed of the birds.

a. Create 2 variables (randomSpeed1) and (randomSpeed2) at the top of your program

b. Calculate the starting value of each

randomSpeed1= Math.random()* 30 + 5 (30 is max speed, 5 is min speed)

c. Change the fall speed in the function to the random variable


AngryBird1_mc.y += randomSpeed1

d. Recalculate the random speed when you respawn

randomSpeed1= Math.random()* 30 + 5

Step 8  -  Add a Character that will try to avoid the birds. (Use code)

 

 

 

Use the Keyboard to Move the Pig

 

Step 8- Checking for collisions and end the game.

 

 

 

Step 9 - Add Sound

SOUND
var mySound:Sound = new MyFavSong();
mySound.play();
Background Music

 

Step 10 - Add a scoring system(time elapsed), lives, sound.

Using a Timer for Time Elapsed

 

 

 

 

Step 11 - Add a second level that uses arrays to create and hittest the birds

 

Using arrays to make multiple birds

 

Your Turn

Create EventListeners and functions for the following:

1. Speed

Create a RandomSpeed array to change the speed of each bird.
var RandomSpeed:Array = new Array();
Use a for loop to create the RandomSpeed for each bird
Hint: In a for loop RandomSpeed[i] = formula

2. Falling

Use a for loop to make the birds fall at the RandomSpeed

3. Reset

Use a for loop to reset the birds back to the top when they exit at the bottom.

 

This time use the Mouse to move the Pig

 

You may want to hide the mouse at the start

 

 

 

Step 11 - Create a function that uses a for loop to hittest the pig and the bird

 

Add a Scoring System and Lives

 

Your Turn

1. An Intro Screen

2. A Menu Screen that allows you to pick your Level

3.Game Over Screen with a Play Again Option

4. University students 1 additional level-It must be completely different than level 2, use arrays and have some purpose or target other than just avoiding.

5. An Icon for your App


Submitting your Work

 

Post the following:
Documented Code
.fla
.swf

Evaluation Sheet

 

Optional: Load your app onto your device or one of the schools.