Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview...
Transcript of Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview...
![Page 1: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/1.jpg)
Beyond Middleware: Thinking like a ProgrammerBen HougeAssociate Professor Berklee College of Music
![Page 2: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/2.jpg)
“I’m not a great programmer, but I can get the computer to do the job that I ask it to.” —John Chowning Inventor of FM Synthesis Founder of CCRMA, Stanford University
![Page 3: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/3.jpg)
OverviewI. Programming Defined II. Games and Affordances III. Programmer Use Cases IV. Programming the Future
![Page 4: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/4.jpg)
I. Programming Defined●What Is Programming? ●Programming Concepts in Game Audio
![Page 5: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/5.jpg)
What Is Programming?●Computer Code Is a List of Instructions ●An Algorithm Is a Set of Rules ●Programming Is Logical, Systematic Thinking
![Page 6: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/6.jpg)
Programming Concepts in Game Audio●Modularity (Functions, Encapsulation) ●Economy (Writing DRY Code) ●Multiplicity (OOP) ●Parameterization (Inheritance) ●Responsiveness (Encapsulation)
![Page 7: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/7.jpg)
II. Games and Affordances●Game Engines and Middleware ●Things a Programmer Can Do
![Page 8: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/8.jpg)
Game Engines and Middleware●A Game Is a Specific Kind of Program ●What a Game Engine Does ●A Set of Affordances ●Question Your Materials
![Page 9: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/9.jpg)
Things a Programmer Can Do●Develop an Engine ●Play Sounds ●Mix Sounds ●Modify Sounds ●Sequence Sounds ●Report/Debug/Optimize Sounds ●Develop Offline Tools
![Page 10: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/10.jpg)
III. Programmer Use Cases●Throwing Sounds over the Wall ●Data in an External Resource ●Implementing Middleware ●New Deployment Mechanisms ●Be Your Own Programmer
![Page 11: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/11.jpg)
#1: Throwing Sounds over the Wall●Leisure Suit Larry 7: Love for Sail! (1996) ●Everything Done in Code ●Programmer Required for all Changes ●Little Control or Iteration
![Page 12: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/12.jpg)
#2: Data in an External Resource●King’s Quest: Mask of Eternity (1998) ●Data vs. Metadata ●Simple Text Files ●Reboot Required to Test ●Empowerment: No Programmer Required!
![Page 13: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/13.jpg)
#3: Implement Middleware●Johnny Drama (1999-2001, unreleased) ●Microsoft’s DirectMusic ●Visual Basic Scripting ●Programmer Calls Methods, Passes Data ●Two Sides: Tool vs. Runtime ●Analogous to Wwise/FMOD
![Page 14: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/14.jpg)
#4: New Deployment Mechanisms●Tom Clancy’s EndWar (2008) ●Prototype Audio Behaviors in Max/MSP ●System Design = A Kind of Composition ●Work w/ Programmer to Integrate and Test ●New Tools to Manage New Data
![Page 15: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/15.jpg)
#5: Be Your Own Programmer●Responding to Dancers’ Movements ●Manipulating Live Audio Streams ●Sonifying Data ●Real-Time Soundtrack for a 5-Course Meal ●Prototyping Game Music Behaviors
![Page 16: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/16.jpg)
Demo: Please Be Seated●Dance Collab w/ New Movement Collective ●Performed in Valencia, Winchester, London ●Real-Time Control over Parameters ●Intensity ●Musical Scale (in Just Intonation!) ●Number of Elements ●Position
![Page 17: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/17.jpg)
IV. Programming the Future●Towards Future Innovation
![Page 18: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/18.jpg)
Towards Future Innovation●Put Yourself in a Programmer’s Shoes ●Programming Problems Are Compositional Problems ●Inventing New Paradigms and Platforms ●All Music Is Game Music
![Page 19: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/19.jpg)
Q & A Ben Houge Associate Professor Berklee College of Music [email protected] @AleaBoy
![Page 20: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/20.jpg)
Appendix A: Programming Terms and Examples
![Page 21: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/21.jpg)
A Variable// an integer (no fractional component) coinCount = 56
// a floating-point number (can have a fractional part) playerHealth = 0.89
// a boolean value (true or false) // named for 19th c. English mathematician George Boole hasTalkedToWizard = true
// these are comments, BTW
![Page 22: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/22.jpg)
An Expression// can be evaluated to result in a single value 3 + 11 (x + y) / 2 playerHealth > 0
![Page 23: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/23.jpg)
A Statement// describes an action to be carried out // (i.e., something changes) playerHealth = 1.0; meaningOfLifeUniverseEverything = 42; x = x + 4; print(“Health is %f”, playerHealth); c++; // same as c=c+1, good name for a new language
![Page 24: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/24.jpg)
A Conditional Statement// controls the flow of a program if (playerHealth <= 0) { playDeathAnimation(); print(“You lose.”); } else { playVictoryDance(); print(“You win!”); }
![Page 25: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/25.jpg)
An Iterative Loop// repeat an action for a certain number of times int enemyCount = 12; while (enemyCount > 0) { spawnEnemy(); enemyCount = enemyCount - 1; }
![Page 26: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/26.jpg)
A Function (or Method)// a sequence of operations to perform a specific task int addTwoIntegers(int x, int y) { int sum; sum = x + y; return sum; }
// later perform the task using the function’s name int mySum = addTwoIntegers(4, 3);
![Page 27: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/27.jpg)
A Class// a way of encapsulating values and functionality // a blueprint for objects (OOP) class Rectangle { int width, height; public: void set_values (int,int); int area() {return width*height;} };
![Page 28: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/28.jpg)
Appendix B: Overview of Common Programming Languages
![Page 29: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/29.jpg)
Common Programming Languages●C++ vs. C (but not C+) ●JavaScript (for web, Unity) ●Java (Processing/Arduino) ●C# (particularly in Unity) ●Python (for scripting) ●Swift or Objective C (for iOS/OSX development) ●PHP or Ruby on Rails (for web servers)
![Page 30: Beyond Middleware: Thinking like a Programmertwvideo01.ubm-us.net/o1/vault/gdc2016/... · Overview of Common ... Swift or Objective C (for iOS/OSX development) PHP or Ruby on Rails](https://reader035.fdocuments.in/reader035/viewer/2022071011/5fca0a8cb6137157f16dbb50/html5/thumbnails/30.jpg)
Music-Specific Languages●Csound ●Max/MSP ●Pure Data ●SuperCollider ●Common Lisp Music