MULT 110 Basic Game Programming I - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

MULT 110 Basic Game Programming I

Description:

Math.ceil() vs. Math.floor() Math.ceil() Returns the ceiling of the number--the ... Possible Flash Statement Results. Math.ceil(Math.random()*10); 1 - 10 ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 9
Provided by: ess7
Category:
Tags: mult | basic | ceil | game | programming

less

Transcript and Presenter's Notes

Title: MULT 110 Basic Game Programming I


1
MULT 110Basic Game Programming I
  • Reviewing Generating Random Numbers
  • and
  • Using Flash Text

2
Generating Random Numbers
3
Math.ceil() vs. Math.floor()
  • Math.ceil() Returns the ceiling of the
    number--the closest integer that is greater than
    or equal to the number.
  • Math.floor() Returns the floor of the
    number--the closest integer that is less than or
    equal to the number.

4
Comparing Results
  • Possible Flash Statement
    Results
  • Math.ceil(Math.random()10) 1 - 10
  • Math.floor(Math.random()10) 0 - 9
  • Math.round(Math.random()10) 0 -10

5
Text in Flash
  • Input Text accepts user input
  • Needs an instance name
  • Needs a variable associated with it
  • Captures the value for the variable
  • Why?
  • Input player names
  • Input wagers
  • Input answers for choices

6
Text in Flash
  • Dynamic Text (a.k.a. output)
  • Needs an instance name
  • Needs a variable associated with it
  • Displays the value of the variable
  • Changes when the value of the variable changes
  • Why?
  • Displays score
  • Displays current information

7
Lab Create a Flash Game
  • Play the Guess A Number game
  • Modify the game to create your own game
  • Determine the object of the game.
  • Determine the rule set.
  • Design the screen layout.
  • Assemble the assets.
  • Comment and script the buttons.
  • Publish your .fla to the student server.
  • BONUS Add fields to display the players score
    and the computers score.

8
Sample Guess a Number Game
Write a Comment
User Comments (0)
About PowerShow.com