Tutorial from http://mobile.smashingmagazine.com/2012/10/19/design-your-own-mobile-game/