Bayerische Küche -  - E-Book

Bayerische Küche E-Book

0,0
1,99 €

oder
-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Die 20 beliebtesten Rezepte der bayerischen Küche mit Schritt-für-Schritt-Anleitungen und brillanten Fotos laden zum Nachkochen und Genießen ein: Obatzda Laugenbrezel mit Meerrettichfrischkäse Bayerischer Fleischsalat Lauwarmer Kartoffelsalat Leberknödelsuppe Weißwurstsalat Leberkäse mit Spiegelei und Bratkartoffeln Fleischpflanzerl Schweinesenfbraten mit Bayrisch Kraut Schweinekrustenbraten mit Biersauce Krosse Schweinshaxe Bierfleisch Serviettenknödel Wildschweinragout Gebratene Bauernente Tellerfleisch Gebackenes Kalbsbries Gebackener Karpfen Steckerlfische Bayerische Creme

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB

Veröffentlichungsjahr: 2013

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



iPhone® and iPad™ Game Development For Dummies®

Table of Contents

Introduction

About This Book

Conventions Used in This Book

Foolish Assumptions

How This Book Is Organized

Part I: Getting Started

Part II: Traffic, The Game

Part III: The Social Aspects

Part IV: The iPad

Part V: The Part of Tens

Icons Used in This Book

Where to Go from Here

Part I: Getting Started

Chapter 1 : Building Great iOS Games

Figuring Out What a User Wants from an iPhone Game

Establishing a Game Developer Mindset

Noting the Features of Good Games

Device-guided design

Incorporating the fun

Designing a Good Game

Beginning with an idea

Making the idea fun, feasible, and unique

Evolving the Game

Prototyping on paper

Distilling the ingredients of fun

Applying Sid Meier’s Rule of Halves

What’s Next

Chapter 2: Becoming an iPhone Developer

Becoming a Registered iPhone Developer

Exploring the iPhone Dev Center

Looking forward to using the SDK

Resources on the iPhone Dev Center

Downloading the SDK

Joining the iPhone Developer Program

Getting Ready for the SDK

Chapter 3: Your First Date with the SDK

Developing with the SDK

Creating Your Project

Exploring Your Project

Building and Running Your Application

Working with the iPhone Simulator

Imitating hardware interaction

Emulating gestures

Uninstalling applications and resetting your device

Customizing Xcode

Using Interface Builder

Part II: Traffic, The Game

Chapter 4: How iOS Games Work

Using Frameworks

Using Design Patterns

The Model-View-Controller (MVC) pattern

The MVC in action

Working with Windows and Views

Looking out the window

Admiring the view

Exploring the kinds of views you use

Controlling View Controllers

Adding Your Own Application’s Behavior

The Delegation pattern

The Target-Action pattern

Moving Ahead with Your Game

Chapter 5: Building the User Interface

Building the Main Screen

Opening the project

Creating the first screen

Making the buttons look fancy

Adding Icons and Launch Screens

Adding the icon

Adding the launch screen

Renaming the view controller

Chapter 6: Making Objects Appear and Move

Drawing with Views

How Drawing Works on iOS

Building the Traffic View Controller

Properties

Actions and outlets

Setting up the animations

Creating Cars for the Game

Adding an image view subclass

Adding the car to the view

Using Core Animation to Animate Buttons

Understanding layers

Working with CAKeyframeAnimation

Making the buttons bounce

Chapter 7: The Life Cycle of an iOS Game

Starting with the Main Nib File

Initialization

Event processing

Termination

Considering Other Runtime Issues

Responding to interruptions

Managing memory on the iPhone

Dealing with Touch Input

The long and storied life of a UITouch

The stages of a touch

Responding to Gestures

Processing Touches

Chapter 8: Creating the Game Architecture

Putting on Your Architect’s Hat

View controllers, screens, and features

Game loops

Timers and frame rates

Game objects and your app

Designing the Screen Flow

The main menu

The game screen

The pause screen

The game over screen

The high scores screen

The settings screen

Chapter 9: Creating the Game Controller

Creating the Traffic Controller Files

Registering Cars

Creating the Game Timer

Setting up the View Controller

Keeping Track of the Clock

Creating Cars from Lanes

Registering lanes

Updating the Vehicle class

Creating new cars

