Download presentation
Presentation is loading. Please wait.
Published byAileen Shoesmith Modified over 9 years ago
1
02 | Expanding Your Game James Quick | Technical Evangelist Shahed Chowdhuri | Senior Technical Evangelist
2
DEMO Golden Ball
3
Hands on Demo (Golden Ball) –More Behaviors –Functions –Adding Additional Layouts –Permanent Storage –Image Frames/ Animations –Adding a Mute Button Module Overview
4
So…What’s the Game? Platform Game with Turrets –Collect as many Golden Balls in 30 seconds as possible Objects, –Player, platform, tiled backgrounds, turret, bullet, text, touch
5
More Behaviors
6
Player –Platform, wrap Platform –Jumpthru, Physics, Sine Turret –Turret Ball –Physics
7
Functions
8
“Using functions can help you organize events and avoid having to duplicate groups of actions or events.” Reusable logic –Are you repeating the same events->actions? –Ex. Multiple ways to lose For you programmers out there… –Has parameters and return values –Can do nesting and recursion
9
Additional Layouts
10
Want a home screen? An about Page? Want extra levels? –Add a new layout Basic Idea –4 layouts Home, game, end, and about 2 options with Event Sheets –Add a new one –Reuse an existing one
11
Additional Layouts (cont.) Home –Button to Game and About Game –Lose game and go to End End –Button to Home or Game (restart) About –Button to Home and links to website, feedback, social media, etc.
12
Permanent Storage
13
WebStorage Object –“The WebStorage object can store data locally on the user's computer between sessions.” –“The WebStorage object allows data to be stored in two places: Local storage and Session storage” Local storage is permanent (until the user clears their cache). If the user comes back the next day, local storage still has the saved data Session storage only lasts with the current browser session. If the user comes back the next day, session storage is empty again
14
Permanent Storage (cont.) Usage –High scores, achievements, current level, etc. How does it work? –Key/value pairs similar to dictionary Basic Idea –Check to see if a given key exists –If not… create it –If so…use it
15
Image Frames/Animations
16
No 3D… but animation is possible! –Think of a flipbook –Animation frames Cycle through frames or choose individual frames Simple example –Flip the player depending on the direction he is facing
17
Adding a Mute Button
18
Music/ Sound Effects are nice…most of the time –Give the user an option to mute the game Basic Idea –Add Mute text/button to start page –Created global variable “Muted” 0 = not muted 1 = muted
19
Finished Example Golden Ball –Windows 8 - http://bit.ly/W8GoldenBallhttp://bit.ly/W8GoldenBall –Windows Phone - http://bit.ly/WP8GoldenBallhttp://bit.ly/WP8GoldenBall
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.