Chapter 8. Taking Turns with Other Players

In This Chapter

Examining turn-based game play

Understanding game design: Strategy

Choosing your connection options

Finding friends to compete against

Programming: Amuck-Tac-Toe

Analyzing business aspects

Now that you have been exposed to connecting players in real time, the transition to turn-based game play should be relatively straightforward. Turn-based games do not carry the technical obstacles you face in real-time game development. The game state in a turn-based game is much more portable and the players' moves are not as time sensitive. With fewer obstacles, you can connect players in many more ways.

Of course, you can (and should) still use peer-to-peer and head-to-head connections, but now you can easily connect players who are miles away with the assistance of a Web server. In this chapter we'll guide you through the process of creating the client side of an app that calls Web services to share messages between players. This by itself is powerful, but then you are going to throw fuel on the fire by adding push notification. With push notification you can give a player the power to initiate a game with a friend who may not even have your application up and running. Push notification can update a badge, display an alert, and play a sound. When the opponent accepts the challenge from the alert, the game can launch as soon as his friend is ready.

We have chosen to discuss these topics in the context of our version of the classic game tic-tac-toe, ...

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.