videogame design

14
Videogame Design Washington Irving Middle School Citizen Schools Fall ‘06

Upload: zelda-rutledge

Post on 31-Dec-2015

29 views

Category:

Documents


0 download

DESCRIPTION

Videogame Design. Washington Irving Middle School Citizen Schools Fall ‘06. Circle of Evaluation Cedrick and Yar. Values and Types Yar and Evan. Numbers Strings Booleans Images. The Design Recipe Kassandra and Artehanna. State the Problem Define the Data Make the Contract - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Videogame Design

Videogame Design

Washington Irving Middle School

Citizen Schools Fall ‘06

Page 2: Videogame Design

Circle of Evaluation Cedrick and Yar

Page 3: Videogame Design

Values and TypesYar and Evan

• Numbers

• Strings

• Booleans

• Images

Page 4: Videogame Design

The Design Recipe Kassandra and Artehanna

1. State the Problem

2. Define the Data

3. Make the Contract

4. Give Examples

5. Take Inventory

6. Code

7. Test

Page 5: Videogame Design

State the Problem

A rocket takes off at a speed of 7 meters per second. Write a function rocket-height that takes the time as input and calculates the height.

Page 6: Videogame Design

Data Definition

Time is a Number

Page 7: Videogame Design

Contract

; rocket-height : Number -> Number

Page 8: Videogame Design

Examples

(rocket-height 13) should be 91

Page 9: Videogame Design

Take Inventory

; rocket-height : Number -> Number

(define (rocket-height time)

…)

Page 10: Videogame Design

Code

; rocket-height : Number -> Number

(define (rocket-height time)

(* 7 time)

Page 11: Videogame Design

Test the Examples

If it worked you did it right!

If not….salted!

Page 12: Videogame Design

ConditionalsCelin

(define (move x)

(cond

[(= x 1) “scissors”]

[(= x 2) “rock”]

[(= x 3) “paper”]))

Page 13: Videogame Design

The GameMarduche

• Three “characters” in the game– The Target (flies around)– The Missile (hits the target)– The Gun (moves and fires the missile)

• Each character has a function that draws it, and one that updates it

• The distance formula tells if the missile has hit the target

Page 14: Videogame Design

The Game

target

Gun

Missile