Skip to Main Content
Learning iPhone Game Development with Cocos2D 3.0
book

Learning iPhone Game Development with Cocos2D 3.0

by Kirill Muzykov
June 2014
Beginner to intermediate content levelBeginner to intermediate
434 pages
9h 49m
English
Packt Publishing
Content preview from Learning iPhone Game Development with Cocos2D 3.0

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Swift Games Development for iOS: Develop 2D and 3D games Using Apple's SceneKit and SpriteKit

Beginning Swift Games Development for iOS: Develop 2D and 3D games Using Apple's SceneKit and SpriteKit

James Goodwill, Wesley Matlock

Publisher Resources

ISBN: 9781782160144Supplemental Content