Buy Learning Cocos2D Book by Ray Wenderlich - Bookswagon
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Home > Computing and Information Technology > Computer programming / software engineering > Apps programming > Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk(Learning)
Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk(Learning)

Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk(Learning)


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
X
About the Book

Build the Next Great iOS Game with Cocos2D!

 

Cocos2D is the powerhouse framework behind some of the most popular games in the App Store. If you’ve played Tiny Wings, Angry Birds, Mega Jump, Trainyard, or even Super Turbo Action Pig, then you’ve played a game that uses Cocos2D or Box2D physics. The beauty of Cocos2D is its simplicity. It’s easy to become overwhelmed when you start developing an iOS game, especially if you look at things like OpenGL ES, OpenAL, and other lower level APIs. Writing a game for the iPhone and iPad does not have to be that difficult, and Cocos2D makes game development fun and easy.

 

Learning Cocos2D walks you through the process of building Space Viking (which is free on the App Store), a 2D scrolling game that leverages Cocos2D, Box2D, and Chipmunk. As you build Space Viking, you’ll learn everything you need to know about Cocos2D so you can create the next killer iOS game.

 

Download the free version of Space Viking from the App Store today! Help Ole find his way home while learning how to build the game.

 

As you build Space Viking, you’ll learn how to

 

  • Install and configure Cocos2D so it works with Xcode 4
  • Build a complete 2D action adventure game with Cocos2D
  • Add animations and movement to your games
  • Build your game’s main menu screen for accessing levels
  • Use Cocos2D’s Scheduler to make sure the right events happen at the right times
  • Use tile maps to build scrolling game levels from reusable images
  • Add audio and sound effects with CocosDenshion—Cocos2D’s sound engine
  • Add gravity, realistic collisions, and even ragdoll effects with Box2D and Chipmunk physics engines
  • Add amazing effects to your games with particle systems
  • Leverage Game Center in your game for achievements and leader boards
  • Squeeze the most performance from your games along with tips and tricks


Table of Contents:
Preface xxi

Acknowledgments xxxiii

About the Authors xxxvii

 

Part I: Getting Started with Cocos2D 1

 

Chapter 1: Hello, Cocos2D 3

Downloading and Installing Cocos2D 4

Creating Your First Cocos2D HelloWorld 6

For the More Curious: Understanding the Cocos2D HelloWorld 11

Getting CCHelloWorld on Your iPhone or iPad 20

Summary 22

Challenges 22

 

Chapter 2: Hello, Space Viking 23

Creating the SpaceViking Project 23

Creating the Space Viking Classes 24

Creating the Background Layer 26

The Gameplay Layer: Adding Ole the Viking to the Game 29

The GameScene Class: Connecting the Layers in a Scene 31

Commanding the Cocos2D Director 34

Adding Movement 35

Texture Atlases 44

For the More Curious: Testing Out CCSpriteBatchNode 52

Fixing Slow Performance on iPhone 3G and Older Devices 53

Summary 54

Challenges 54

 

Chapter 3: Introduction to Cocos2D Animations and Actions 57

Animations in Cocos2D 57

Space Viking Design Basics 62

Actions and Animation Basics in Cocos2D 66

Using Property List Files to Store Animation Data 67

Organization, Constants, and Common Protocols 69

The GameObject and GameCharacter Classes 74

Summary 82

Challenges 82

 

Chapter 4: Simple Collision Detection and the First Enemy 83

Creating the Radar Dish and Viking Classes 83

Creating the Viking Class 90

Final Steps 105

Summary 112

Challenges 113

 

Part II: More Enemies and More Fun 115

 

Chapter 5: More Actions, Effects, and Cocos2D Scheduler 117

Power-Ups 118

Enemy Robot 125

Adding the PhaserBullet 137

GameplayLayer and Viking Updates 141

For the More Curious: Effects in Cocos2D 145

Summary 149

Exercises and Challenges 149

 

Chapter 6: Text, Fonts, and the Written Word 151

CCLabelTTF 151

Understanding Anchor Points and Alignment 153

CCLabelBMFont 155

Using Glyph Designer 156

Using the Hiero Font Builder Tool 156

For the More Curious: Live Debugging 160

Summary 165

Challenges 165

 

Part III: From Level to Game 167

 

Chapter 7: Main Menu, Level Completed, and Credits Scenes 169

