Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Cocos2d Game Development Blueprints

You're reading from   Cocos2d Game Development Blueprints Design, develop, and create your own successful iOS games using the Cocos2d game engine

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher
ISBN-13 9781783987887
Length 440 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Jorge Jord√°n Jorge Jord√°n
Author Profile Icon Jorge Jord√°n
Jorge Jord√°n
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Sprites, Sounds, and Collisions 2. Explosions and UFOs FREE CHAPTER 3. Your First Online Game 4. Beat All Your Enemies Up 5. Scenes at the Highest Level 6. Physics Behavior 7. Jump and Run 8. Defend the Tower Index

Introducing Chipmunk


Chipmunk (http://chipmunk-physics.net) is an easy-to-use physics engine and has been fully integrated in Cocos2d-Swift since version 3.0 of the framework. Now, including physics in Cocos2d games is as easy as creating instances of the CCPhysics* family of classes. In addition, the Objective-C wrapper for Chipmunk physics, Objective-Chipmunk, is now free so there is no need to write C or C++ code anymore.

The CCNode class now has a physicsBody property that allows us to add gravity behavior, manage collisions, and combine nodes with joints easily, and in case you need more powerful physics, we can take advantage of the Objective-Chipmunk library.

In this last release of Chipmunk, a debug rendering has been included that draws a debug overlay and collision shapes, as well as new collision detection modes that we will see in detail throughout the chapter.

Now we'll describe the main classes that take part in game physics and take a look at their properties.

CCPhysicsNode

CCPhysicsNode...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image