Code from our iOS Game Development Cookbook, for O'Reilly Media.