About the Authors |
|
xiii | |
Acknowledgments |
|
xv | |
Foreword: The Legend of Kyle, Game Hero |
|
xvii | |
Introduction |
|
xxi | |
|
Chapter 1 Getting Started with GameKit and Game Center |
|
|
1 | (28) |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
4 | (1) |
|
|
4 | (1) |
|
|
4 | (3) |
|
UFOs: Understanding the Game |
|
|
5 | (2) |
|
UFOs: Examining the Source Code |
|
|
7 | (17) |
|
Setting Up the Accelerometer Delegate |
|
|
9 | (1) |
|
Drawing the Player to the View |
|
|
10 | (1) |
|
Setting Up Cows, Beams, and Scores |
|
|
11 | (1) |
|
|
12 | (1) |
|
Watching for Touch Events |
|
|
13 | (3) |
|
|
16 | (4) |
|
Performing a Hit Test with a UIImage |
|
|
20 | (1) |
|
|
21 | (2) |
|
Configuring App Store Connect for Game Center |
|
|
23 | (1) |
|
Getting Started with App Store Connect |
|
|
24 | (3) |
|
Configuring Game Center in App Store Connect |
|
|
26 | (1) |
|
|
27 | (2) |
|
Chapter 2 Game Center: Configuring and Getting Started |
|
|
29 | (16) |
|
Creating a Game Center Manager Class |
|
|
29 | (2) |
|
Authenticating with Game Center |
|
|
31 | (6) |
|
Modifying the GameCenterManager Class |
|
|
31 | (2) |
|
Authenticating from UFOViewController |
|
|
33 | (4) |
|
Watching for Status Changes |
|
|
37 | (1) |
|
Working with GKLocalPlayer |
|
|
38 | (1) |
|
|
39 | (2) |
|
|
41 | (2) |
|
|
43 | (2) |
|
|
45 | (34) |
|
|
46 | (1) |
|
An Overview of Leaderboards in Game Center |
|
|
47 | (2) |
|
Benefits of Using Apple's Leaderboard GUI vs. a Custom GUI |
|
|
48 | (1) |
|
Configuring a Leaderboard in App Store Connect |
|
|
49 | (6) |
|
|
55 | (1) |
|
|
56 | (1) |
|
Adding Score Posting to UFOs |
|
|
57 | (3) |
|
Handling Failures When Submitting a Score |
|
|
60 | (5) |
|
|
65 | (3) |
|
Customizing the Leaderboard |
|
|
68 | (3) |
|
Modifying GameCenterManager |
|
|
71 | (1) |
|
Filtering Results on a Custom Leaderboard |
|
|
72 | (3) |
|
Displaying the Custom Leaderboard |
|
|
74 | (1) |
|
|
75 | (1) |
|
|
76 | (1) |
|
|
76 | (1) |
|
|
77 | (2) |
|
|
79 | (44) |
|
|
81 | (1) |
|
An Overview of Achievements in Game Center |
|
|
82 | (2) |
|
Benefits of Using Apple's Achievement GUI vs. a Custom GUI |
|
|
82 | (2) |
|
Configuring Achievements in App Store Connect |
|
|
84 | (15) |
|
|
90 | (2) |
|
Modifying Achievement Progress |
|
|
92 | (7) |
|
|
99 | (1) |
|
|
100 | (22) |
|
Achievement Completion Feedback |
|
|
108 | (3) |
|
|
111 | (8) |
|
Recovering from a Submit Failure |
|
|
119 | (3) |
|
|
122 | (1) |
|
Chapter 5 Matchmaking and Invitations |
|
|
123 | (36) |
|
Why Add Matchmaking and Invitations to Your App? |
|
|
124 | (2) |
|
Common Matchmaking Scenarios |
|
|
126 | (2) |
|
Creating a New Match Request |
|
|
128 | (1) |
|
|
129 | (6) |
|
Handling Incoming Invitations |
|
|
135 | (4) |
|
|
139 | (1) |
|
Matching Programmatically |
|
|
140 | (1) |
|
Adding a Player to a Match |
|
|
141 | (1) |
|
|
142 | (1) |
|
|
142 | (2) |
|
|
144 | (7) |
|
Understanding Player Attribute Limitations |
|
|
145 | (1) |
|
Working with Player Attributes |
|
|
146 | (5) |
|
|
151 | (3) |
|
Using Your Own Server (Hosted Matches) |
|
|
154 | (4) |
|
|
158 | (1) |
|
Chapter 6 Network Design Overview |
|
|
159 | (20) |
|
|
161 | (5) |
|
|
161 | (2) |
|
|
163 | (2) |
|
|
165 | (1) |
|
|
166 | (2) |
|
Reliable Data vs. Unreliable Data |
|
|
168 | (3) |
|
Sending Only What Is Needed |
|
|
171 | (2) |
|
Prediction and Extrapolation |
|
|
173 | (1) |
|
|
174 | (1) |
|
Preventing Cheating and Preventing Timeout-Related Disconnections |
|
|
175 | (1) |
|
What to Do When All Else Fails |
|
|
176 | (1) |
|
|
177 | (2) |
|
Chapter 7 Exchanging Data |
|
|
179 | (38) |
|
Modifying a Single-Player Game |
|
|
179 | (1) |
|
Setting Up Our Engine for Multiplayer |
|
|
180 | (12) |
|
|
183 | (1) |
|
|
184 | (5) |
|
|
189 | (3) |
|
Putting Everything Together |
|
|
192 | (22) |
|
|
193 | (2) |
|
|
195 | (4) |
|
|
199 | (5) |
|
|
204 | (2) |
|
Adding Network Abduction Code |
|
|
206 | (8) |
|
|
214 | (1) |
|
|
215 | (2) |
|
Chapter 8 Turn-Based Gaming with Game Center |
|
|
217 | (30) |
|
|
219 | (3) |
|
GKTurnBasedMatchmakerViewController |
|
|
222 | (4) |
|
|
226 | (3) |
|
|
229 | (4) |
|
|
233 | (5) |
|
GKLocalPlayerListener Extensions |
|
|
238 | (1) |
|
Continuing a Game in Progress |
|
|
239 | (3) |
|
|
242 | (1) |
|
|
243 | (1) |
|
|
244 | (1) |
|
|
245 | (2) |
|
|
247 | (10) |
|
Voice Chat for Game Center |
|
|
247 | (6) |
|
Creating an Audio Session |
|
|
248 | (1) |
|
Creating New Voice Channels |
|
|
249 | (1) |
|
Starting and Stopping Voice Chat |
|
|
250 | (1) |
|
|
251 | (1) |
|
|
252 | (1) |
|
|
253 | (2) |
|
Hooking Up a User Interface |
|
|
255 | (1) |
|
|
256 | (1) |
|
Chapter 10 In-App Purchase with StoreKit |
|
|
257 | (26) |
|
Setting Up Your App in App Store Connect |
|
|
259 | (12) |
|
Adding Products to Your App |
|
|
265 | (1) |
|
App IDs and In-App Purchase |
|
|
265 | (1) |
|
|
266 | (1) |
|
Retrieving the Product List |
|
|
267 | (2) |
|
Presenting Your Products to the User |
|
|
269 | (2) |
|
|
271 | (6) |
|
|
272 | (1) |
|
Purchasing Multiple Items |
|
|
273 | (1) |
|
|
274 | (3) |
|
Restoring Previously Completed Transactions |
|
|
277 | (1) |
|
Test Accounts and Testing Purchases |
|
|
277 | (1) |
|
Signing In with a Test Account |
|
|
278 | (1) |
|
Submitting a Purchase GUI Screenshot |
|
|
278 | (1) |
|
|
279 | (1) |
|
Tying Everything Together in UFOs |
|
|
279 | (1) |
|
|
280 | (3) |
|
Chapter 11 Game Controllers |
|
|
283 | (14) |
|
Types of Physical Game Controllers |
|
|
283 | (1) |
|
Connecting to Game Controllers |
|
|
284 | (2) |
|
Reading Data Through Polling |
|
|
286 | (3) |
|
|
289 | (2) |
|
|
291 | (1) |
|
|
291 | (1) |
|
|
292 | (1) |
|
|
292 | (3) |
|
|
295 | (2) |
Index |
|
297 | |