Scenes in Cocos2D 169

Introducing the GameManager 170

Menus in Cocos2D 179

Scene Organization and Images 180

Creating the Main Menu 182

Additional Menus and GameplayLayer 190

For the More Curious: The IntroLayer and LevelComplete Classes 193

Summary 195

Challenges 195

 

Chapter 8: Pump Up the Volume! 197

Introducing CocosDenshion 197

Importing and Setting Up the Audio Filenames 198

Synchronous versus Asynchronous Loading of Audio 201

Adding the soundEngine to GameObjects 215

Adding Sounds to EnemyRobot 219

Adding Sound Effects to Ole the Viking 222

Adding Music to the Menu Screen 228

For the More Curious: If You Need More Audio Control 229

Summary 230

Challenges 230

 

Chapter 9: When the World Gets Bigger: Adding Scrolling 231

Adding the Logic for a Larger World 232

Creating a Larger World 235

Scrolling with Parallax Layers 250

Scrolling to Infinity 252

Tile Maps 265

Summary 276

Challenges 276

 

Part IV: Physics Engines 277

 

Chapter 10: Basic Game Physics: Adding Realism with Box2D 279

Getting Started 279

Hello, Box2D! 289

Basic Box2D Interaction and Decoration 302

Making a Box2D Puzzle Game 320

Summary 332

Challenges 332

 

Chapter 11: Intermediate Game Physics: Modeling, Racing, and Leaping 333

Getting Started 334

Creating a Cart with Box2D 346

Making the Cart Move and Jump 356

Summary 374

Challenges 374

 

Chapter 12: Advanced Game Physics: Even Better than the Real Thing 375

Joints and Ragdolls: Bringing Ole Back into Action 376

Adding Obstacles and Bridges 386

The Boss Fight! 396

Summary 417

Challenges 417

 

Chapter 13: The Chipmunk Physics Engine (No Alvin Required) 419

What Is Chipmunk? 420

Getting Started with Chipmunk 421

Adding Sprites and Making Them Move 438

Chipmunk and Constraints 455

The Great Escape! 467

Summary 477

Challenges 477

 

Part V: Particle Systems, Game Center, and Performance 479

 

Chapter 14: Particle Systems: Creating Fire, Snow, Ice, and More 481

Built-In Particle Systems 482

Getting Started with Particle Designer 485

Creating and Adding a Particle System to Space Viking 489

Summary 494

Challenges 494

 

Chapter 15: Achievements and Leaderboards with Game Center 495

What Is Game Center? 495

Enabling Game Center for Your App 497

Game Center Authentication 506

Setting Up Achievements 515

Implementing Achievements 518

Setting Up and Implementing Leaderboards 536

Summary 543

Challenges 543

 

Chapter 16: Performance Optimizations 545

CCSprite versus CCSpriteBatchNode 545

Reusing CCSprites 552

Profiling within Cocos2D 554

Using Instruments to Find Performance Bottlenecks 557

Summary 563

Challenges 563

 

Chapter 17: Conclusion 565

Where to Go from Here 567

Android and Beyond 567

Final Thoughts 568

 

Appendix: Principal Classes of Cocos2D 569

 

Index 571



About the Author :
Rod Strougo is the founder and lead developer of the studio Prop Group at www.prop.gr. Rod’s journey in physics and games started way back with an Apple ][, writing games in Basic. From the early passion in games, Rod’s career moved to enterprise software development, spending 10 years writing software for IBM and recently for a large telecom company. These days Rod enjoys helping others get started on their paths to making games. Originally from Rio de Janeiro, Brazil, Rod lives in Atlanta, Georgia, with his wife and sons.

 

Ray Wenderlich is an iPhone developer and gamer and the founder of Razeware, LLC. Ray is passionate about both making apps and teaching others the techniques to make them. He has written a bunch of tutorials about iOS development, available at www.raywenderlich.com.


Best Sellers


Product Details
  • ISBN-13: 9780132180849
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Addison Wesley
  • Language: English
  • Series Title: Learning
  • Weight: 1 gr
  • ISBN-10: 0132180847
  • Publisher Date: 22 Jun 2011
  • Binding: Digital download
  • No of Pages: 634
  • Sub Title: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk(Learning)
Pearson Education (US) -
Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk(Learning)
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk(Learning)

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!
    Hello, User