Moving Cars Around

Updating car positions

Moving between lanes

Removing Cars from the Game Board

Earning More Time

Detecting Collisions

Updating the Counter

Pausing the Game

Creating the Paused View

Pausing

Making the Game End

Creating the game over view

Handling the Game Over event

Chapter 10: Using the Debugger

Figuring Out What Debugger Can Help You Do

Using the Debugger

Debugging your project

Using the Debugger window

Using Breakpoints

Using the Static Analyzer

Chapter 11: Keeping Score in Your Game

Score-Keeping in Traffic

Saving Scores

Storing files in chroot jails

File formats

Storing the Scores

Creating the scores list

Loading the scores list

Working with Scores

Adding scores to the list

Keeping score in TrafficController

Displaying the High Scores List

Creating the scores screen

Making scores visible to the player

Chapter 12: Storing User Preferences

Designing Settings

Figuring out what settings to add

Giving the user control(s)

Getting Familiar with NSUserDefaults

Providing default values

Reading settings

Writing settings

Building Custom Settings Interfaces

Using controls

Exploring the Target-Action pattern

Building Settings in Traffic

Adding the variables

Loading the default settings

Saving the settings on exit

Constructing the view controller

Building the Settings Interface

Building the interface

Coding the SettingsViewController Class

Connecting all of the code

Chapter 13: Death, Taxes, and iOS Provisioning

How the Process Works

The Distribution process

The Development process

Provisioning Your Device for Development

Getting your Development Provisioning Profile and iPhone Development Certificate

Provisioning Your Application for the App Store

Getting Your Content in the App Store via iTunes Connect

Manage Users

Contract, Tax & Banking Information

Uploading your information

What you need to get your game into the App Store

Avoiding the App Store Rejection Slip

Now What?

Chapter 14: Giving Your Game Music and Sound

Recognizing the Purpose of Sound in a Game

What music does

What sound effects do

Understanding Playback on iOS

Uncompressed audio

Compressed audio

Media playback on iOS

Playing Background Music

AVAudioPlayer

Loading the content

Playing Sound Effects

Audio ToolBox and system sounds

Playing background audio

Part III: The Social Aspects

Chapter 15: Building Multiplayer Gameswith Game Kit

Understanding the Basics of Game Kit

Designing a Multiplayer Version of a Single-Player Game

Competitive multiplayer

Cooperative multiplayer

Picking the paradigm

Communicating between players

Updating the interface

Setting Up the Session

Adding the framework to the project

Adding the button

Starting the session

Testing your game on multiple devices

Enabling In-Game Communication

Archiving objects

Constructing the message’s NSData object

Handling interruptions

Sending Extra Time

Chapter 16: Game, Meet Facebook

Looking at Facebook

Exploring the Uses of Facebook

Working with Facebook

Obtaining the Facebook SDK

Facebook sessions and permissions

Adding the Facebook iOS SDK to your project

Setting up the application delegate

Connecting to Facebook

Checking for Permission

Logging into Facebook

Posting to Facebook

Creating the interface

Posting an update

Testing Everything

Improving the User Experience

Disabling the buttons

Showing activity

Chapter 17: External Displays

Doubling the Fun with an External Display

Looking at Screens, Windows, and Views

Detecting extra displays

Differentiating among screens

Running different screen modes

Using the extra display

Adapting Your Game

Creating the window

Sending the output

Chapter 18: iAd

Using iAd

Joining the iAd Network

ADBannerView

Implementing iAd

Conform to My Protocol, Baby

Part IV: The iPad

Chapter 19: The World of the iPad

Introducing the iPad

Discovering the New Rules for iPad Apps

Multiple orientations

More room for hands

Two people, one device

Adapting Traffic for the iPad

Transitioning the project

Deciding how to transition

Resizing the views and menus

Managing multiple targets

High-resolution Screens

The Retina display

Adding a better default image

Chapter 20: Adding Multiple Lanes for the iPad

Designing Game Play for a Larger Screen

Creating Additional Lanes and Multidirectional Cars

Adding extra lanes

Creating cars

Chapter 21: Using Gesture Recognizers

Understanding Gestures

Detecting gestures

Exploring the states of a gesture recognizer

Separating gesture detection from action

Adding the Gesture Recognizer Code to Your Game

