Table of Contents

11 Chapters. 465 pages. And that's just version 1.4. This book has plenty of room to grow. Check out the Table of Contents so far (remember, updates are free anytime this book gets fatter)

View details »

Resources

Drop by here after your purchase to load up on source files (images, Xcode projects, etc). The native iBook format embeds movies directly in the book, but if you choose to purchase the PDF version, you can find all the example videos posted here. Plus a few more!

View details »

Where to Buy

We've got you covered no matter what your device or reading preference. The Rolls Royce of formats would be to read on your iPad or iPad mini in the iBook format. Almost as nice, you can read as a PDF on your computer, Kindle, iPhone, Android or a bazillion other devices.

View details »


Why this Cocos2d book?


Justin Dike, professional instructor and founder of CartoonSmart.com, wrote iOS Game Programming with Xcode and Cocos2d using high resolution images, interactive galleries, screencasts, and color coded examples throughout the entire book. Imagine seeing video examples of EXACTLY what your code should be doing at certain times!

Anyone learning Xcode & Cocos2d, beginner or otherwise, will benefit from this comprehensive resource. Topics specific to game programming include: collision detection, platform and side scroller style collisions, how to program a virtual joystick, handling gestures and multiple touches, using the Accelerometer, CCActions, 3D effects, animation classes, scrolling backgrounds, sprite sheet generation, particles, menus, buttons, sound FX, score boards, property lists, singleton classes, game engines, points, health meters, leveling up, and just about everything else a first-time game designer should know to get their app in the App Store!
This book was written using iBooks Author, so it is specially formatted for your iBooks App on the iPad or iPad mini. Don't have an iPad? That's okay, the PDF version has almost as many of the great features below...

  • High definition images
  • Bookmarks
  • Highlight and add notes
  • Searchable text
  • Embedded videos
  • Interactive images
  • Tab-to-reveal the glossary definition on keywords
  • Multi-Touch features (pinch to show page thumbnails, Table of Contents, etc)
  • Hyperlinks to outside sources
  • Free updates, via push notification within iBooks App
This version of the book can be viewed on any device that supports PDF. That could be your desktop, laptop, tablet, mobile phone or whatever (Kindle, Android, iOS device, etc). None of the beauty is lost in the PDF version...

  • High definition images
  • Bookmarks (might vary depending on your e-reader)
  • Highlight and add notes (might vary depending on your e-reader)
  • Links to streaming videos
  • Searchable text
  • Hyperlinks to outside sources
  • Glossary
  • Page thumbnails (typical of most e-readers)
  • Free updates, via email notification


Press Update... Just found out the book was seen in one of the session videos at WWDC 2013. Thanks for the nod, Apple.

iOS7 Update... For the release of Xcode 5, iOS7 and Mavericks (which makes the book viewable on any Mac) we've updated the book with even higher-rez graphics, Xcode 5 screenshots and a few other changes.


Constantly updated.
465 pages and climbing!


Like those nifty iOS Apps on your phone, iBooks notify you when an update is available. Buyers of our equally great PDF version will get notified by email when an update is available. Just think about all the past programming books you've bought that went out-of-date within a year of purchase. So not cool.



Lovingly Illustrated by the Author

High definition illustrations mark the beginning of every section header and other places throughout the entire book.






Table of Contents



Free! - Ch.1 Starting Out

  • 1.1 - Why Program with Cocos2d?
  • 1.2 - What You Need to Begin
  • 1.3 - Open Xcode and Build Your First App
  • 1.4 - Starting with the Cocos2d Templates
  • 1.5 - Warnings Aren't Always Errors
  • 1.6 - Supoorted Orientations
  • 1.7 - Adding HD Images
  • 1.8 - Flexible Code for Old and New iOS Devices
  • 1.9 - Provisioning Profiles and Code Signing
  • 1.10 - The End of the Beginning

