Videogame Design and Programming - 06 Working with Dramatic Elements
Videogame Design
-
Upload
zelda-rutledge -
Category
Documents
-
view
24 -
download
0
description
Transcript of Videogame Design
![Page 1: Videogame Design](https://reader035.fdocuments.us/reader035/viewer/2022062321/56812e40550346895d93c6de/html5/thumbnails/1.jpg)
Videogame Design
Washington Irving Middle School
Citizen Schools Fall ‘06
![Page 2: Videogame Design](https://reader035.fdocuments.us/reader035/viewer/2022062321/56812e40550346895d93c6de/html5/thumbnails/2.jpg)
Circle of Evaluation Cedrick and Yar
![Page 3: Videogame Design](https://reader035.fdocuments.us/reader035/viewer/2022062321/56812e40550346895d93c6de/html5/thumbnails/3.jpg)
Values and TypesYar and Evan
• Numbers
• Strings
• Booleans
• Images
![Page 4: Videogame Design](https://reader035.fdocuments.us/reader035/viewer/2022062321/56812e40550346895d93c6de/html5/thumbnails/4.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062321/56812e40550346895d93c6de/html5/thumbnails/5.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062321/56812e40550346895d93c6de/html5/thumbnails/6.jpg)
Data Definition
Time is a Number
![Page 7: Videogame Design](https://reader035.fdocuments.us/reader035/viewer/2022062321/56812e40550346895d93c6de/html5/thumbnails/7.jpg)
Contract
; rocket-height : Number -> Number
![Page 8: Videogame Design](https://reader035.fdocuments.us/reader035/viewer/2022062321/56812e40550346895d93c6de/html5/thumbnails/8.jpg)
Examples
(rocket-height 13) should be 91
![Page 9: Videogame Design](https://reader035.fdocuments.us/reader035/viewer/2022062321/56812e40550346895d93c6de/html5/thumbnails/9.jpg)
Take Inventory
; rocket-height : Number -> Number
(define (rocket-height time)
…)
![Page 10: Videogame Design](https://reader035.fdocuments.us/reader035/viewer/2022062321/56812e40550346895d93c6de/html5/thumbnails/10.jpg)
Code
; rocket-height : Number -> Number
(define (rocket-height time)
(* 7 time)
![Page 11: Videogame Design](https://reader035.fdocuments.us/reader035/viewer/2022062321/56812e40550346895d93c6de/html5/thumbnails/11.jpg)
Test the Examples
If it worked you did it right!
If not….salted!
![Page 12: Videogame Design](https://reader035.fdocuments.us/reader035/viewer/2022062321/56812e40550346895d93c6de/html5/thumbnails/12.jpg)
ConditionalsCelin
(define (move x)
(cond
[(= x 1) “scissors”]
[(= x 2) “rock”]
[(= x 3) “paper”]))
![Page 13: Videogame Design](https://reader035.fdocuments.us/reader035/viewer/2022062321/56812e40550346895d93c6de/html5/thumbnails/13.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062321/56812e40550346895d93c6de/html5/thumbnails/14.jpg)
The Game
target
Gun
Missile