Maybe you’re not setting out to make the next “Angry Birds.” But there are lessons to learn from mobile game design principles– from user training and motivation strategies to fun and engaging graphics– that are valuable to a wide variety of apps. First we’ll glance at a little “theory” about what makes games fun. Then we’ll come back to our non-game apps and see how those concepts could apply. Next, we’ll dive into an introductory example using iOS 7′s new, easy-to-use SpriteKit framework to make a fun, interactive app menu. Finally, we’ll use Instruments in Xcode to check on our frame rate to make sure we’re not compromising performance.
12. FORTHE BUSINESS FOLKS
• From Distimo’s Report for 2013:
• “The vast majority of mobile app revenue was
generated in the Games category.”
13. FORTHE BUSINESS FOLKS
• From Distimo’s Report for 2013:
• “The vast majority of mobile app revenue was
generated in the Games category.”
• The top 10 grossing apps in the App Store were
games.
14. FORTHE BUSINESS FOLKS
• From Distimo’s Report for 2013:
• “The vast majority of mobile app revenue was
generated in the Games category.”
• The top 10 grossing apps in the App Store were
games.
• App Store: 75% of US revenue, 63% world
19. WHAT IS NOT A GAME?
• “You win or you die.”
• “Everything in life!” -
my mother, often as I was
growing up.
20. WHAT IS NOT A GAME?
• “You win or you die.”
• “Everything in life!” -
my mother, often as I was
growing up.
• “The only winning
move is not to play.”
21. WHAT IS NOT A GAME?
• “You win or you die.”
• “Everything in life!” -
my mother, often as I was
growing up.
• “The only winning
move is not to play.”
22. WHAT IS NOT A GAME?
• “You win or you die.”
• “Everything in life!” -
my mother, often as I was
growing up.
• “The only winning
move is not to play.”
• actually, this is a game.
24. WHAT IS A GAME?
• Goals, rules, challenges, and
interactions.
25. WHAT IS A GAME?
• Goals, rules, challenges, and
interactions.
26. WHAT IS A GAME?
• Goals, rules, challenges, and
interactions.
27. WHAT IS A GAME?
• Goals, rules, challenges, and
interactions.
• “A series of meaningful
choices.” - Sid Meier
28. WHAT IS A GAME?
• Goals, rules, challenges, and
interactions.
• “A series of meaningful
choices.” - Sid Meier
29. WHAT IS A GAME?
• Goals, rules, challenges, and
interactions.
• “A series of meaningful
choices.” - Sid Meier
30. WHAT IS A GAME?
• Goals, rules, challenges, and
interactions.
• “A series of meaningful
choices.” - Sid Meier
• Iconic depictions of patterns
in the world.
54. SOCIAL STATUS / ROLES
“Save the princess”
- or -
Reinforcing stereotypes
55. EXAMPLES OF PATTERNS
Type Example Done Irresponsibly
Spatial / Color Tetris Blue is the best!
Physics /Timing Super Mario Bros. Button-smashing!
Life / Death Chess No consequences.
Warfare Starcraft The “good guys” always
win!
Rewards Olympic Medals Manipulation, social
referencing
Social Status / Roles The Sims Save the princess,
stereotyping
67. QUESTIONSTO ASK
• What patterns does my app have?
• At what stage are they presented?
• Are they presented responsibly?
68. QUESTIONSTO ASK
• What patterns does my app have?
• At what stage are they presented?
• Are they presented responsibly?
• Are there any other patterns it should have?
77. SPRITE KIT
• Apple Framework for iOS 7+ and OS X 10.9+
• Introduced at WWDC 2013
78. SPRITE KIT
• Apple Framework for iOS 7+ and OS X 10.9+
• Introduced at WWDC 2013
• Integrated into Xcode 5
79. SPRITE KIT
• Apple Framework for iOS 7+ and OS X 10.9+
• Introduced at WWDC 2013
• Integrated into Xcode 5
• Aids 2-D animations and physics
80. SPRITE KIT
• Apple Framework for iOS 7+ and OS X 10.9+
• Introduced at WWDC 2013
• Integrated into Xcode 5
• Aids 2-D animations and physics
• Doesn’t require going into OpenGL
81. SPRITE KIT
• Apple Framework for iOS 7+ and OS X 10.9+
• Introduced at WWDC 2013
• Integrated into Xcode 5
• Aids 2-D animations and physics
• Doesn’t require going into OpenGL
• Meaning: not scary
93. THE SNOWY PLANET BATTLE MENU
• Snowfall in the background
• Snow buildup on the buttons
94. THE SNOWY PLANET BATTLE MENU
• Snowfall in the background
• Snow buildup on the buttons
• A floating title (with orbiting lasers)
95. THE SNOWY PLANET BATTLE MENU
• Snowfall in the background
• Snow buildup on the buttons
• A floating title (with orbiting lasers)
• Choosing an option causes lasers to fire
96. THE SNOWY PLANET BATTLE MENU
• Snowfall in the background
• Snow buildup on the buttons
• A floating title (with orbiting lasers)
• Choosing an option causes lasers to fire
• And an EXPLOSION
100. FIRSTTHINGS FIRST
• Import SpriteKit into your Xcode project
• Create an SKView
• Have that SKView present a custom-made subclass of SKScene
101. FIRSTTHINGS FIRST
• Import SpriteKit into your Xcode project
• Create an SKView
• Have that SKView present a custom-made subclass of SKScene
• Note that SKScene extends SKNode, so it has a parent-child setup
109. SNOWFLAKE SPRITES
• To make each snowflake:
• Create a new SKSpriteNode with a horizontally-
random starting position
110. SNOWFLAKE SPRITES
• To make each snowflake:
• Create a new SKSpriteNode with a horizontally-
random starting position
• Give it a new SKPhysicsBody and let Newton take
over
111. SNOWFLAKE SPRITES
• To make each snowflake:
• Create a new SKSpriteNode with a horizontally-
random starting position
• Give it a new SKPhysicsBody and let Newton take
over
• It melts after some time or when it leaves the screen
114. THE FLOATINGTITLE
• Create an SKLabelNode with text, font, etc.
• Create a forever-repeating SKAction to float
115. THE FLOATINGTITLE
• Create an SKLabelNode with text, font, etc.
• Create a forever-repeating SKAction to float
• Assign it an SKPhysicsBody
116. THE FLOATINGTITLE
• Create an SKLabelNode with text, font, etc.
• Create a forever-repeating SKAction to float
• Assign it an SKPhysicsBody
• But turn off the dynamic boolean
120. ADD LASERS!
• Create SKSpriteNodes
• Create + Assign flash and orbit SKActions
• Positions are automatically relative to their parent
121. ADD LASERS!
• Create SKSpriteNodes
• Create + Assign flash and orbit SKActions
• Positions are automatically relative to their parent
• So as the title floats, lasers move with it
124. CHOOSING A MENU OPTION
• Add plain old UIButtons
• Also add non-dynamic SKNodes for snow to accumulate
125. CHOOSING A MENU OPTION
• Add plain old UIButtons
• Also add non-dynamic SKNodes for snow to accumulate
• When pressed:
126. CHOOSING A MENU OPTION
• Add plain old UIButtons
• Also add non-dynamic SKNodes for snow to accumulate
• When pressed:
• Remove all SKActions from the laser nodes
127. CHOOSING A MENU OPTION
• Add plain old UIButtons
• Also add non-dynamic SKNodes for snow to accumulate
• When pressed:
• Remove all SKActions from the laser nodes
• Assign new SKAction to move to the center of pressed button
128. CHOOSING A MENU OPTION
• Add plain old UIButtons
• Also add non-dynamic SKNodes for snow to accumulate
• When pressed:
• Remove all SKActions from the laser nodes
• Assign new SKAction to move to the center of pressed button
• BUT NOW WE WANT IT TO EXPLODE
131. EXPLODETHE BUTTON
• SKActions can execute completion blocks
• So once lasers hit, remove button and add another
SKEmitterNode
132. EXPLODETHE BUTTON
• SKActions can execute completion blocks
• So once lasers hit, remove button and add another
SKEmitterNode
• After an action-film-worthy period of time, remove
the emitter
133. EXPLODETHE BUTTON
• SKActions can execute completion blocks
• So once lasers hit, remove button and add another
SKEmitterNode
• After an action-film-worthy period of time, remove
the emitter
• Navigate to some other screen
137. CHECKYOUR FRAME RATE
• Show on-screen using SKView’s showFPS property
• Debug Navigator in Xcode
138. CHECKYOUR FRAME RATE
• Show on-screen using SKView’s showFPS property
• Debug Navigator in Xcode
139. CHECKYOUR FRAME RATE
• Show on-screen using SKView’s showFPS property
• Debug Navigator in Xcode
• Profile using Instruments
140. CHECKYOUR FRAME RATE
• Show on-screen using SKView’s showFPS property
• Debug Navigator in Xcode
• Profile using Instruments
• Core Animation preset will work
142. TO LEAVE WITH…
• There is a lot of exciting research going on around
games and learning.
143. TO LEAVE WITH…
• There is a lot of exciting research going on around
games and learning.
• There are a lot of unexplored patterns for apps
144. TO LEAVE WITH…
• There is a lot of exciting research going on around
games and learning.
• There are a lot of unexplored patterns for apps
• Introducing game dynamics and physics is easy and fun!