You are previewing Beginning iOS Social Games.
O'Reilly logo
Beginning iOS Social Games

Book Description

It's certainly fun to build games that run on your iPhone and iPad. But, wouldn't it be more fun to create games that allow you to play with other gamers in your social network? There's a whole lot more things you can do. Most of the top best selling games around the world, like World of Warcraft, let you play with others online and share your experiences with your friends.

Beginning iOS Social Games is your concise introduction to iOS social and other networked gaming app development using iOS Game Center, Game Kit, Store Kit, AirPlay, iOS 7 Game Controllers, iTunes App Store and integrating with social networks/media like Facebook and Twitter.

Author Kyle Richter of Empirical Development is an expert game developer who guides you through the social game app development process step by step. This book may allow you to turn your already existing, created game into a well polished networkable and/or social media capable game app.

What you'll learn

  • Build socially integrated games on iOS for iPhone and iPad using Twitter and Facebook

  • Configure and begin using Game Center, Apple's social gaming platform

  • Work with the advanced features of Apple's Game Center using leaderboards, achievements, matchmaking, invitations, and multiplayer

  • Exchange data while dealing with errors, dropped connections and other hurdles

  • Create turned-based iOS games using Game Center

  • Implement other socially rich features like real time Voice Chat, In App Purchases with Store Kit, and displaying content on a TV using Airplay

  • Explore all these features and more while building a real iOS game, UFOs!

Who this book is for

This book is for iPhone and iPad app developers looking to build iOS game apps that can network with other apps and social media like Facebook.

Table of Contents

  1. Title Page
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Author
  6. About the Technical Reviewers
  7. Acknowledgments
  8. Foreword: Better With Friends
  9. Introduction
  10. Chapter 1: Getting Started with Social Gaming
    1. Game Kit: An Overview
    2. Sample Game: UFOs
    3. UFOs: Examining the Source Code
    4. Getting Started with iTunes Connect
    5. Summary
  11. Chapter 2: Game Center: Setting Up and Getting Started
    1. Testing for Game Center
    2. Authenticating with Game Center
    3. The Sandbox
    4. Watching for Status Changes
    5. Working with GKLocalPlayer
    6. Retrieving a Friends List
    7. Friend List Avatars
    8. Working with Players
    9. Summary
  12. Chapter 3: Leaderboards
    1. Why a Leaderboard?
    2. An Overview of Leaderboards in Game Center
    3. Configuring a Leaderboard in iTunes Connect
    4. Posting a Score
    5. Setting a Default Leaderboard
    6. Adding Score Posting to UFOs
    7. Handling Failures When Submitting a Score
    8. Presenting a Leaderboard
    9. Customizing the Leaderboard
    10. Mapping a Player ID
    11. Local Player Score
    12. A Better Approach
    13. Challenges
    14. GKLeaderboard Sets
    15. Summary
  13. Chapter 4: Achievements
    1. Why Achievements?
    2. An Overview of Achievements in Game Center
    3. Configuring Achievements in iTunes Connect
    4. Resetting Achievements
    5. Adding Achievement Hooks
    6. Achievement Challenges
    7. Summary
  14. Chapter 5: Matchmaking and Invitations
    1. Why Add Networking to Your App?
    2. Common Matchmaking Scenarios
    3. Creating a New Match Request
    4. Presenting a Match GUI
    5. Handling Incoming Invitations
    6. Auto-Matching
    7. Matching Programmatically
    8. Adding a Player to a Match
    9. Reinviting Players
    10. Player Groups
    11. Player Attributes
    12. Player Activity
    13. Using Your Own Server (Hosted Matches)
    14. Summary
  15. Chapter 6: The Peer Picker
    1. Benefits of the Peer Picker
    2. Real-World Examples
    3. Working with Sessions
    4. Presenting a Peer Picker
    5. Advanced GKSession Interaction
    6. The Peer Picker Delegate
    7. Summary
  16. Chapter 7: Network Design Overview
    1. Plan Ahead
    2. Three Types of Networks
    3. Less Common Network Types
    4. Reliable Data vs. Unreliable Data
    5. Sending Only What Is Needed
    6. Prediction and Extrapolation
    7. Formatting Messages
    8. Preventing Cheating and Preventing Timeout-Related Disconnections
    9. What to Do When All Else Fails
    10. Summary
  17. Chapter 8: Exchanging Data
    1. Modifying a Single-Player Game
    2. Setting Up Our Engine for Multiplayer
    3. Putting Everything Together
    4. Disconnections
    5. Summary
  18. Chapter 9: Turned-Based Gaming with Game Center
    1. A New Sample Project
    2. GKTurnedBasedMatchmakerViewController
    3. Starting a New Game
    4. Making the First Move
    5. Continuing a Game in Progress
    6. Ending a Match
    7. Quitting and Forfeiting
    8. Player Timeouts
    9. Player Exchanges
    10. Player Reminders
    11. Programmatic Matches
    12. GKTurnBasedEventHandler
    13. Summary
  19. Chapter 10: Voice Chat
    1. Voice Chat for Game Center
    2. Voice Chat for Game Kit
    3. Putting It Together
    4. Summary
  20. Chapter 11: In-App Purchase with StoreKit
    1. Setting Up Your App in iTunes Connect
    2. Adding Products to Your App
    3. Purchasing a Product
    4. Test Accounts and Testing Purchases
    5. Submitting a Purchase GUI Screenshot
    6. Developer Approval
    7. Receipts
    8. iOS 7 Local Receipt Validation
    9. Tying Everything Together in UFOs
    10. Summary
  21. Chapter 12: Twitter
    1. UFOs
    2. Twitter on iOS
    3. Tweet Composer
    4. Custom Tweets
    5. Going Further with Twitter
    6. Summary
  22. Chapter 13: Facebook
    1. UFOs
    2. Facebook on iOS
    3. Facebook Composer
    4. Facebook Apps
    5. Facebook Permissions
    6. Custom Facebook Posts
    7. Going Further with Facebook
    8. Summary
  23. Chapter 14: AirPlay
    1. AirPlay for Built-In Players
    2. Enabling AirPlay in an App
    3. AirPlay Mirroring
    4. AirPlay for a Second Screen
    5. Responding to Screen Notifications
    6. Summary
  24. Chapter 15: Game Controllers
    1. Types of Game Controllers
    2. Connecting to Game Controllers
    3. Reading Data Through Polling
    4. Data Callbacks
    5. Pausing
    6. Player Indicator Lights
    7. Snapshotting
    8. Summary
  25. Index