Intro to Flash Game Design - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Intro to Flash Game Design

Description:

Intro to Flash Game Design. Bill Gray. Spring 2006. Basic Components ... Macromedia Flash MX 2004 Games Most Wanted - I haven't used this book myself, it ... – PowerPoint PPT presentation

Number of Views:181
Avg rating:3.0/5.0
Slides: 15
Provided by: willia50
Category:
Tags: design | flash | game | games | intro

less

Transcript and Presenter's Notes

Title: Intro to Flash Game Design


1
Intro to Flash Game Design
  • Bill Gray
  • Spring 2006

2
Basic Components
  • Splash Screen
  • Cut Scenes
  • Introduction
  • Directions
  • Game Play

3
Hands On
  • Movement/Navigation
  • Adding Sound
  • Collision detection
  • Keeping Score

4
Movement
  • Name RII
  • Create an ActionScript Layer
  • Select the first frame in the ActionScript Layer
  • Open Actions Frame
  • Begin Coding

5
Movement Code Sample
if (Key.isDown(Key.UP)) xSpeed
thrustMath.sin(turtle._rotation(Math.PI/180))
ySpeed thrustMath.cos(turtle._rotation(Math.P
I/180)) turtle.gotoAndStop("forward") forward(
)
6
Navigation
  • Name your buttons
  • Name the key frames for Introduction,
    Directions, etc.
  • Select the first frame in the ActionScript Layer
  • Open Actions Frame
  • Begin Coding

7
Navigation Code Sample
playB.onPress function() gotoAndStop("Game")
console._visible 1 activate true
8
Adding Sound
  • Import sounds to your Library
  • Set the Linkage properties to Export for
    ActionScript
  • Give the sound a name (Identifier)
  • Select frame 1 on the ActionScript Layer
  • Open Actions Frame
  • Begin Coding

9
Sound Code Sample
forward function() thruster new
Sound() thruster.attachSound("thrust") thruste
r.start()
10
Collision Detection
  • Use the hitTest function to detect when theres
    a collision between the Seeker and RII.
  • Program action to take when a collision has been
    detected.

11
Collision Code Sample
if(seeker.hitTest(turtle)) seeker._rotation
180 exSpeed -15 eySpeed
-15 seeker._y - eySpeed seeker._x
exSpeed // Play Collision
Sound bounce()
12
Keeping Score
  • Set a value for the score variable
  • Assign the score variable to the Dynamic text
    field located on the Console Clip
  • In the RII demo each time the Seeker and RII
    collide 100 points is added to the score

13
Score Code Sample
if(seeker.hitTest(turtle)) hitcnt-- score
score 100 if (hitcnt
4) seeker.gotoAndStop("green") else if
... else if else if else if
else hitcnt 5 seeker.gotoAndStop("blue")

14
References
Books Macromedia Flash MX 2004 ActionScript
Training from the SourceMacromedia Flash MX 2004
Game Design DemystifiedGame Development with
ActionScriptActionScript Cookbook Macromedia
Flash MX 2004 Games Most Wanted - I haven't used
this book myself, it was recommended to me by a
friend. Websiteshttp//www.flashkit.com/tutori
als/Games/ http//www.hotscripts.com/Flash/index.h
tml
Write a Comment
User Comments (0)
About PowerShow.com