Notes for Class Sessions¶
Week 01, Day 1: First Flight¶
- Introductions
- Covering the Syllabus
- Homework - First Flight
Week 01, Day 2: Guided Bugfix¶
- Lightning Talks?
- Review last class (Homework - First Flight)
- Review Schedule (When are homeworks due, how are we with the reading schedule?)
- Guided Deepdive into pandas
- Talk about Homework - Bugfix
Week 02, Day 1: Matching, Sorting, and Seeking¶
- Graduate student proposals are due
- Homework - First Flight is due. How was it?
- Slides - http://prezi.com/1qe6g-pvye_q/floss-games-matching-sorting-and-seeking/
Week 02, Day 2: Introduction to HTML5¶
- Lightning Talks
- Introduction to HTML5
- The book
- clone from github - https://github.com/ralphbean/Making-Isometric-Real-time-Games
- examples/ex2-fps-requestAnimationFrame.html
- examples/ex13-isogrid-buildings.html
- examples/ex14-gui.html
- jQuery
- spritely
- Here’s the spritely source code
- DuckHunt
- Javascript Game Frameworks
- gameQuery - http://gamequery.onaluf.org/
- limeJS - http://badassjs.com/post/3200945950/limejs
- melonJS - http://www.melonjs.org/
- processingJS - http://processingjs.org/
- akihabara - http://www.kesiev.com/akihabara/
- effect - http://www.effectgames.com/effect/
- HTML5 - Programming Assignment #1
Week 03, Day 1: Managing, Hitting, and Chaining¶
- Managing
- Diner Dash http://www.playfirst.com/game/dinerdash
- Cake Mania http://www.bigfishgames.com/download-games/898/cakemania/index.html
- Insaniquarium http://www.popcap.com/games/insaniquarium/web
- Requires ActiveX
Chaining
- Revisit,
- Diner Dash
- Insaniquarium
- Tetris
- Scrabble
- Revisit,
- Hitting
- Whac-a-mole vs Wii Tennis
Week 03, Day 2¶
Class was cancelled for the STEM/CSI hackathon!
Week 04, Day 1¶
- Welcome back from break.
- Homeworks due. How’d it go?
- Game Pitches
<audio>
tags- WebWorkers
- CoffeeScript
- Online interpreter
- Observations
- Python style whitespacing
- Ruby styled lightweight syntax
- Concise function declarations
- JSLint approved
- Class based inheritance
- Comprehensions!
- Hangman
Week 04, Day 2 - Paper prototypes¶
- Paper prototypes
Week 05, Day 1 - Settling on projects¶
- Paper prototypes revisited.
- Decide on top three projects.
- Votes -
- How many per team?
- 2 teams of 6
- 3 teams of 4
- 4 teams of 3
- Which games? Vote on the clipboard site.
- Rabenvald - Robocode++
- kaeedo - Eco
- PhilMoc - Haunted House
- JaceTwice - Arrangamajig
- Crystick - Gold Rush
- LakeEffect - Helicopter Race
- trose/decause - FOSS
- Lo-Rin - Dragonfire + Maths
- rossdylan - Pip3z!!1
- Qalthos - Myst
- Chips545 - Moar LaZ0rs
- Homework - Rubric assigned.
Week 05, Day 2 - Openshift¶
- Revisit last class
- Teams and Homework - Rubric
- Due homeworks
- Homework - Rubric due next Thursday.
- HTML5 - Programming Assignment #2 due the Tuesday after that.
- Class this coming Tuesday will be a working session on HTML5 - Programming Assignment #2.
- Walk through HTML5 - Programming Assignment #2
Week 06, the Valley of the Shadow of Openshift¶
:(
Week 07, Day 1: TurboGears¶
Setting up your environment (on typhon.csh.rit.edu
):
$ virtualenv ~/myenv
$ source ~/myenv/bin/activate
$ pip install tg.devtools Pylons==1.0 WebOb==1.0.8
$ paster quickstart roflapp
# Yes you prefer mako templates
# Yes you need authentication
$ cd roflapp
- At present, the current release of TurboGears doesn’t know it, but it needs
- Pylons==1.0
- WebOb==1.0.8
$ python setup.py develop
$ paster setup-app development.ini
Since we’re on a shared machine typhon.csh.rit.edu
, we’ll need to pick different ports to serve our respective roflapps on. Edit development.ini
accordingly.
Once you’ve made your edits, serve your app with:
$ paster serve --reload development.ini
Understanding Modern Web Frameworks¶
It’s all about MVC – model, view, controller. Modern frameworks separate your code out into these three distinct, yet interdependant chunks.
- model (
rolfapp/model/*.py
) - contains all the database-related code- view (
roflapp/template/*.mak
androflapp/public/*
) - contains all the presentation-related code, html markup, css, javascript, etc.- controller (
roflapp/controllers/*.py
) - all the control-logic (or business logic). Who can access what urls? Validation of data? Did you win an iPad?
If you look inside roflapp
you’ll see these directories and a few other secondary ones.
- Add
roflapp/public/testing123.html
and browse to/testing123.html
. - Edit
roflapp/templates/index.html
and browse to/
. - Edit
roflapp/controllers/root.py
. Edit thedef index(..)
method to return a random number. Display it in the template. - Look at
roflapp/model/
. Editroflapp/controllers/root.py
to return the number of users. - Throw an exception.
- Use
tg.flash()
.
Week 07, Day 2: More TurboGears - AJAX - Back to the Cloud - Facebook¶
Edit
roflapp/controllers/root.py
.1.1) Add one method that JSON returns info about users. 1.2) Add another method that JSON returns {‘success’: True} but adds a new user
Add
roflapp/public/javascript/rofl.javascript
.1.1) Add one function that given JSON, updates the DOM. 1.2) Add one function that queries the
/query_users
URL. 1.3) Add one function that POSTs to create a random user. 1.4) Add $(document).ready(..) to kick it all off.
Facebook, if we have time¶
- Look at hanginwit-threebean for the example. In particular, check out
auth-fb.coffee
.
Week 08, Day 2: Facebook Auth¶
External docs for Facebook:
- get an appID - https://developers.facebook.com/apps
- general docs on fb auth - http://developers.facebook.com/docs/authentication/
Modifications to your openshift app:
- tg2app/models/stuff.py - https://gist.github.com/1779952
- tg2app/controllers/root.py https://gist.github.com/1779931
- tg2app/templates/waiting.mak - https://gist.github.com/1780020
- tg2app/public/js/waiting.js - https://gist.github.com/1779989
- tg2app/lib/base.py - https://gist.github.com/1780206
- tg2app/templates/master.mak - https://gist.github.com/1780188
- tg2app/public/js/auth-faked.js - https://gist.github.com/1780093
- tg2app/public/js/auth-fb.js - https://gist.github.com/1780065
Week 09, Day 1¶
Presentations!