Adding the view

Responding to the gesture

Slowing down time

Chapter 22: Setting Up OpenGL

“Behold, the Third Dimension!”

Working with 3D space

A history lesson

Tiny graphics powerhouses

How OpenGL Works

Contexts

Primitives

Vertices

Rasterizing

Buffers

Shaders

Drawing stuff on the screen

OpenGL objects, names, and binding

Using OpenGL in iOS

Core Animation layers

EAGLContext, a fountain of mysteries

Displaying the frame buffer

Setting Up OpenGL for Traffic

Setting up the view

Creating the 3D view

What are these “buffers” of which you speak?

Creating the OpenGL context

Preparing the buffers

Rendering the ‘scene’

Chapter 23: Drawing with OpenGL

The Background Scene

The goal

Setting up the background rendering

Writing Fragment and Vertex Shaders

Uniforms, varyings, and attributes — oh my!

The vertex shader

The fragment shader

Tying it all together

Drawing the Scene

Setting up the vertex arrays

Drawing the scene

Chapter 24: Texturing with OpenGL

Figuring Out How Textures Work

Compressing Textures

Loading Textures

Updating the Shaders

Drawing the Texture

Making the Road Move

Chapter 25: Kicking Up Your Game a Notch

Accessing the iPod Library

Media items, media pickers, and music players

Importing the framework

Adding the user interface

Detecting Shakes

Detecting shake events

Clearing the screen

Part V: The Part of Tens

Chapter 26: Ten Differences between the iPhone and the iPad

The iPad Is Social

The iPhone Is Personal

The iPad Offers More Direct Control

You Can Play the iPad Really Loud

iPhone Users Often Wear Headphones

Games Can’t Always Be Easily Scaled from iPad to iPhone

Users Expect More from an iPad Game

The iPhone Is Used in High-Distraction Environments

Users Spend More Time Playing iPad Games

The iPhone Is Highly Portable and Moveable

Chapter 27: Ten Ways to Market Your Game

FriendTube, Tweetfeed, YouFace: Engage with Social Media

Give Away Your Game

Get Your Game Reviewed

Create a Press Kit

Use Push Notifications

Offer In App Purchase

Solicit iTunes App Store Reviews

Watch Your Sales Closely

Use Analytics

Make Your Web Site Awesome

Chapter 28: Ten Insanely Great Games

Canabalt

Flight Control

Plants vs. Zombies

Ramp Champ

DoodleJump

Frenzic

Pocket God

Words With Friends

Chopper (and Chopper 2)

Tap Tap Radiation

iPhone® & iPad™ Game Development For Dummies®

by Neal Goldstein, Paris Buttfield-Addison, and Jon Manning

iPhone® & iPad™ Game Development For Dummies®

Published byWiley Publishing, Inc.111 River St.Hoboken, NJ 07030-5774www.wiley.com

Copyright © 2011 by Wiley Publishing, Inc., Indianapolis, Indiana

Published simultaneously in Canada

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.

Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, Making Everything Easier, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.

Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Website is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Website may provide or recommendations it may make. Further, readers should be aware that Internet Websites listed in this work may have changed or disappeared between when this work was written and when it is read.

For general information on our other products and services, please contact our Customer Care Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002.

For technical support, please visit www.wiley.com/techsupport.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.

Library of Congress Control Number: 2010937820

ISBN: 978-0-470-59910-5

Manufactured in the United States of America

10 9 8 7 6 5 4 3 2 1

About the Authors

Neal Goldstein is a recognized leader in making state-of-the-art, cutting-edge technologies practical for commercial and enterprise development. He was one of the first technologists to work with commercial developers at firms such as Apple Computer, Lucasfilm, and Microsoft to develop commercial applications using object-based programming technologies. He was a pioneer in moving that approach into the corporate world for developers at Liberty Mutual Insurance, USWest (now Verizon), National Car Rental, EDS, and Continental Airlines, showing them how object-oriented programming could solve enterprise-wide problems. His book (with Jeff Alger) on object-oriented development, Developing Object-Oriented Software for the Macintosh (Addison Wesley), introduced the idea of scenarios and patterns to developers. He was an early advocate of the Microsoft .NET framework, and he successfully introduced it into many enterprises, including Charles Schwab. He was one of the earliest developers of Service Oriented Architecture (SOA), and as Senior Vice President of Advanced Technology and the Chief Architect at Charles Schwab, he built an integrated SOA solution that spanned the enterprise, from desktop PCs to servers to complex network mainframes. (He holds three patents as a result.) As one of IBM’s largest customers, he introduced the folks at IBM to SOA at the enterprise level and encouraged them to head in that direction.

