Professor Ira Fay Class 10. Game Guru Programming for Game Designers.
-
Upload
charla-mckenzie -
Category
Documents
-
view
218 -
download
0
Transcript of Professor Ira Fay Class 10. Game Guru Programming for Game Designers.
![Page 1: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/1.jpg)
Programming forGame Designers
Professor Ira FayClass 10
![Page 2: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/2.jpg)
Overview
• Game Guru• Programming for Game Designers
![Page 3: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/3.jpg)
Game Guru
Observe Rules of the game Scoring Characters Animations Audio User interface Anything at all!
![Page 4: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/4.jpg)
Updates
Get to Know Hampshire revised
Useful links section updated
![Page 5: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/5.jpg)
Get to Know Hampshire
Install Dropbox (or something similar)
Find an interesting professor Check out a boardgame from the
library Find a CEL-1 activity
![Page 6: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/6.jpg)
PfGD: Part 1
Has everyone completed it? Website Roll 1d6 Pick one of the game options
![Page 7: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/7.jpg)
Growth Mindset Reminder
With a growth mindset, we can improve our skills through practicing.
Learning happens over time, not instantly.
The process of learning is uncomfortable when we’re not competent yet.
![Page 8: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/8.jpg)
Programming
Lines of code are executed in order
= is an assignment operator
Programming is typo-intolerant You have to say the magic words exactly
rightfor the spell to work!
![Page 9: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/9.jpg)
Variables
Variables hold information
Variables can change value while the program is executing
Example $myRoll
![Page 10: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/10.jpg)
Methods
Methods are like a factory: They take input, and spit out results
Example rand(1, 6);
![Page 11: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/11.jpg)
Four Useful PHP commands
+=
//
if ()
for () or while()
![Page 12: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/12.jpg)
More PHP
++
arrays
![Page 13: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/13.jpg)
++
// add 1 to i$i = $i + 1;
// add 1 to i$i += 1;
// add 1 to i$i++;
![Page 14: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/14.jpg)
Arrays
// Roll 1d6$myRoll = rand(1, 6);
![Page 15: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/15.jpg)
Arrays
// What if I want to roll 1d6 100 times?
![Page 16: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/16.jpg)
Arrays
// Roll 1d6 100 times$i = 0;while ($i < 100) { $myRoll = rand(1, 6); $i++;}
![Page 17: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/17.jpg)
Arrays
// What if I want to roll 1d6 100 times// and remember each roll?
![Page 18: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/18.jpg)
Arrays
// An array$weatherArray = array();
![Page 19: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/19.jpg)
Arrays
// An array$weatherArray = array();
// The weather for 5 days$sampleArray[0] = 70;$sampleArray[1] = 62;$sampleArray[2] = 50;$sampleArray[3] = 50;$sampleArray[4] = 68;
![Page 20: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/20.jpg)
Arrays
// The weather for 5 days$weatherArray = array(70, 62, 50, 50, 68);
![Page 21: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/21.jpg)
Arrays
// The weather for 5 days$weatherArray = array(70, 62, 50, 50, 68);
// Weather on the first dayecho $weatherArray[0];
// Weather on the second dayecho $weatherArray[1];
![Page 22: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/22.jpg)
Arrays
// Roll 1d6$myRoll = rand(1, 6);
// What if I want to roll 100 times// and remember each roll?
![Page 23: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/23.jpg)
Arrays
// Roll 1d6$myRoll = rand(1, 6);
// What if I want to roll 100 times// and remember each roll?$i = 0;$allRolls = array();while ($i < 100) { $allRolls[$i] = rand(1, 6);}
![Page 24: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/24.jpg)
Arrays
Learn more about arrays in the PHP tutorial
![Page 25: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/25.jpg)
Lab Time
For the rest of this unit, we’ll have ample lab time in class. Bring your computer!
Lisette: Kai S, Ben, Truman, Dakari Meghan: Kai M, Grace, Zack Gabriella: Helena, Ethan, Joel George: Quinn, Bryan, Max
![Page 26: Professor Ira Fay Class 10. Game Guru Programming for Game Designers.](https://reader035.fdocuments.net/reader035/viewer/2022062408/56649f155503460f94c2a790/html5/thumbnails/26.jpg)
Outside of Class Activities
Read the syllabus to know what to do! Programming for Game Designers Part 2
due Weds Get to Know Hampshire project ongoing
Game Guru: Pick a game to show next class, submit written analysis before class