I’ve finished reading over a new eBook by author David Hill: “Cocoa Game Programming Workshop”. This book takes readers through the steps to make a simple 2D game with Cocoa on Mac OS X with XCode. Beginning with the assumption that the reader has already been through the basics of Objective-C under Cocoa, the author takes you through the various steps of the game’s development – key presses, graphics, sound, and more.
Let me emphasize it now – make sure you go through the O’Reilly and/or Hillegass books of Cocoa and Objective-C, before you go on to this book. This isn’t an introduction to Cocoa, that’s for sure. In fact, though I had been through both of those previously mentioned books, I found myself lost at times. Due to the fact that the book is one continuous project, if you get lost in one part and can’t figure out how to debug it, you won’t be able to continue on. Fortunately, they provide some code examples for you to use if you’re stuck.
In the second chapter, he tells you about all of the different possibilities and stuff like APIs. In chapter 3, he starts you in on the prototype – the design, the keypresses, and the monsters. In the following chapters, he has you “refactor” the project – that is, organize and clean up the code. In chapter 5, you add sound. The provided sound clips are kind of annoying, so try to use something from Star Wars or something instead. In the remaining chapters after that, he shows you more that you can do with images and making it look nicer, and helps you finish the project.
From what I can tell, the book doesn’t have any glaring issues, and covers a pretty good amount of material considering the length of the book. Since his goal isn’t to give you a primer on Objective-C, the book jumps right into the material. He starts by laying out the goal of the book, and then leads the reader into building a “prototype” – a very basic run-through of the game. You slowly add the controls, monsters, bullets, pick-ups, etc. Following the working prototype, you go through the code, making separate classes, and adding things like sound, and the ability to add in more cool stuff, and then “polish” to the finished game.
The only irk that I don’t like about the book is that it may not be accessible to all of its target audience, as readers have to understand Objective-C and Cocoa to keep up with the author. If he would just add a bit more material to help explain more, and ease the reader into the material. Considering that the book is only 152 pages, and it’s not like we have a lot of books that cover Cocoa with Objective-C anyway, it wouldn’t hurt for him to cover a little more material.
All in all, the $10 price isn’t too bad for this eBook, though you’ll want to read up on Cocoa basics first. If you’re looking for a regular paper book, unfortunately, the publisher isn’t making one yet. You can find out more about the book at their site – www.spiderworks.com.