He is currently passionate about the real value mobile devices can provide and has eight applications in the App Store. These include a series of Travel Photo Guides (http://travelphotoguides.com) developed with his partners at mobilefortytwo and a Digital Field Guides series (http://lp.wileypub.com/DestinationDFGiPhoneApp) developed in partnership with John Wiley & Sons. He also has a cool little, free app — Expense Calendar — that allows you to keep track of things like expenses, mileage, and time by adding them to your calendar.

Along with those apps, he has written several books on iPhone programming, including iPhone Application Development For Dummies (both editions) and Objective-C For Dummies, and he coauthored (with Tony Bove) iPhone Application Development All-In-One For Dummies and iPad Application Development For Dummies. He is also the coauthor (with Jon Manning and Paris Buttfield-Addison) of a forthcoming book on using the Unity platform for game development.

Because you can never tell what he’ll be up to next, check regularly at his Web site: www.nealgoldstein.com. You can also check out his Facebook page at www.facebook.com/nealgoldsteinbooks and follow him on Twitter at www.twitter.com/nealgoldstein.

Jon Manning has a collection of careers, which he swaps out as necessary: He’s co-founder of Secret Lab (the world’s most dangerous mobile games startup), a Senior Software Engineer at Meebo, Inc. (where he builds mobile apps that reach a stupidly huge number of people), and a Graduate Researcher in Human-Computer Interaction at the University of Tasmania in Australia (a land of computers and kangaroos). When he isn’t working on apps or books, he’s working on adding more letters to the end of his name. He spends nowhere near enough time around cats. You can find Jon online at www.desplesda.net and on Twitter at www.twitter.com/desplesda.

Paris Buttfield-Addison wears many hats: He’s co-founder of Secret Lab (www.secretlab.com.au), author, educator, and Product Manager (Mobile) at Meebo, Inc., one of the Web’s fastest growing consumer Internet companies (www.meebo.com). Paris has degrees in HCI, computer science, and medieval and modern history. He enjoys designing, producing, and building awesome experiences for mobile devices. Through some miracle of time management, he is also a Graduate Researcher in information management at the University of Tasmania, Australia. You can find Paris on the Web at www.paris.id.au and on Twitter at www.twitter.com/parisba.

Dedication

Neal Goldstein: To my children Evan and Sarah, and all my personal and artist friends who have kept me centered on the (real) world outside of writing and technology. But most of all, to my wife Linda, who is everything that I ever hoped for and more than I deserve. Yes, Sam . . . the light at the end of the tunnel is not a freight train.

Jon Manning: To my family, for introducing me to this whole “computers” thing.

Paris Buttfield-Addison: To my mother and father, for all the usual things — everything.

Authors' Acknowledgments

There is no better acquisitions editor than Katie Feltman, who did a superb job of keeping us on track and doing whatever she needed to do to us to stay focused on writing. Linda Morris did a great job in the early stages of the project, and project editor Pat O’Brien made sure all the parts were pulled together. Also thanks to copy editor Jen Riggs and technical editor Erick Tejkowski for helping us make things clearer. Thanks again to our agent Carole Jelen for her continued work and support in putting together these projects.

Publisher’s Acknowledgments

We’re proud of this book; please send us your comments through our online registration form located at www.dummies.com/register/.

Some of the people who helped bring this book to market include the following:

Acquisitions, Editorial, and Media Development

Project Editor: Pat O’Brien

Acquisitions Editor: Katie Feltman

Copy Editor: Jen Riggs

Technical Editor: Erick Tejkowski

Editorial Manager: Kevin Kirschner

Media Development Assistant Project Manager: Jenny Swisher

Media Development Associate Producers: Josh Frank, Marilyn Hummel, Douglas Kuhn, and Shawn Patrick

Editorial Assistant: Amanda Graham

Sr. Editorial Assistant: Cherie Case

Cartoons: Rich Tennant (www.the5thwave.com)

Composition Services

Project Coordinator: Sheree Montgomery

Layout and Graphics: Timothy C. Detrick, Joyce Haughey, Andrea Hornberger

Proofreaders: Laura Albert, Shannon Ramsey

Indexer: BIM Indexing & Proofreading Services

Publishing and Editorial for Technology Dummies

Richard Swadley, Vice President and Executive Group Publisher

Andy Cummings, Vice President and Publisher

Mary Bednarek, Executive Acquisitions Director

Mary C. Corder, Editorial Director

Publishing for Consumer Dummies

Diane Graves Steele, Vice President and Publisher

Composition Services

Debbie Stailey, Director of Composition Services

Introduction

On September 1, 2010, Steve Jobs took the stage in San Francisco to announce the latest and greatest iPod. During his speech, he gloated an astonishing statistic that Apple has 50 percent of the mobile gaming market; he followed up with the even more astonishing statistic that the iPod touch alone outsells both Nintendo’s mobile products and Sony’s mobile products — combined.

We don’t really need to say any more than that to convince you that developing games for Apple’s mobile platforms is worthwhile! We probably will though.

As you continue to explore the iOS as a gaming platform, you’ll be amazed at the possibilities for simple, quick attention-grabbing games that last for mere moments of time. The iPhone and iPad are, in addition to being useful and powerful mobile computers, the most interesting gaming devices in recent memory. The combination of powerful hardware, a decent display, permanent Internet connectivity, and an enormous user base (120 million iOS devices as of late 2010) makes it possible to create a class of games for mobile users that were once possible only on desktop PCs. But not only that — Apple’s App Store provides a direct sales and distribution channel to potential users that really can’t be beaten.

The iPhone and iPad, and iOS in general, are game changers for the world of game development. Never before has it been so easy for an individual, or a small group, to build a game that can be distributed to the world. One of the hallmarks of a great iOS game is that it leverages the unique hardware and operating system (iOS) that Apple produces for an extremely polished and consistent, yet unique, experience. The iOS Software Development Kit (SDK), which you use to develop iOS games, includes tools such as OpenGL ES, which makes the type of 3D graphics that would’ve never been possible on a mobile device, dare we say it, simple. The frameworks supplied in the SDK are especially rich and mature. All you really have to do is add your game’s user interface and game play mechanics to the framework, and then poof . . . an instant game. Well, sort of — but we help you through the patches that are a bit more challenging, as we guide you along the way to making an awesome game.

If you’re familiar with older versions of the SDK, you’re in for a pleasant surprise: SDK version 4.1, which includes Xcode 3.2.3, is a lot, lot better and easier to use. This book is based on iOS 4.1 for iPhone and iOS 3.2 for iPad (the latest versions at the time of writing) and Xcode 3.2.3.

If this seems too good to be true, well, okay, it is, sort of. What’s really hard, after you figure out the language and framework, is how to create a program structure for an iOS. Although there are lots of resources, the problem is exactly that: There are lots of resources — as in thousands of pages of documentation! You may get through a small fraction of the documentation before you just can’t take it anymore and plunge right into coding. Naturally enough, you’ll have a few false starts and blind alleys until you find your way, but we predict that after reading this book, it’s (pretty much) smooth sailing.

About This Book

iPhone & iPad Game Development For Dummies is a beginner’s guide to developing games for the iPhone, iPod touch, and iPad, which all run Apple’s iOS. And not only do you not need any iPad (or iPhone) development experience to get started, but you also don’t need any Macintosh development experience either. We expect you to come as a blank slate, ready to be filled with useful information and new ways to do things.

The iOS devices allow you to build truly innovative, simple, and clever games that can reach a wider audience than was ever possible for independently developed games in the past. And because you can also start small and create fun, simple games that entertain the player, it’s relatively easy to transform yourself from “you know nothing” into a game developer who, though not (yet) a superstar, can still crank out quite a respectable game.

The iPhone and iPad devices can be home to some pretty fancy games as well — so we take you on a journey through building not just a simple game but also a souped up version for the iPad that uses OpenGL ES(a 3D graphics system that we cover in Chapter 22) so that you know the ropes for developing your own game.

This book distills the hundreds (or even thousands) of pages of Apple documentation, not to mention our own game and app development experiences, into only what’s necessary to start developing real, fun games. But this is no recipe book that leaves it up to you to put it all together; rather, we take you through the frameworks and iOS architecture in a way that gives you a solid foundation in how games really work on the iPhone, iPad, and iPod touch. This book acts as a roadmap to expand your knowledge as you need to.

This book is a multiple-course banquet, intended to make you feel satisfied (and really full) at the end.

Conventions Used in This Book

This book guides you through the process of building iOS games. Throughout, you use the provided iOS framework classes for iOS (and create new ones, of course) and code them using the Objective-C programming language.

Code examples in this book appear in a monofont so they stand out a bit better. That means the code you see looks like this:

#import <UIKit/ UIKit.h>

Objective-C is based on C, which (we want to remind you) is case-sensitive, so please enter the code that appears in this book exactly as it appears in the text. This book also uses the standard Objective-C naming conventions — for example, class names always start with a capital letter, and the names of methods and instance variables always start with a lowercase letter.

All URLs in this book appear in a monofont as well:

www.nealgoldstein.com

If you’re ever uncertain about anything in the code, you can always look at the source code on the Internet at www.nealgoldstein.com or www.traffic.secretlab.com.au. (You can grab the same material from the For Dummies Web site at www.dummies.com/go/PONIES.) From time to time, we provide updates for the code there and post other things you might find useful. Neal also offers insights about everything from developing apps to the future of mobile devices and applications at www.nealgoldstein.com. Secret Lab also posts articles and notes on game design and development at www.secretlab.com.au.

Foolish Assumptions

To begin creating your iOS games, you need an Intel-based Macintosh computer with the latest version of the Mac OS on it. (No, you can’t program iPhone applications on the iPad!) You also need to download the iOS SDK — which is free — but you have to become a Registered iOS Developer before you can do that. (Don’t worry; we show you how in Chapter 2.) And, oh yeah, you need an iPhone or iPod touch (or an iPad if that’s your target device). You don’t run your game on them right away — you use the Simulator that Apple provides with the iOS SDK during the initial stages of development — but at some point, you need to test your application on a real, live iOS device.

This book assumes that you have some programming knowledge and that you have at least a passing acquaintance with object-oriented programming, using some variant of the C language (such as C++, C#, or even Objective-C). If not, we point out some resources that can help you get up to speed (including Neal’s book, Objective-C For Dummies). The examples in this book focus on the frameworks that come with the SDK; the code is pretty simple (usually) and straightforward. (We don’t use this book as a platform to dazzle you with fancy coding techniques.)

This book also assumes that you’re familiar with the iPhone and iPad, and that you’ve at least explored Apple’s included applications to get a good working sense of the iOS look, feel, and style. Browse the App Store to see the kinds of games available there, and maybe even download a few free ones (as if we could stop you).

How This Book Is Organized

iPhone & iPad Game Development For Dummies has five main parts, which we explain in more detail in the following sections.

Part I: Getting Started

Part I introduces you to the iOS game development world. You find out what makes a great iOS game, and how to exploit the iPhone, iPod touch, and iPad’s best features to create a compelling and fun gaming experience. You also discover how to sign up for the iOS Developer Program and become an official developer so that you can distribute your games through the App Store. You also explore the components of the iOS SDK, such as Xcode (the Apple development environment) and Interface Builder.

Part II: Traffic, The Game

In this part, you find out how iPhone games work, and we explain how to use the frameworks that form the raw material of any iOS app to assemble the user interface of our example game, Traffic, and to move things around on the screen. We also reveal design patterns that you need to adopt to make use of the iOS SDK. Part II also describes how to debug your games, provision your work for testing on real devices (and for distribution to the App Store), and play music and sounds.

Part III: The Social Aspects

Part III is deceptively short but intensely illuminating. These four chapters describe integrating more social technologies with your game, including Apple’s Game Kit framework for wireless networking among people on multiple devices, Facebook for posting social updates, and external display support for making your game have more of a party atmosphere.

Part IV: The iPad

With the basics behind you and a good understanding of the iPhone game architecture under your belt, it’s time to talk about money and the iPad. In this part, we discuss Apple’s iAd for generating revenue through the sale of advertising displayed in your game. Part IV also covers the theoretical and practical aspects of upsizing your game to the world of high-resolution and technologies introduced with the iPhone 4 and the iPad, such as gesture recognizers. We dip a toe in the world of OpenGL ES (Apple’s fast 3D graphics library) and speed up the world of Traffic with some new effects and features for the iPad version.

Part V: The Part of Tens

Part V consists of some tips to help you avoid figuring out everything the hard way. We talk about some key differences to consider when designing games for the iPad and iPhone, discuss some marketing tips to help get you on the road to App Store success, and showcase our ten favorite games to be inspired by.

Icons Used in This Book

This icon indicates a useful point that you shouldn’t skip.

This icon represents a friendly reminder. We describe a vital point here that you should keep in mind while proceeding through a particular section of the chapter.

This icon signifies that the accompanying explanation may be informative (dare we say, interesting?), but it isn’t essential to understanding game development. Feel free to skip past these tidbits if you want.

This icon alerts you to potential problems that you may encounter along the way. Read and obey these blurbs to avoid trouble.

Where to Go from Here

Dive into the exciting world of iOS game development! If you’re nervous, take heart: The iOS is still so new and such rich territory for developers to mine, that no company or individual has a lock on innovating with it. Your idea just might be the exciting game that everyone’s waiting for.

Don’t forget to check out our Web sites at www.nealgoldstein.com, www.secretlab.com.au, and www.traffic.secretlab.com.au or www.dummies.com/go/iphoneipadgameprogramming.

Now, get ready to have some fun building games!

Please note that some special symbols used in this eBook may not display properly on all eReader devices. If you have trouble determining any symbol, please call Wiley Product Technical Support at 800-762-2974. Outside of the United States, please call 317-572-3993. You can also contact Wiley Product Technical Support at www.wiley.com/techsupport.

Part I

Getting Started

In this part . . .

You say you want a revolution? Well, here’s the plan: This part explains what you need to know to get started on the Great iOS Game Design and Development Trek. After reading this part, you can evaluate your idea for an iOS game application, see how it stacks up, and figure out what you have to do to transform it into something that knocks your users’ socks off.

You have to register as an Apple developer if you want to get the Software Development Kit (SDK) and all the other goodies that Apple provides for developers — and of course, that means agreeing to a confidentiality agreement. And if you actually want to run your application on a real iOS device, you have to join the iOS Developer Program. This part gets you through these processes and introduces you to the SDK. Here’s a breakdown of the chapters in this part:

Chapter 1 describes the features of iOS devices and the elements that make a great game. You find out how to exploit the platform’s features and embrace its limitations. You also discover how to design with both while keeping user expectations in mind.

Chapter 2 gets you into the Apple developer village. You find out how to register as a developer, join the program, explore the developer center on the Web, and download the SDK.

Chapter 3 goes into more detail about the SDK itself. You find out all about Xcode and Interface Builder, how to start a game project from a template, how to build and run a game, and how to customize Xcode to your liking.

Chapter 1

Building Great iOS Games

In This Chapter

Getting your mind on the game developer track

Discovering the features that make for a good game

Figuring out your game concept

Fine-tuning the possibilities in your game design

Just as you find with any type of app, the range of games available for the iPhone (and iPad) is huge. They range from games that are expected to be chart busters from the beginning (the games produced by giant studios, such as Electronic Arts) to games made by individuals in their spare time that become huge hits (for example, Trism and Flight Control).

So, as a soon-to-be iPhone and iPad game creator, you need to find your slot in the range of games. As the authors of this book, we help you do that. In this chapter, we tell you how to get into the game developer mindset, determine what makes a good game, initiate a game concept, and then design the game to fully develop that concept.

When we started writing this book, we spent a lot of time figuring out the best way to showcase iOS game development. After much deliberation, we decided to showcase a complete game, dubbed Traffic, from start to finish. The alternative was to merely show you how to build pieces that could be useful in the development of a game. Instead, we chose to build a commercial-quality game step by step, demonstrating all the concepts and knowledge you need to build an amazing, real game of your own.

Enjoy!

iPhone, iPads, iDon’tKnows

The iPad, Apple’s new computer, is fresh out of the factories and being bought by the millions. The iPad has been (somewhat unfairly) described as a “giant iPhone,” which is inaccurate from a user experience point of view but rather accurate from a technical point of view.

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!