Android NDK Game Development Cookbook Over 70 exciting recipes to help you develop mobile games for Android in C++ Sergey Kosarevsky Viktor Latypov BIRMINGHAM - MUMBAI Android NDK Game Development Cookbook Copyright © 2013 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: November 2013 Production Reference: 1191113 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78216-778-5 www.packtpub.com Cover Image by Aniket Sawant ([email protected]) Credits Authors Project Coordinator Sergey Kosarevsky Apeksha Chitnis Viktor Latypov Proofreaders Reviewers Simran Bhogal Mootez Billeh Chaabani Ameesha Green Guy Cole Paul Hindle Maya Posch Indexer Acquisition Editor Priya Subramani Rebecca Youe Graphics Lead Technical Editor Abhinash Sahu Azharuddin Sheikh Sheetal Aute Technical Editors Production Coordinator Adrian Raposo Conidon Miranda Gaurav Thingalaya Cover Work Conidon Miranda About the Authors Sergey Kosarevsky is a software engineer with experience in C++ and 3D graphics. He has worked for mobile industry companies and was involved in mobile projects at SPB Software and Yandex. He has more than 10 years of software development experience, and more than four years of Android NDK experience. Sergey got his PhD in the field of Mechanical Engineering from the St. Petersburg Institute of Machine Building in Saint Petersburg, Russia. In his spare time Sergey maintains and develops an open source multiplatform 3D gaming engine, Linderdaum Engine (http://www.linderdaum.com). He is online at http:// blog.linderdaum.com and can be contacted by email at [email protected]. I would like to thank Alexander Pavlov, a Google engineer, for the time and effort he put into carefully reviewing our initial drafts and helping us to improve this book. Also I would like to thank Igor Demura (Google) for valuable criticism on our chapter 6, as well as Dmitry Ovcharov (Yandex), and other friends and colleagues who helped this book happen. Viktor Latypov is a software engineer and a mathematician with experience in compiler development, device drivers, robotics, high-performance computing, and a personal interest in 3D graphics and mobile technology. Surrounded by computers for almost 20 years, he enjoys every bit of developing and designing software for anything with a CPU inside. Viktor holds a PhD in Applied Mathematics from Saint Petersburg State University. I would like to thank my mother, Galina Fedyushina, for all of the support and the innate thirst for knowledge. About the Reviewers Mootez Chaabani works as a software engineer R&D at a French company. He has recently graduated from studies in Graphical Programming, and Virtual and Augmented Reality. He has published two apps: Quiz game in the Windows Market Place, and an Android app in the local app shop. He is currently working on Android/C++ projects based on 3D in SpacEyes. He is currently working with SpacEyes as a Software Engineer R&D. He has also worked as an Android developer at Orange, Tunisia in 2012. In 2011, he was an intern at Microsoft, Tunisia. He has also reviewed Unity Android Game Development, Beginner’s Guide, Packt Publishing, by Thomas James Moffitt-Finnegan. I would like to thank my family, my soul mate, and all my of friends including the Bardo Boys (my neighborhood friends). Guy Cole is a freelance silicon valley contractor working on mobile devices (Android and iOS), Java/J2EE, relational databases, TCP/IP networks, and UNIX/LINUX hosted enterprise solutions. Guy has designed and fielded applications for B2B, banking, health care, e-commerce, shipping, mass transit, national defense, enterprise/network management, and cable/broadcast industries. His customers include Northrop Grumman, Wells Fargo, Barclay Global Investments, Hewlett Packard, DHL Worldwide Express, Motorola, Cisco Systems, Cray Research, Tandem Computers, NCR, and many smaller (but equally interesting) companies. Maya Posch has been involved with programming and technology in general from a young age. She has endeavored to expand her programming skills mostly on low-level, embedded, and game-related programming. She currently runs her own company—Nyanko—which is involved in these aforementioned fields, in addition to doing general development work for other companies. www.PacktPub.com Support files, eBooks, discount offers and more You might want to visit www.PacktPub.com for support files and downloads related to your book. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. TM http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt’s online digital book library. Here, you can access, read and search across Packt’s entire library of books. Why Subscribe? f Fully searchable across every book published by Packt f Copy and paste, print and bookmark content f On demand and accessible via web browser Free Access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. Dedicated to my grandfather Leonid Michailowitsch Sirotkin who passed away during the editing of this book. - Dedication by Sergey Kosarevsky Dedicated to my wife Mary who supports my every new initiative. - Dedication by Viktor Latypov
Description: