Game Development for Ios with Unity3d Game Game Jeff W
Total Page:16
File Type:pdf, Size:1020Kb
Game Development for iOS with UNITY3D Game Game JEFF W. MURRAY Development for iOS with UNITY3D Game Development for iOS with Unity3D takes you through the complete process of Unity Development iOS game development. A game developer for over 12 years, Murray presents production- proven techniques and valuable tips and tricks needed to plan, build, test, and launch JEFF W. MURRAY games for the iPhone, iPod, and iPad. He walks you through all the necessary procedures, including how to publish your game to the App Store. This practical book begins with advice on writing a game design document and getting Apple developer certification. It then covers the build processes of the Unity Remote ap- plication and explains how to use the Unity editor. After focusing on debugging and op- timization, the author describes tips for designing and marketing a successful App Store page. The book also features two iOS-ready games to explore, adapt, and play. Source files for the game examples are available at www.crcpress.com. for Accessible to indie game developers and small- to medium-sized studios, this hands-on i guide gives you the tools and knowledge needed to start building and launching iOS games OS with Unity3D. with Jeff W. Murray runs PsychicParrot Games, which develops iOS, Android, downloadable, and browser-based games and explores UNITY3D experimental game technologies such as brainwave readers and robotics. He has programmed and designed games as a hobby for nearly 30 years and has worked in game development and browser- based entertainment for over 12 years, working with companies such as Microsoft, RealNetworks, and Sony. K14133 Computer Graphics Game Development for iOS with Unity3D wWw.LegendaryLibrary.ir ~~~~~~~~~~~~~~~~~~~~~ This page intentionally left blank Game Development for iOS with Unity3D Jeff W. Murray wWw.LegendaryLibrary.ir ~~~~~~~~~~~~~~~~~~~~~ Cover image courtesy of Unity Technologies. CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2013 by Taylor & Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, an Informa business No claim to original U.S. Government works Version Date: 20120615 International Standard Book Number-13: 978-1-4398-9220-6 (eBook - PDF) This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com This book is dedicated to my Nan. She never doubted me for a second, and without her love and encouragement, I would probably be someone very different, doing something very different, and perhaps enjoying life a lot less. wWw.LegendaryLibrary.ir ~~~~~~~~~~~~~~~~~~~~~ This page intentionally left blank Table of Contents Introduction xi Prerequisites.............................................................xii What This Book Covers . xiii What This Book Doesn’t Cover.............................................xv Acknowledgments........................................................xvi 1. Designing Your Game 1 1.1 It’s Not as Easy as It Looks! ............................................2 1.2 Play Testing ..........................................................2 1.3 iOS Platform-Specific Considerations ...................................3 1.4 Clear Out Your Clutter ................................................7 1.5 Stay Grounded in Reality ..............................................7 1.6 Preproduction........................................................9 1.7 Mind Mapping ......................................................10 1.8 Scripting and Storyboarding ..........................................11 1.9 Gantt Charts ........................................................11 1.10 Task List Management ...............................................12 1.11 Software for Word Processing and Writing .............................12 1.12 Writing Game Design Documents .....................................12 1.13 Why Project Manage? ................................................20 1.14 Project Management for Guerillas .....................................20 1.15 Set Work Time and Stick to It .........................................22 1.16 Tasks Lists ..........................................................22 1.17 Stay Healthy ........................................................22 1.18 Keep Communication Going .........................................24 wWw.LegendaryLibrary.ir ~~~~~~~~~~~~~~~~~~~~~ viii Table of Contents 1.19 When Good Games Go Bad ..........................................24 1.20 Testing and Quality Assurance ........................................26 1.21 What Bug Reports Should Include .....................................27 2. Getting Set Up for iOS Development 31 2.1 Which Version of Unity Do You Need? .................................32 2.2 The ppleA Developer Program Subscription ............................35 2.3 Choosing the Right Developer Program Subscription ....................35 2.4 A Summary of the iOS Developer Setup Process.........................36 2.5 Developer Tools .....................................................36 2.6 Basics of the Apple Developer Center ..................................36 2.7 Overview of the Apple Developer Center Areas .........................37 2.8 Setting Up the Certificates You Need for Development ...................39 2.9 Setting Up iOS Devices to Use for Development and Testing..............42 2.10 Setup and Download Provisioning Profiles..............................45 3. Setting Up Unity and Your Mac for iOS Development 49 3.1 Introduction to Unity ................................................49 3.2 Setting Up Unity to Work with Your Apple Developer Profile . .50 3.3 Downloading and Installing Apple Developer Certificates . 56 3.4 What Is the Unity Remote? ...........................................56 3.5 Installing Unity Remote onto the Device................................57 3.6 Naming Profiles Properly .............................................58 4. Basics of the Unity Editor 59 4.1 What Makes a Unity Project? .........................................59 4.2 Finding Your Way Around ............................................62 4.3 Navigating the Game Scene ...........................................66 4.4 Finding Objects in a Scene Quickly ....................................68 4.5 Unity Physics: PhysX .................................................69 5. Building a Game in Unity iOS: The Roll-a-Ball Game 73 5.1 Game Overview .....................................................73 5.2 Controls ............................................................74 5.3 Making the Game....................................................74 5.4 Building and Testing the Game on Your iOS Device......................95 5.5 There’s Always Room for Improvement.................................98 6. Making a Kart-Racing Game 101 6.1 Game Overview ....................................................101 6.2 Controls ...........................................................102 6.3 Making the Game...................................................102 6.4 Choosing Random Textures for the Cars...............................166 Table of Contents ix 6.5 Drawing the In-Game User Interface..................................167 6.6 Sound Effects ......................................................174 6.7 Making the Game Even Better........................................176 7. Debugging and Script Optimization 179 7.1 Introduction to the Debugger ........................................179 7.2 Strategies for Wiping Out Bugs.......................................179 7.3 Console Debugging .................................................180 7.4 Retrieving PlayerPrefs and Application-Specific Files from an iOS Device . 189 7.5 Script Optimization.................................................190 7.6 An Introduction to the Profiler (Pro-Only Feature) . .193 8. Optimizing for File Size and Performance