Book description
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
Table of contents
- Copyright
- About the Authors
- About the Technical Reviewer
- Acknowledgments
- Introduction
-
1. A Revolutionary Gaming Platform: Games for Everyone, Anytime, Anywhere
- 1.1. The Ever-Present iPhone
- 1.2. Mass Appeal—There's a Gamer Born Every Minute
- 1.3. User Interfaces—Death of the D-Pad
- 1.4. Connectivity—Plays Well with Others
- 1.5. User Data—This Time It's Personal
- 1.6. Device Performance—A Multimedia Powerhouse
- 1.7. Dev Kit? You're Holding It!
- 1.8. Innovation—Good Things Come from Small Developers
- 1.9. Summary
- 2. Developing iPhone Games: Peeking Inside the iPhone Toolbox
-
3. Moving Images on a Small Screen—UIKit Controls
- 3.1. A Quick Introduction to Cocoa Touch
-
3.2. Building a Simple Game
- 3.2.1. Creating an Xcode Project
- 3.2.2. Creating the IVBricker User Interface
-
3.2.3. Snazzy Graphics Make the Grade
- 3.2.3.1. Adding the Image
- 3.2.3.2. The Illusion of Motion
- 3.2.3.3. Rocking and Grooving with User Input
- 3.2.3.4. Handling Accelerometer Input
- 3.2.3.5. Handling Touchscreen Input
- 3.2.3.6. When Objects Collide
- 3.2.3.7. Failure Conditions
- 3.2.3.8. Winning Conditions
- 3.2.3.9. Loading and Displaying Images Programmatically
- 3.2.3.10. Creating the Grid of Bricks
- 3.2.3.11. Detecting image View Collisions
- 3.2.3.12. Changing the Timer to CADisplayLink
- 3.2.4. The End?
- 3.3. Application Delegate Events
- 3.4. Saving and Loading Game State
- 3.5. Animating Images
- 3.6. Summary
- 4. She Shoots, She Hits, She Scores!
- 5. Flipping Out and Sweeping Away with Core Animation
-
6. OpenGL Basics: Wrapping Your Head Around the OpenGL API
- 6.1. What Is OpenGL ES and Why Do I Care?
- 6.2. Understanding the 3D World
- 6.3. Matrix Basics: Taking the Red Pill
- 6.4. Rendering Basics
- 6.5. The Basic Game Template
- 6.6. Wrapping the CAEAGLLayer in a View: EAGLView
- 6.7. How to Draw Stuff with OpenGL
- 6.8. The Game Loop and the Timer
- 6.9. The Input Controller
- 6.10. The App Delegate
- 6.11. Summary
-
7. Putting It Together: Making a Game in OpenGL
- 7.1. Space Rocks! Game Design
- 7.2. Getting Started with the Template
- 7.3. Rotation Makes the World Go 'Round
- 7.4. 3D Point Upgrade
- 7.5. Adding Buttons
- 7.6. Building a Better Spaceship
- 7.7. Space Rocks!
- 7.8. Adding Missiles
- 7.9. Making Nicer Buttons
- 7.10. Collision Detection
- 7.11. Collisions on the Rocks
- 7.12. Summary
-
8. The Next Steps: Atlases, Sprites, and Particles—Oh My!
-
8.1. Textures and Texture Atlases
- 8.1.1. What Is a Texture Anyway, and Why Do I Care?
- 8.1.2. Getting Image Data into OpenGL
- 8.1.3. Binding Textures
- 8.1.4. UV Is Not Bad for Your Skin
- 8.1.5. You Get a Textured Quad!
- 8.1.6. Say Hello to the Texture Atlas
- 8.1.7. Switching the Old and Busted for the New Hotness
- 8.1.8. A Nicer User Interface
- 8.1.9. Colors with Textures
- 8.2. Sprite Animation
-
8.3. From 2D to 3D
- 8.3.1. It's Only One More D—What's the Big Deal?
- 8.3.2. Where Do 3D Models Come From?
- 8.3.3. From Modeler to Screen
- 8.3.4. What Is Normal?
- 8.3.5. Standardizing on GL_TRIANGLES
- 8.3.6. Textures Plus Models
- 8.3.7. Shadows Define Shape
- 8.3.8. Depth Buffer and Face Culling
- 8.3.9. Collision Detection Tweaks
- 8.4. Particle Systems Add Life to Your Game
- 8.5. Summary
-
8.1. Textures and Texture Atlases
-
9. Introduction to Core Audio
- 9.1. Audio Services Provided by Core Audio
- 9.2. The Core Audio Frameworks
- 9.3. Codecs and File Formats
- 9.4. Alerts and Vibration: Introducing System Sound Services
- 9.5. Setting Policies for Your Audio: Introducing Audio Session Services
- 9.6. Easy Audio Playback in Objective-C with AVFoundation
- 9.7. Mission Complete...but Our Princess Is in Another Castle!
-
10. Making Noise with OpenAL
- 10.1. OpenAL Overview
- 10.2. My Story and Goals for Audio Coverage
- 10.3. Roadmap for the Audio Coverage
-
10.4. Setting Up Basic Sound in OpenAL
- 10.4.1. Setting Up an Audio Session
- 10.4.2. Opening a Device
- 10.4.3. Creating a Context
- 10.4.4. Activating the Context
- 10.4.5. Generating Sound Sources
- 10.4.6. Generating Data Buffers
- 10.4.7. Loading Sound Data from Files
- 10.4.8. Submitting Sound Data to OpenAL Data Buffers
- 10.4.9. Attaching a Data Buffer to a Sound Source
- 10.4.10. Playing Sound
- 10.4.11. Shutting Down and Cleaning Up
- 10.5. Exposing Flaws and the Missing Details
-
10.6. Sound Resource Manager: Fixing the Design
- 10.6.1. Overview of the Resource Manager
- 10.6.2. Initial Cleanup
- 10.6.3. The Sound File Database (Cache System)
- 10.6.4. OpenAL Source Management (Reserving and Recycling)
- 10.6.5. Integration with Space Rocks!
- 10.6.6. Handling When All Available Sources Are Exhausted
- 10.6.7. Final Demo Embellishments
- 10.7. Save Point Reached
-
11. 3D Audio—Turning Noise into Game Sounds
- 11.1. The Design of OpenAL: Sources, Buffers, and Listeners
- 11.2. Limits of 3D Audio in OpenAL
- 11.3. Integrating the Listener into Space Rocks!
- 11.4. Adding Positions to Sounds
- 11.5. Listener Orientation
- 11.6. Source Direction and Cones
- 11.7. Velocity and the Doppler Effect
- 11.8. Distance Attenuation
- 11.9. Using Relative Sound Properties to Selectively Disable 3D Effects
- 11.10. Achievement Unlocked: Use All OpenAL 3D Features
-
12. Streaming: Thumping, Pulse-Quickening Game Excitement
- 12.1. Music and Beyond
- 12.2. iPod Music Library (Media Player Framework)
-
12.3. Audio Streaming
- 12.3.1. AVFoundation-Based Background Music for Space Rocks!
- 12.3.2. OpenAL Buffer Queuing Introduction
-
12.3.3. OpenAL-Based Background Music for Space Rocks!
- 12.3.3.1. A New Buffer Data Class for Streaming
- 12.3.3.2. Unqueue the Processed Buffers
- 12.3.3.3. Queue a New Buffer If Necessary
- 12.3.3.4. Handle a Buffer Underrun
- 12.3.3.5. Handle EOF and Finished Playing
- 12.3.3.6. OpenALSoundController Changes
- 12.3.3.7. BBSceneController Integration
- 12.3.3.8. Analysis: Number of Buffers and Buffer Sizes
- 12.3.3.9. Star Power Ready!
- 12.3.4. OpenAL Speech for Space Rocks!
- 12.3.5. Audio Queue Services Based Background Music for Space Rocks!
- 12.3.6. Perfect Full Combo!
- 12.4. Audio Capture
- 12.5. Back to OpenGL
- 12.6. The End of the Audio Road
- 13. Networking for iPhone Games: Introduction
- 14. Going Head to Head
- 15. Party Time
- 16. Connecting with the Outside World
- 17. Putting It All Together: Now Comes the Fun Part
Product information
- Title: Beginning iPhone Games Development
- Author(s):
- Release date: August 2010
- Publisher(s): Apress
- ISBN: 9781430225997
You might also like
book
iPhone 3D Programming
What does it take to build an iPhone app with stunning 3D graphics? This book will …
book
Windows® 98 Unleashed
Windows 98 Unleashed provides you with comprehensive coverage of the newest Windows features. This complete reference …
book
Beginning Game Development with Amazon Lumberyard: Create 3D Games Using Amazon Lumberyard and Lua
Create stunning 3D games in a short amount of time using Amazon Lumberyard, a free and …
book
Graphics Gems V (IBM Version)
Graphics Gems V is the newest volume in The Graphics Gems Series. It is intended to …