Table of Contents
- MDN Reintroduction
- MDN Game Development Workflows
- Building a Game
It was a good dose of reality to get me out of my comfort zone and push me to learn the deeper details of languages.
- Volume 1: The Early Years
- Act III: Function the Ultimate
- This talk also convinced me to pick up Little Schemer, promising that it would “change the way you think, and there aren’t a lot of books that will do that”
- Episode IV: The Matamorphasis of Ajax
- Part 5: The End of All Things
- Scene 6: Loopage
- Level 7: ECMAScript 5: The new Parts
- Section 8: Programming Style & Your Brain
The first two talks are a history lesson, very informative. A lot of the languages and software architects have come up in random reading around the internet, such as some of my favorite (research) papers:
- Ken Thompson’s Turing Award Lecture, “Reflections on Trusting Trust”
- Lamport’s “The Future of Computing: Logic or Biology”
- CAR Hoare, “The Emperor’s Old Clothes”
- Fred Brooks (1986), “No Silver Bullet”
- Parnas, David L. “Designing Software for Ease of Extension and Contraction.”
Some benefits of Prototyped OOP:
- Trivial to make new “classes”, avoids lots of boilerplate
- More “functional” style
- Change behavior at runtime
- Easy multiple inheritance, don’t need crazy and hard to maintain type hierarchy
- Property modifiers
Wouldn’t be complete without cons list:
- Lose static typing
- Performance overhead, still have to check inheritance hierarchy and compiler can’t help you out
- New is scary, can easily accidentally clobber global object
MDN Game Development Workflows
- 2D Breakout in pure JS
- 2D Breakout game using Phaser
- 2D Maze game with Device Orientation using Phaser
Building a Game
List of issues and what I learned:
- Hosting issues: browser was caching objects so when I updated and went to test my changes… everything would be the same. Octopress had some issues with actually changing letter capitalization in the repo that prevented a few scripts from loading properly.
- Maps: used Tile Map Editor to generate json maps.
- Pass in method, not method call as callback. If you pass the method call then it will only get called once AND have the wrong context.
- Make sure to pass the context. ‘this’ isn’t passed around implicitly like in java, context is generally one part of a long list of arguments.
- Modularizing. Awkward in Phaser, it doesn’t provide a built in way to do it. This is because sites like to have games in a single minified js file. Being used to OOPs highly structured and separated classes this was kind of weird. But hey, this is what you learn new technologies and languages for.