Free! - Ch.2 Objective-C Basics

  • 2.1 – Variables
  • 2.2 - Log Statements & Where to Write Your Code
  • 2.3 - If Statements
  • 2.4 - Switch Statements
  • 2.5 - Methods
  • 2.6 - While and For Statements


Free! - Ch.3 Cocos2d Basics

  • 3.1 - CCSprite
  • 3.2 - Positioning Objects
  • 3.3 - Declaring Variables in Header Files
  • 3.4 - Basic Properties
  • 3.5 - Scheduling Methods
  • 3.6 - Z Depth and Tags
  • 3.7 - Removing Children and Child Hierarchy
  • 3.8 - Your First Real Test!

Free! - Ch.4 Create Your Own Class

  • 4.1 - Put on Your Classes Glasses
  • 4.2 - Create a Class
  • 4.3 - Initialize with Parameters
  • 4.4 - The Finished Enemy Class
  • 4.5 - Iterating Through Classes
  • 4.6 - Class Properties


Ch.5 Collisions, Touches & Gestures

  • 5.1 - Collision Detection
  • 5.2 - Platform Collisions
  • 5.3 - Detecting One Touch
  • 5.4 - Detecting Multiple Touches
  • 5.5 - Touch Priority
  • 5.6 - Swipes and How to Make a Virtual Joystick
  • 5.7 - Gestures and How to Rotate a Joystick
  • 5.8 - More Gestures

Ch.6 Accelerometer and Actions

  • 6.1 - The Accelerometer
  • 6.2 - Basic CCActions
  • 6.3 - Composing Actions
  • 6.4 - Repeating Background with Actions
  • 6.5 - Point Score FX with Actions
  • 6.6 - 3D & Effects Actions

Ch.7 Animation & Particle FX

  • 7.1 - Animation Pep Talk
  • 7.2 - Animating Sprite Textures
  • 7.3 - Do-It-Yourself Animation Class
  • 7.4 - Sprite Sheet Generation
  • 7.5 - Sprite Sheet Animation
  • 7.6 - Sprite Sheet Animated Fighter
  • 7.7 - Particles

Ch.8 Menus, Sounds, Scenes & Text

  • 8.1 - Scene Basics
  • 8.2 - Menu and Buttons
  • 8.3 - Labels
  • 8.4 - NSUserDefaults and an Easy Score Board
  • 8.5 - Sound FX & Background Audio

Ch.9 Game Structure

  • 9.1 - Property Lists
  • 9.2 - Singleton Classes
  • 9.3 - The Game Engine
  • 9.4 - Points, Health, Lives & Level Advances
  • 9.5 - Game Menu with Unlocked Level Buttons
  • 9.6 - Singleton Class for Sound
  • 9.7 - The Empty Starter Kit

New in v1.3 or higher! - Ch.10 Extending Cocos2d

  • 10.1 - Connecting to Twitter or Facebook (iOS 6)
  • 10.2 - Connecting to Twitter (iOS 5)
  • 10.3 - Saving the Screen to the Camera Roll
  • 10.4 - Adding Video
  • 10.5 - Quick Start Guide to In-App Purchasing
  • 10.6 - The In-App Purchasing Classes (fully explained)
  • 10.7 - NSURL and UIAlertView

Ch.11 The End

  • 11.1 - Submission and Review
  • 11.2 - Approval
  • 11.3 - Success
  • 11.4 - Resources
  • 11.5 - More Books from CartoonSmart
  • 11.6 - Parting Words

   The code examples are all updated for the release of Cocos2d v2.1






"Made for iBooks" Edition. Available from the iBookstore.


Read the book in it's native format, on your iPad or Mac. Get all 460 pages and future updates. Just like iOS apps, book updates are free (including entirely new chapters). If you don't have a Mac, iPad or iPad mini, check out our PDF version below.







Prefer a printed version? This book has just been released by Focal Press in paperback. Click here to find out more.


Related Products...