Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning iPhone Game Development with Cocos2D 3.0

You're reading from   Learning iPhone Game Development with Cocos2D 3.0 Harness the power of Cocos2D to create your own stunning and engaging games for iOS

Arrow left icon
Product type Paperback
Published in Jun 2014
Publisher
ISBN-13 9781782160144
Length 434 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
 Muzykov Muzykov
Author Profile Icon Muzykov
Muzykov
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Learning iPhone Game Development with Cocos2D 3.0
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. All About Cocos2D FREE CHAPTER 2. Hello Cocos2D 3. Cocos2D – Under the Hood 4. Rendering Sprites 5. Starting the Action 6. Rendering Text 7. Animations and Particle Systems 8. Adding Sound Effects and Music 9. User Interface and Navigation 10. Physics 11. Working with Tile Maps Pop Quiz Answers Index

Time for action – alternative control using a gyroscope


It will be even more fun to control our hunter using a gyroscope.

Note

A Gyroscope is a device that measures an iPhone's orientation. Using a gyroscope, you can tell how your iPhone is positioned in the world. This way, if you track the gyroscope information, you can track when the user tilts or rotates a device in hands. A gyroscope is often used in racing games, where you can use your iPhone as a steering wheel. We'll use it to control the hunter's aim.

Unfortunately, only happy owners of the iOS devices and participants of the Apple iOS Developer Program can test the code in this part of the chapter, as you cannot test a gyroscope on the simulator.

Note

You can still follow this chapter to learn information on how to use the gyroscope. If you decide to skip this chapter, take the final project for this chapter from the Chapter_05/Cocohunt_05_Final folder as a starter project for the next chapter as we're going to build on it.

To get information...

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 £13.99/month. Cancel anytime
Visually different images