Game Development Reference
In-Depth Information
Chapter 9
Game Center and Social Media
One of the key ways to market your game these days is to integrate your application with one
or more social media services. The idea is that users will promote your game as they play and
share their experience with their friends. To get users to play your game more often, it is also very
common to provide a mechanism for users to compare their scores with other players. Providing a
way for users to track their scores against others and to post their progress is so common in game
development that Apple provides libraries to support these requirements.
The primary service provided by Apple is called Game Center, which is implemented in the library
called GameKit. Game Center is a service that allows users to compare their scores with other
players on what is called a leaderboard. Game Center also allows users to reach what are called
achievements. Achievements are defined by each game and are intended as incentives to keep
people playing. For example, if you have an achievement that is hard to achieve, people will want to
earn it to set themselves apart from their friends playing the same game. Game Center also provides
a mechanism for multiplayer games, but we will focus on the social aspects of its services in this
chapter.
To broadcast a player's progress in a game, it is common to use an existing social media site such
as Twitter or Facebook, so the user's friends will be notified. A new feature in iOS 5 was the inclusion
of a built-in Twitter account. In this chapter, we will look at how to use the classes that expose a
Twitter account to send a tweet on behalf of the user. New to iOS 6 is built-in Facebook support. We
will look at how Twitter and Facebook supports are wrapped into a library called Social Framework.
We will look at how we can use this library to make posts to Facebook on behalf of the user.
The examples in this chapter are taken from the project Belt Commander. We will continue using
what you learn in the following pages as examples for the final two chapters, as we explore a
complete game.
Game Center
Game Center, as the user sees it, is an application on an iOS device where information about a
user's games is aggregated. This information includes a place to log in and manage your account,
a list of friends, and a list of games. For each listed game, there are a number of leaderboards for
221
z
 
Search WWH ::




Custom Search