|Writing Game Center Apps in iOS|
Author: Vandad Nahavandipoor
You have to be careful when you read the title of this slim book. It's not on games-centric apps but games center apps.
Games Center is Apple's online service which you can use to manage and reward players of a game you create. So this book isn't about creating games but about registering users, recording their scores and creating and using leaderboard. This is a fairly narrow topic and hence a short 66 page book should cover it.
The second thing you need to know is that this is a cook book even though it doesn't say anything about it on the cover. It consists of 18 recipes that take you through each aspect of using game center. Given that this is a short introductory book on a fairly simple topic it really doesn't need to adopt the problem-solution format of a cook book. It really should explain what you need to know to use game center in a tutorial style rather than breaking up the tasks into recipes.
It starts off explaining or rather not explaining the use of block objects and the scheduling procedures provided in iOS. The style of explanation is to simply present the code and say "this is how it is done". There is not in depth explanation of where block objects come from, what they are used for or anything helpful. At the end of the recipe there is a reference to a URL on the Apple Developer site that does explain the idea and does it very well complete with diagrams, overview and examples. This simply highlights the poor job that the book does. If you want to know about block objects then simply use the web to look them up.
From here we move on to look at how to sign up to game center, how to set it up and how to add the game kit framework. Surely much of this material should come before block objects and scheduling?
After covering the basics the book presents recipes for the standard operations - authentication, getting the players data, adding friends, creating a leaderboard, updating a leaderbaord, displaying a leaderboard, working with achievements and multi-player games.
All of the recipes follow the same basic plan of problem and solution, and mostly the text that explains the programs doesn't add much. The big problem is that the problem-solution format means that after stating the problem the author can simply present the solution and consider that the job is done without having to ask if the ideas have been adequately explained.
The format is also wrong because some of the problems are trivial and so are the solutions. For example, the problem is getting some data about a player and the solution is use the properties of the GKLocalPlayer class. It would have been much better to introduce the structure of the framework as a tutorial that didn't chop the ideas and tasks up into formulaic boxes.
Another problem is that the player handling code is presented in isolation from a real game so it has no context at all. I can't really see how this could be avoided but it is occasionally makes you think "where does this fit".
If you really need to plug your game into Game Center then this book does contain the example code you need to do the job but don't expect deep understanding of what you are doing. As you have to have already written a game before you want to even address this subject matter, this book isn't for the beginner. And if you are expert enough to have completed a game in Objective C and iOS you are probably able to workout for yourself how to use Game Center from the documentation.
|Last Updated ( Thursday, 17 November 2011 )|