Chapter 7. Connecting Players in Real Time

In This Chapter

Facing the challenges of real-time multiplayer games

Understanding game design: Competition

Choosing your connection options

Hooking up with your peers

Programming: AmuckPuck

Analyzing business aspects

We could have covered multiplayer apps in a single chapter; however, the technologies exposed in the 3.0 SDK warrant two separate discussions. In this chapter we focus on peer-to-peer (P2P) connectivity. Real-time games are well suited to this technology, so our example game will employ peer-to-peer and head-to-head connections. In Chapter 8 we will cover push notification. Even though push notification was not designed for gaming, it makes a perfect fit for turn-based gaming. It's important to cover peer-to-peer first because you will be able to use what you learn in this chapter to add peer-to-peer connectivity to your turn-based games.

In this chapter, you'll examine multiplayer connectivity in the game AmuckPuck. Air hockey has been a hit on the iPhone, probably because it is such a natural fit for the device. We cover it here partly because of this natural fit and the great illustration it serves for this material; however, it's also one of our personal favorites. We are hoping that you will take this example and build some really cool new versions of air hockey that we can all enjoy.

Finally, since there are already so many versions of air hockey currently available, we will consider how to make a game attractive in a replacement ...

Get iPhone® Game Development 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.