<p>iPhone games are hot! Just look at the numbers. Games make up over 25 percent of total apps and over 70 percent of the most popular apps. Surprised? Of course not! Most of us have filled our iPhone or iPod touch with games, and many of us hope to develop the next best-selling, most talked-about g
Beginning iPhone Games Development
✍ Scribed by PJ Cabrera, Peter Bakhirev, Ian Marsh, Ben Smith, Eric Wing
- Tongue
- English
- Leaves
- 729
- Edition
- 1
- Category
- Library
No coin nor oath required. For personal study only.
✦ Synopsis
iPhone games are hot! Just look at the numbers. Games make up over 25 percent of total apps and over 70 percent of the most popular apps. Surprised? Of course not! Most of us have filled our iPhone or iPod touch with games, and many of us hope to develop the next best-selling, most talked-about game. You’ve probably already read and mastered Beginning iPhone 3 Development; Exploring the iPhone SDK, the best-selling, the second edition of Apress’s highly acclaimed introduction to the iPhone and iPod touch by developers Dave Mark and Jeff LaMarche. This book is the game-specific equivalent, providing you with the same easy-to-follow, step-by-step approach, more deep technical insights, and that familiar friendly style. While games are all about fun, at the same time, they’re serious business. With this book, you’re going to roll up your sleeves and get your hands dirty with some hardcore coding. While you may have written games before, this book will take you further, immersing you in the following topics: Game graphics and animation with UIKit, Quartz, Core Animation, and OpenGL ES Game audio with OpenAL, MediaPlayer Framework, AV Foundation, and AudioSession Game networking with GameKit, Bonjour, and Internet sharing What you’ll learn Efficient methods for drawing in 2D and 3D to the iPhone screen Game-specific animation techniques with Core Animation To use OpenGL ES for more complex and realistic gaming backgrounds and action Numerous ways to add music to enhance the gaming experience How to give your users access to their iPhone libraries from within games The tools and techniques of 3D audio for creating even more realistic gaming experiences How to do networking right, including two-player games over Bluetooth and multiplayer games over Wi-Fi Who this book is forAll game developers who desire to create iPhone and/or iPod touch games Table of Contents A Revolutionary Gaming Platform Games for Everyone, Anytime, Anywhere Developing iPhone Games Peeking Inside the iPhone Toolbox Moving Images on a Small Screen—UIKit Controls She Shoots, She Hits, She Scores! Flipping Out and Sweeping Away with Core Animation OpenGL Basics: Wrapping Your Head Around the OpenGL AP Putting It Together: Making a Game in OpenGL The Next Steps: Atlases, Sprites, and Particles—Oh My Introduction to Core Audio Making Noise with OpenAL 3D Audio—Turning Noise into Game Sound Streaming: Thumping, Pulse-Quickening Game Excitement Networking for iPhone Games: Introductio Going Head to Head Party Time Connecting with the Outside World Putting It All Together: Now Comes the Fun Part
✦ Table of Contents
Prelim......Page 1
Contents at a Glance......Page 6
Contents......Page 7
About the Authors......Page 15
About the Technical Reviewer......Page 17
Acknowledgments......Page 18
Introduction......Page 19
The Ever-Present iPhone......Page 21
Mass Appeal—There’s a Gamer Born Every Minute......Page 22
User Interfaces—Death of the D-Pad......Page 24
Connectivity—Plays Well with Others......Page 25
User Data—This Time It’s Personal......Page 26
Device Performance—A Multimedia Powerhouse......Page 28
Dev Kit? You’re Holding It!......Page 29
Innovation—Good Things Come from Small Developers......Page 30
Summary......Page 31
Development Tools and Environment......Page 33
UIKit......Page 34
Quartz 2D and Core Animation......Page 35
OpenGL ES......Page 36
Audio APIs......Page 37
Networking......Page 38
Summary......Page 39
A Quick Introduction to Cocoa Touch......Page 41
The Frame Property......Page 50
The Center Property......Page 52
Building a Simple Game......Page 53
Loading and Displaying Images Programmatically......Page 77
Creating the Grid of Bricks......Page 79
Detecting image View Collisions......Page 81
Application Delegate Events......Page 87
Saving and Loading Game State......Page 89
Animating Images......Page 92
Summary......Page 98
Quartz 2D Game Overview......Page 99
Every Artist Needs a Canvas......Page 101
Your First Graphic with Quartz 2D......Page 109
Sprites......Page 113
Which Way Is Up?......Page 122
Vector Art......Page 125
Flipbook Animations......Page 132
Heads-Up Displays......Page 143
Asteroids Game Architecture......Page 150
Conclusion......Page 156
Flipping Out and Sweeping Away with Core Animation......Page 157
Core Animation Sample Project Overview......Page 158
Animating UIViews......Page 160
Animating Core Animation Layers......Page 173
Summary......Page 179
What Is OpenGL ES and Why Do I Care?......Page 181
Understanding the 3D World......Page 182
Matrix Basics: Taking the Red Pill......Page 184
Rendering Basics......Page 189
The Basic Game Template......Page 190
Wrapping the CAEAGLLayer in a View: EAGLView......Page 192
How to Draw Stuff with OpenGL......Page 204
The Game Loop and the Timer......Page 214
The Input Controller......Page 219
Summary......Page 220
Space Rocks! Game Design......Page 223
Getting Started with the Template......Page 225
Rotation Makes the World Go 'Round......Page 226
3D Point Upgrade......Page 229
Adding Buttons......Page 231
Building a Better Spaceship......Page 244
Space Rocks!......Page 250
Adding Missiles......Page 254
Making Nicer Buttons......Page 256
Collision Detection......Page 258
Collisions on the Rocks......Page 264
Summary......Page 278
Textures and Texture Atlases......Page 281
Sprite Animation......Page 300
From 2D to 3D......Page 307
Particle Systems Add Life to Your Game......Page 321
Summary......Page 333
Audio Services Provided by Core Audio......Page 335
The Core Audio Frameworks......Page 340
Codecs and File Formats......Page 341
Alerts and Vibration: Introducing System Sound Services......Page 347
Setting Policies for Your Audio: Introducing Audio Session Services......Page 356
Easy Audio Playback in Objective-C with AVFoundation......Page 361
Mission Complete…but Our Princess Is in Another Castle!......Page 371
Making Noise with OpenAL......Page 373
OpenAL Overview......Page 374
My Story and Goals for Audio Coverage......Page 378
Roadmap for the Audio Coverage......Page 379
Setting Up Basic Sound in OpenAL......Page 380
Exposing Flaws and the Missing Details......Page 396
Sound Resource Manager: Fixing the Design......Page 412
Sound File Cache Pool of Sources......Page 414
Save Point Reached......Page 442
The Design of OpenAL: Sources, Buffers, and Listeners......Page 443
in OpenAL......Page 444
Integrating the Listener into Space Rocks!......Page 446
Adding Positions to Sounds......Page 449
Listener Orientation......Page 454
y (cos t, sin t) 1 t x......Page 457
BookmarkTitle:......Page 458
BookmarkTitle:......Page 459
Source Direction and Cones......Page 461
Velocity and the Doppler Effect......Page 464
SpeedOfSound – DopplerFactor ivelocity......Page 466
Distance Attenuation......Page 468
x – ReferenceDistance......Page 469
ReferenceDistance......Page 472
= MaxDistance......Page 473
Using Relative Sound Properties to Selectively Disable 3D Effects......Page 479
Achievement Unlocked: Use All OpenAL 3D Features......Page 481
Music and Beyond......Page 483
iPod Music Library (Media Player Framework)......Page 486
Audio Streaming......Page 494
OpenAL Source......Page 502
Work-Arounds......Page 531
Audio Capture......Page 536
8......Page 550
Back to OpenGL......Page 551
The End of the Audio Road......Page 555
Meet the Network......Page 557
iPhone SDK and Networking......Page 560
Summary......Page 562
Hello Pong!......Page 563
Using Peer Picker to Find a Human Opponent......Page 564
Making the Connection......Page 573
Sending and Receiving Messages......Page 576
Game Over: Handling Disconnects......Page 600
Summary......Page 601
8 x 3 = ?......Page 603
Making Connections......Page 609
Socket Servers......Page 618
Finding Servers via Bonjour......Page 624
Implementing the Game Client......Page 633
Implementing the Game Server......Page 642
Summary......Page 656
Challenges......Page 657
Basics of Online Game Play......Page 661
Making Games More Social......Page 665
Summary......Page 668
What We’ve Covered......Page 669
Some Game Design Tips......Page 670
Wrapping It Up......Page 671
¦......Page 673
¦......Page 680
¦ C......Page 683
¦ D......Page 688
¦ E......Page 689
¦ F......Page 690
¦ G......Page 692
¦......Page 695
¦ K......Page 699
¦M......Page 700
¦ N......Page 703
¦......Page 704
¦ P......Page 708
¦ Q......Page 711
¦ R......Page 712
¦ S......Page 713
¦ T......Page 720
¦U......Page 722
¦......Page 724
¦ Z......Page 726
📜 SIMILAR VOLUMES
<p><p>iPhone games are hot! Just look at the numbers. Games make up over 25 percent of total apps and over 70 percent of the most popular apps. Surprised? Of course not! Most of us have filled our iPhone or iPod touch with games, and many of us hope to develop the next best-selling, most talked-abou
<p><p>iPhone games are hot! Just look at the numbers. Games make up over 25 percent of total apps and over 70 percent of the most popular apps. Surprised? Of course not! Most of us have filled our iPhone or iPod touch with games, and many of us hope to develop the next best-selling, most talked-abou
<p>iPhone games are hot! Just look at the numbers. Games make up over 25 percent of total apps and over 70 percent of the most popular apps. Surprised? Of course not! Most of us have filled our iPhone or iPod touch with games, and many of us hope to develop the next best-selling, most talked-about g
New Apple Developer Series!A technical and business guide to creating and selling iPhone gamesIf you've always wanted to develop a cool iPhone game application and sell it for big bucks, this book is for you. iPhone Game Development covers all technical and commercial bases, from how to sign up for
<b>New Apple Developer Series!</b><p><b>A technical and business guide to creating and selling iPhone games</b><p>If you've always wanted to develop a cool iPhone game application and sell it for big bucks, this book is for you. <i>iPhone Game Development</i> covers all technical and commercial base