Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Author
About the Technical Reviewer
Acknowledgments
Foreword: The Legend of Kyle, Game Hero
Introduction
Chapter 1: Getting Started with Game Kit and Game Center
Game Kit: An Overview
Networking
Game Center
Voice Chat
Sample Game: UFOs
UFOs: Understanding the Game
UFOs: Examining the Source Code
Setting Up the Accelerometer Delegate
Drawing the Player to the View
Setting Up Cows, Beams, and Scores
Handling Rotation Events
Adding Player Movements
Watching for Touch Events
Spawning and Moving Cows
Performing a Hit Test with a UIImage
Abducting a Cow
Configuring iTunes Connect for Game Center
Getting Started with iTunes Connect
Configuring Game Center in iTunes Connect
Summary
Chapter 2: Game Center: Setting Up and Getting Started
Testing for Game Center
Authenticating with Game Center
Modifying the GameCenterManager Class
Authenticating from UFOViewController
The Sandbox
Watching for Status Changes
Working with GKLocalPlayer
Retrieving a Friends List
Friend List Avatars
Working with Players
Summary
Chapter 3: Leaderboards
Why a Leaderboard?
An Overview of Leaderboards in Game Center
Benefits of Using Apple's Leaderboard GUI vs. a Custom GUI
Configuring a Leaderboard in iTunes Connect
Posting a Score
Setting a Default Leaderboard
Adding Score Posting to UFOs
Handling Failures When Submitting a Score
Presenting a Leaderboard
Customizing the Leaderboard
Modifying GameCenterManager
Filtering Results on a Custom Leaderboard
Displaying the Custom Leaderboard
Mapping a Player ID
Local Player Score
A Better Approach
Summary
Chapter 4: Achievements
Why Achievements?
An Overview of Achievements in Game Center
Benefits of Using Apple's Achievement GUI vs. a Custom GUI
Configuring Achievements in iTunes Connect
Presenting Achievements
Modifying Achievement Progress
Resetting Achievements
Adding Achievement Hooks
Another Convenience Method
Achievement Completion Feedback
iOS 5 Completion Banners
Custom Achievement GUI
Recovering from a Submit Failure
Summary
Chapter 5: Matchmaking and Invitations
Why Add Matchmaking and Invitations to Your App?
Common Matchmaking Scenarios
Creating a New Match Request
Presenting Match GUI
Handling Incoming Invitations
Auto-Matching
Matching Programmatically
Adding a Player to a Match
iOS 5 Reinvites
Player Groups
Player Attributes
Understanding Player Attribute Limitations
Working with Player Attributes
Player Activity
Using Your Own Server (Hosted Matches)
Summary
Chapter 6: The Peer Picker
Benefits of the Peer Picker
Real-World Examples
Working with Sessions
Presenting a Peer Picker
Advanced GKSession Interaction
The Peer Picker Delegate
Summary
Chapter 7: Network Design Overview
Three Types of Networks
Peer-to-Peer Network
Client-to-Host Network
Ring Network
Less Common Networks
Reliable Data vs. Unreliable Data
Sending Only What Is Needed
Prediction and Extrapolation
Formatting Messages
Preventing Cheating and Preventing Timeout-Related Disconnections
What to Do When All Else Fails
Summary
Chapter 8: Exchanging Data
Modifying a Single-Player Game
Setting Up Our Engine for Multiplayer
Picking a Host
Sending Data
Receiving Data
Putting Everything Together
Selecting the Host
Displaying the Enemy UFO
Spawning Cows
Sharing Scores
Adding Network Abduction Code
Disconnections
Summary
Chapter 9: Turned-Based Gaming with Game Center
A New Sample Project
GKTurnedBasedMatchmakerViewController
Starting a New Game
Making the First Move
Continuing a Game in Progress
Ending a Match
Quitting and Forfeiting
Programmatic Matches
GKTurnBasedEventHandler
Summary
Chapter 10: Voice Chat
Voice Chat for Game Center
Creating an Audio Session
Creating New Voice Channels
Starting and Stopping Voice Chat
Chat Volume and Muting
Monitoring Player State
Voice Chat for Game Kit
Creating an Audio Session
Required Overhead
Getting Things Running
Putting It Together
Summary
Chapter 11: In-App Purchase with StoreKit
Setting Up Your App in iTunes Connect
Adding Products to Your App
App IDs and In-App Purchase
Setting Up
Retrieving the Product List
Presenting Your Products to the User
Purchasing a Product
Purchasing Code
Purchasing Multiple Items
Processing a Transaction
Restoring Previously Completed Transactions
Test Accounts and Testing Purchases
Signing in with a Test Account
Submitting a Purchase GUI Screenshot
Developer Approval
Receipts
Tying Everything Together in UFOs
Summary
Index
← Prev
Back
Next →
← Prev
Back
Next →