Chapter 21. Using the Game Kit API
In This Chapter
Adding peer-to-peer ad hoc networking to your iPhone applications |
Adding voice chat to your iPhone applications |
As part of iPhone OS 3, Apple introduced the Game Kit API. Game Kit is a new framework that aims to solve two main problems facing application and game developers.
The first problem is the ability to create ad hoc peer-to-peer networks among devices within close proximity to each other. To satisfy this need, Game Kit provides a sophisticated, yet simple-to-use mechanism for doing exactly this over the Bluetooth networking capability built into iPhone and the second-generation iPod Touch.
The second problem is the ability to add in-game voice to applications. This is a common requirement among applications that enable multi-user play, and including this capability is generally beyond the abilities or resources of most developers. To solve this, Game Kit provides an easy-to-use in-game voice capability that leverages Apple's prior experience in adding voice to iChat, and brings that power to the realm of developers. Developers don't need to know about codecs, or protocols; they just use the API, and everything is handled for them.
In this chapter, you'll examine these two frameworks and see how you can leverage them in your games and applications. In particular, it should be pointed out that just because it's called Game Kit doesn't mean that the features in this API are only applicable to games. The peer-to-peer networking capability, ...
Get Cocoa Touch™ for iPhone® OS 3 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.