Book Image

Cocos2d Cross-Platform Game Development Cookbook - Second Edition - Second Edition

Book Image

Cocos2d Cross-Platform Game Development Cookbook - Second Edition - Second Edition

Overview of this book

Cocos2d is the world’s leading game development framework for developing iOS games. With the introduction of Swift and Spritebuilder, it has become easier than ever to develop the games of your dreams without much effort. With Cocos2d, you can also deploy the game on Android, thereby maximizing profit and reducing development and porting costs. The book starts off with a detailed look at how to implement sprites and animations into your game to make it livelier. You will then learn to add scenes to the game such as the gameplay scene and options scene and create menus and buttons in these scenes, as well as creating transitions between them. From there on, you will get an understanding of how to program user interactions such as tapping, holding, and swiping. You’ll then add accelerometer inputs and physics to the scene, and make objects respond back to the inputs. A game is practically incomplete without audio being added, so this will be covered next. The next section will include ways to add Artificial Intelligence to enemies in the game, allowing them to patrol, chase, and shoot in a projectile manner. You will then learn to use NSUserDefault to save and load game progress, and create and access files using JSON, Plist, and XML files for custom storage and retrieval of data. Then you will learn to add dynamic lighting to your game and will use industry-wide tools such as Texture Packer, Glyph Designer, Physics Editor, Particle Designer, and Sprite Illuminator to create more visually appealing and performance-optimized games. Towards the end of the book, we dive into Apple’s latest programming language—Swift, highlighting the major differences between Objective C and Swift. The book culminates with taking your existing game developed for iOS and porting it to Android, showing you how to install the Android Xcode plugin as well.
Table of Contents (19 chapters)
Cocos2d Cross-Platform Game Development Cookbook Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

About the Author

Siddharth Shekar is a game developer with over 5 years of industry experience in game development. He has developed several games and published them on the iOS, Android, Amazon, and Windows Phone App Stores.

Siddharth has been programming for the last 11 years and is adept at C++, C#, Objective-C, Java, JavaScript, LUA, and now Swift. He has experience in developing games for the web, mobile, and desktop using Flash, Cocos2d, Cocos2d-x, Unity 3D, and Unreal Engine. Siddharth has also worked with graphics libraries such as DirectX, OpenGL, and OpenGL ES.

Apart from developing games, he also conducts game development workshops in major engineering colleges and is a visiting faculty in game development institutes.

Siddharth is also the author of the books Learning Cocos2d-x Game Development and Learning iOS 8 Game Development Using Swift, both published by Packt Publishing.

Currently, he is a lecturer in the game department of Media Design School, Auckland, New Zealand, where he teaches graphics programming and PlayStation 4/PS Vita native game development and mentors final year production students.

In his spare time, Siddharth likes to experiment with the latest game development frameworks and tools. Apart from being an avid gamer, he is interested in animation, computer graphics, and music, and is an absolute movie buff.

More information about Media Design School and Siddharth Shekar can be found at www.mediadesignschool.com.