Building social games
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
780
On Slideshare
779
From Embeds
1
Number of Embeds
1

Actions

Shares
Downloads
3
Comments
0
Likes
1

Embeds 1

https://twitter.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. developersPrashant Sridharangithub.com/CoolAssPuppy@CoolAssPuppyBuilding Social GamesThursday, May 2, 13
  • 2. iOS & Android Devices - Time SpentSource: Flurry Analyticshttp://blog.flurry.com/bid/95723/Flurry-Five-Year-Report-It-s-an-App-World-The-Just-Web-Lives-in-It20%Browser14%Other8%Utility8%Enterta-inment32%Playing Games18%Facebook0% 100%50%Thursday, May 2, 13
  • 3. 28%72%US top 400 grossing iOS appsSource: App FiguresThursday, May 2, 13
  • 4. 22%78%US top 400 grossing Android appsSource: App FiguresThursday, May 2, 13
  • 5. On average in March, how many games wereadded to the Apple App Store every day?143Source: 124Apps.bizhttp://148apps.biz/app-store-metrics/?mpage=submissionThursday, May 2, 13
  • 6. 250MGamer MAU751MMobile MAU1.1B+Global MAUThursday, May 2, 13
  • 7. Facebook Provides Unique Social Channels2012Requests Sharing Scores &AchievementsOpen GraphThursday, May 2, 13
  • 8. Scenarios for Using Facebook Social Channels20121. Invites2. Sending Gifts3. Leaderboards4. Tournaments5. Bragging6. ChallengesThursday, May 2, 13
  • 9. Sending InvitesCustomFriend PickerThursday, May 2, 13
  • 10. Sending GiftsInvitationswith ValueThursday, May 2, 13
  • 11. Sending GiftsInvitationswith Value‣ Q: Why use this over nativepush notifications?- Cross-Platform- Works with users who’venot installed your appThursday, May 2, 13
  • 12. Social LeaderboardsPeer PressureBubble WitchSagaThursday, May 2, 13
  • 13. Weekly TournamentsBuild regularengagementDiamondDashThursday, May 2, 13
  • 14. BraggingFinding naturalmoments to sharenew share dialogscreenshot needeThursday, May 2, 13
  • 15. Start with Facebook LoginUser’s identity Appearing in SearchUser’s friends Getting DistributionThursday, May 2, 13
  • 16. Make Facebook Login ProminentExplain what you’regoing to do with userdata and upsell on thevalue of Facebook LoginThursday, May 2, 13
  • 17. Ask for Read Permissions First[FBSession      openActiveSessionWithReadPermissions:@[@”email”]                                                    allowLoginUI:YES                                          completionHandler:    ^(FBSession  *session,  FBSessionState  status,  NSError  *error)      {          //handle  result      }];Thursday, May 2, 13
  • 18. Ask for Write Permissions In ContextFBSession  *fbSession  =  [FBSession  activeSession];                            [fbSession            requestNewPublishPermissions:@[@"publish_actions"]                                                                                              defaultAudience:FBSessionDefaultAudienceFriends    completionHandler:^(FBSession  *session,  NSError*  error)  {        //handle  result                                      }];Thursday, May 2, 13
  • 19. Support Free & Paid Versions of Your AppFBSession  *fbSession  =  [[FBSession  alloc]  initWithAppID:@"480369938658210"                                                                                        permissions:permissions                                                                                urlSchemeSuffix:@"free"                                                                          tokenCacheStrategy:nil];Thursday, May 2, 13
  • 20. RequestsThursday, May 2, 13
  • 21. Get Existing Users to Recruit New UsersThursday, May 2, 13
  • 22. User Flow for RequestsSending Receive Push Notification Light up notification jewelThursday, May 2, 13
  • 23. User Flow for RequestsSending Receive Push Notification Light up notification jewelThursday, May 2, 13
  • 24. User Flow for RequestsReceive Push Notification Light up notification jewel Appear in notification listThursday, May 2, 13
  • 25. User Flow for RequestsReceive Push Notification Cross-Platform(Web / iOS / Android /Mobile Web)Light up notification jewel Appear in notification listThursday, May 2, 13
  • 26. Sending a RequestNSString  *message  =  [NSString  stringWithFormat:@"I  just  smashed  %d  friends!  Can  you  beat  it?",  nScore];                    [FBWebDialogs  presentRequestsDialogModallyWithSession:nil                                                                                            message:message                                                                                                title:@”Invite  Friend”                                                                                      parameters:params                                                                                            handler:nil];Thursday, May 2, 13
  • 27. Frictionless Requests▪ Automatically sends futurerequests without prompting theuser▪ Useful for Games to send a“Your Turn” notification, to sendlives/gifts to friendsThursday, May 2, 13
  • 28. Request FilteringGET https://graph.facebook.com/USER_ID/friends?fields=devices▪ What if you don’t support all platforms?▪ Restrict Requests only to users that support your platforms...▪ Can query the set of devices a user has via the Graph API▪ Send the result of the query to your native Friend SelectorThursday, May 2, 13
  • 29. Demo: Sending RequestsThursday, May 2, 13
  • 30. Advanced FilteringNSString  *fql  =  @”SELECT  uid,  devices  FROM  user  WHERE  uid  IN  (SELECT  uid2  FROM  friend  WHERE  uid1  =  me())  and  is_app_user  =  0”;[FBRequestConnection  startWithGraphPath:@"/fql"                                                          parameters:@{@”q”:  fql}                                                          HTTPMethod:@"GET"                                            completionHandler:^(FBRequestConnection  *connection,                                                                                    id  result,                                                                                    NSError  *error)  {                                            //parse  list                                            }];▪ Remove friends who are already using the app▪ Send the result to to your custom Friend SelectorThursday, May 2, 13
  • 31. Deep Linking from Requestsfb[APP_ID]://authorize#expires_in=[ACCESS_TOKEN_EXPIRATION]        &access_token=[USER_ACCESS_TOKEN]        &target_url=https://apps.facebook.com/[APP_NAME_SPACE]/?request_ids=[COMMA_SEPARATED_REQUESTIDs]&ref=notif&app_request_type=user_to_userThursday, May 2, 13
  • 32. Build Your Own Friend Selector▪ Build your own friend selectorfor better results▪ Use your game’s artwork for a moreconsistent user experience▪ Native dialogs will perform better▪ Send the selected friends to theFacebook Requests DialogThursday, May 2, 13
  • 33. Thursday, May 2, 13
  • 34. SharingThursday, May 2, 13
  • 35. Using the New Native Share Dialog[FBDialogs presentShareDialogWithLink:[NSURL URLWithString:@"http://yoururl.com/"]name:@"Checkout how awesome I am"caption:@"See if you can beat me!"description:[NSString stringWithFormat:@"I just scored %d points!]picture:[NSURL URLWithString:@"http://youurl.com/yourimage.jpg"]clientState:nilhandler:nil];Thursday, May 2, 13
  • 36. SharingThursday, May 2, 13
  • 37. Demo: Feed DialogThursday, May 2, 13
  • 38. Share Interesting MomentsThursday, May 2, 13
  • 39. Support Deep Linking when Sharing▪ Feed and Timeline stories linkdirectly to the native app▪ Don’t just send users to ageneric title screen, providecontext▪ Parse target_url to provide acontextual experienceThursday, May 2, 13
  • 40. Scores & Achievements2012Thursday, May 2, 13
  • 41. Graph API for Scores▪ Simple API, only forgames▪ Post an integer scorefor a player▪ We generate storiesautomatically▪ These stories are onlyfor desktop Facebook▪ ...but the Scores API isstill useful for mobile...Thursday, May 2, 13
  • 42. Example: Publishing ScoresNSMutableDictionary*  params  =      [NSMutableDictionary  dictionaryWithObjectsAndKeys:                                                                                          [NSString  stringWithFormat:@"%d",  nScore],  @"score",                                                                                          nil];                        FBRequest  *req  =  [[FBRequest  alloc]  initWithSession:[FBSession  activeSession]                                                                                    graphPath:[NSString  stringWithFormat:@"%@/scores",  playerFBID]                                                                                  parameters:params                                                                                  HTTPMethod:@"POST"];[req  startWithCompletionHandler:^(FBRequestConnection  *connection,  id  result,  NSError  *error)  {}];Thursday, May 2, 13
  • 43. Creating a Social ScoreboardGET https://graph.facebook.com/APP_ID/scores?access_token=USER_ACCESS_TOKEN"data": [{"user": {"name": "Christine Abernathy","id": "1424840234"},"score": 106,},{"user": {"name": "Amir Naor","id": "627802916"},"score": 57},...]Thursday, May 2, 13
  • 44. Demo: Social ScoreboardThursday, May 2, 13
  • 45. Creating a TournamentDELETE https://graph.facebook.com/USER_ID/scores/DELETE https://graph.facebook.com/APP_ID/scores/Delete individual user scoreDelete all user scoresEasily delete scores, per-user or all users andrun weekly tournamentsThursday, May 2, 13
  • 46. Achievements API▪ Define a set of achievements a player can earnin your game▪ Each achievement can be earned only once▪ Publishes on user’s Timeline, appears in News FeedThursday, May 2, 13
  • 47. Managing Achievements<html><head><meta  property="og:type"  content="game.achievement"/><meta  property="og:title"  content="50  Score!"/><meta  property="og:description"  content="Smash  50  friends  in  1  round"/><meta  property="og:url"  content="http://www.friendsmash.com/achievement_50.html"/><meta  property="og:image"  content="http://www.friendsmash.com/images/achievement_50.png"/><meta  property="game:points"  content="50"/><title>Friend  Smash!  -­‐  Achievement:  50  Score!</title></head><body><p>Friend  Smash!  -­‐  Achievement:  50  Score!</p><img  src="http://www.friendsmash.com/images/achievement_50.png"  /></body></html>POST https://graph.facebook.com/me/achievements&achievement=http://site.com/ach1.html&access_token=USER_ACCESS_TOKENThursday, May 2, 13
  • 48. Open GraphThursday, May 2, 13
  • 49. Custom Open Graph Actions for Games▪ Custom actions and objects, tailored to your game▪ Publishes on the user Timeline and Newsfeed▪ Represents core gameplay interactions▪ Allows you to differentiate your gameThursday, May 2, 13
  • 50. 2012Requests Sharing Scores &AchievementsOpen GraphThursday, May 2, 13