2. AGENDA
Syllabus Timeline
Comments about Mid-Term
Time-based Animation
Air Raid - Shooting Games
Paddle Ball - Bouncing Games
Lab
Monday, March 30, 2009 2
3. SYLLABUS TIMELINE
I should have a design document from each team tonight
Two more lecture periods
April 6 - Word Games
April 13 - Trivia Games
4 more labs, including tonight
Projects/Presentations on April 27
No class meeting on May 4; Reflection Paper due via Digital
Dropbox or email
Monday, March 30, 2009 3
4. MIDTERM COMMENTS
Worth 20% of your grade for the course
Approx half opted for take-home version of Part 2
Scores: 100 - 4 93 - 1
99 - 1 91 - 1
High: 100
98 - 4 90 - 1
Low: 80 97 - 1 89 - 1
96 - 1 80 - 2
Mean: 94.6 95 - 3
Median: 96.5
No one is trending below an A- for the course
Monday, March 30, 2009 4
5. MIDTERM PART-2
I saw at least 3 different ways to do this in ActionScript
If you followed the rubric, you earned at least 75% credit,
even if the Flash movie didn’t run correctly
Examples of button navigation posted on Blackboard
Week 4: stopAndPlayMC_Final.fla
Week 5: inputTextReturn.fla
Let’s take a look...
Monday, March 30, 2009 5
6. TIME-BASED ANIMATION
Rosenzweig Chapter 5 (example given in AnimationTest.fla)
Basic premise is to move objects at a consistent rate
regardless of Flash player performance
Means keeping track of the difference in time between
frames
This is accomplished using the flash.utils.getTimer class
The getTimer function provides time in milliseconds
(i.e., 1000 mS = 1 Second)
Monday, March 30, 2009 6
7. AIR RAID GAME
The project game file AirRaid.fla contains 3 movie clips:
Airplane - 6 frames; 5 aircraft plus an explosion
AAGun - 1 frame; image is moved horizontally using left
and right arrow keys
Bullet - 1 frame; bullets move horizontally, triggered by
space bar
Game movie contains same three frame layout (into, play,
gameover), scripts and buttons used in Deduction Game
Monday, March 30, 2009 7
8. AIR RAID GAME CLASSES
Game uses 4 classes:
AirRaid.as - document class contains all game logic to
create initial objects, check for collisions, and handle
scoring
Airplane.as - constructor class takes 3 parameters: side (left
or right), speed, and altitude
AAGun.as - left or right movement of the gun movie clip
using keyboard event listeners for detection of right and
left arrow keys
Bullet.as - similar to airplane class accept speed is applied
vertically instead of horizontally
Monday, March 30, 2009 8
9. PADDLE BALL GAME
The same basic design arrangement as Air Raid and
Deduction games including intro, play, and gameover frames
in PaddleBall.fla
There is a single document class file, PaddleBall.as; there is
no constructor function as the game waits for the second
frame, to start
Difference in variables is the need to track velocity which is
a combination of speed and direction
Monday, March 30, 2009 9
10. PADDLE BALL GAME
Arrays are used to keep track of the bricks
Collision detection is more complicated as the ball must
detect collisions with the bricks, paddle and the three walls,
and respond appropriately
Possible mods to this game include sound effects and
different colors of bricks
Monday, March 30, 2009 10
11. ROSENZWEIG OBSERVATIONS
Games are becoming more complex
Games are constructed in modules; requires up front design
in determining where to place code
Games build on knowledge of earlier examples
Rosenzweig breaks it down whenever a new concept is
introduced and provides decent comments in code
Be sure to pay attention to hints for testing and debugging,
for example the AirRaid test class on page 164
Monday, March 30, 2009 11
12. ROSENZWEIG NEXT 2 WEEKS
Chap 9 - Word Games
Chap 10 - Trivia/Quiz Games
Are groups looking at other games from Rosenzweig like
puzzles (chap 6), direction and movement (chap 7)?
Does each team have a game strategy or mod mapped out
which will produce a final product in 4 weeks? (if not, we
definitely need to talk)
Monday, March 30, 2009 12