Flashback

This course explores the use of programming as a tool to sculpt interactive experiences, in the context of Macromedia Flash's Actionscript programming language. Students will focus on core programming concepts, and will use these basic concepts to prototype personal projects. While the focus of the course is on developing with Actionscript, the concepts learned are common to all programming languages.

Wednesday, February 22, 2006

Week 5

Assignment 5

pong game (class 2) with FUNCTIONS
pong game FLA with Functions

pseudo-code for midterm

PONG/ Bullet Game/1player:
1st screen: 3 Buttons: Level 1 - Level 2 - Level 3 / player chooses
LEVEL 1: objective kill MickeyMouse / avoid 5 bullets / speed 15 start of ball
LEVEL 2: objective kill bozo Clown/avoid 8 bullets /ball smaller/speed start 18
LEVEL 3: objective kill ? / avoid 10 bullets/ ball smaller than level 2/ speed at 20

LEVEL 1
- paddle: Mr T
move up and down only, with the mouse (mouse Y)

[zball]
-starts at base of MM
-ball is ‘released’ when mouse clicks on ‘start’
-when ball hits MrT, changes direction
-when ball hits MrT, speed of zball goes faster
-if ball hits Mickey Mouse, Mickey Mouse release a bullet

[Mickey Mouse]:
-moves up and down (other side of screen) at same speed as ball speed
-when Mickey Mouse reaches top or bottom of stage, then change direction
-when zball hits (hitTest) Mr T, Mickey Mouse speed increase
- zball collides with (hit test), Mickey Mouse, fires a bullet (attachMovie)

[bullet]
-attached by Mickey Mouse, when ball collides with Mickey Mouse, Mickey Mouse releases bullet
- need a counter for num bullets created so far
continuously (onEnterFrame):
- moves up at a set speed
- checks location, removes itself at left of screen (removeMovieClip) , counter evadeBullet ++
-if counter evadeBullet > 5, then Mickey Mouse dies (gotoPlay frame 2 of Mikey Mouse Instance) and go to LEVEL 2 (gotoPlay frame2 of level intance)
- checks for a collision Mr T (hitTest)
- if hitTest with Mr T, Mr T dies (gotoPlay frame 2- Mr on back, dying, fall down to bottom of screen) and bullet removes from stage(removeMovieClip)
-display text “you loose” try again? ”
-display button YES – if yes , gotoPlay frame 1?
-display button NO -

[score1/ zball and bullets]
-score counter ++ for zball collison with Mr T
-score linked to Hittest score+1 when zball hits Mr T
-score +5 when Mr T avoids bullet (if bullet_y < Mr. T_y, then score +5)
-score=0 if zball hits right side of stage

0 Comments:

Post a Comment

<< Home