Marktplatzangebote
Ein Angebot für € 25,17 €
  • Broschiertes Buch

Learning iPhone Game Programming provides an introduction into the world of writing games on the iPhone, iPod touch, and the iPad. The book assumes no previous knowledge of writing computer games on any platform and will lead the reader through the topics required to create a 2D game.
The book takes you through the process of building a classic 2D side-scrolling game for the iPhone/iPod touch. Along the way, you will be introduced to topics such as OpenGL and how to set it up and use it within a 2D environment, animation, working with bitmap fonts, how to create a tile map, creating a…mehr

Produktbeschreibung
Learning iPhone Game Programming provides an introduction into the world of writing games on the iPhone, iPod touch, and the iPad. The book assumes no previous knowledge of writing computer games on any platform and will lead the reader through the topics required to create a 2D game.

The book takes you through the process of building a classic 2D side-scrolling game for the iPhone/iPod touch. Along the way, you will be introduced to topics such as OpenGL and how to set it up and use it within a 2D environment, animation, working with bitmap fonts, how to create a tile map, creating a particle system, adding sound effects and music, collision detection, and more.

These concepts are introduced in a simple to understand format leading you from the concept itself to building the game project as you work through the book. This introduction and the implementation approach will also be supported by video tutorials for each chapter of the book. These videos will show the concepts from that chapter being implemented within the game project along with comments and information on what is being done.

Learning iPhone Game Programming takes a tutorial-based approach to iPhone game programming, providing you with the information you need to create your own games for the iPhone, iPod touch, and iPad.

Product Description
Get Started Fast with iOS Game Programming

Since the launch of the App Store, games have been the hottest category of apps for the iPhone, iPod touch, and iPad. That means your best chance of tapping into the iPhone/iPad "Gold Rush" is to put out a killer game that everyone wants to play (and talk about). While many people think games are hard to build, they can actually be quite easy, and Learning iOS Game Programming is your perfect beginner's guide. Michael Daley walks you through every step as you build a killer 2D game for the iPhone.

In Learning iOS Game Programming, you'll learn how to build a 2D tile map game, Sir Lamorak's Quest: The Spell of Release (which is free in the App Store). You can download and play the game you're going to build while you learn about the code and everything behind the scenes. Daley identifies the key characteristics of a successful iPhone game and introduces the technologies, terminology, and tools you will use. Then, he carefully guides you through the whole development process: from planning storylines and game play all the way through testing and tuning.

Download the free version of Sir Lamorak's Quest from the App Store today, while you learn how to build the game in this book.

Coverage includes

Planning high-level game design, components, and difficulty levels

Using game loops to make sure the right events happen at the right time

Rendering images, creating sprite sheets, and building basic animations

Using tile maps to build large game worlds from small reusable images

Creating fire, explosions, smoke, sparks, and other organic effects

Delivering great sound via OpenAL and the iPhone's media player

Providing game control via iPhone's touch and accelerometer features

Crafting an effective, intuitive game interface

Building game objects and entities and making them work properly

Detecting collisions and ensuring the right response to them

Polishing, testing, debugging, and performance-tuning your game

Learning iOS Game Programming focuses on the features, concepts, and techniques you'll use most often-and helps you master them in a real-world context. This book is 100% useful and 100% practical; there's never been an iPhone game development book like it!

Praise for Learning iOS Game Programming

"An excellent introduction into the world of game development explaining every aspect of game design and implementation for the iPad, iPhone, and iPod touch devices. A great way for anyone interested in writing games to get started."

-Tom Bradley, Software Architect, Designer of TBXML

"A great developer and a great game.That's everything you can find in this book to learn how to write an awesome game for iPhone.Maybe you're the next AppStore hit!"

-Sebastien Cardoso

"With Learning iOS Game Programming, you'll be writing your own games in no time. The code included is well explained and will save you hours of looking up obscure stuff in the documentation and online forums."

-Pablo Gomez Basanta, Founder, Shifting Mind

"I always thought that to teach others one has to be an expert and a person with an established reputation in the field. Michael Daley proved me wrong. He is teaching others while studying himself. Michael's passion in teaching and studying, ease of solutions to problems, and a complete game as a resulting project makes this book one of the best I have ever read."

-Eugene Snyetilov

"If you're interested in 2D game programming with the iOS using OpenGL and OpenAL directly, this book walks you through creating a complete and fun game without getting bogged down in technical details."

-Scott D.Yelich

"Michael Daley brings clarity to the haze of iPhone application development. Concrete examples, thorough explanation, and timesaving tips make this book a must have for the up and coming iPhone game developer."

-Brandon Middleton, Creator of Tic Tac Toe Ten

"This is the A-Z guide to iOS game development; Michael's book takes you from the basics and terminology to using the techniques in practice on a fully working game. Before you know it, you will find yourself writing your own game, fueled by a firm grasp of the principles and techniques learned within. I could not ask for a better reference in developing our own games."

-Rod Strougo, Founder Prop Group

Backcover
Get Started Fast with iOS Game Programming

Since the launch of the App Store, games have been the hottest category of apps for the iPhone, iPod touch, and iPad. That means your best chance of tapping into the iPhone/iPad "Gold Rush" is to put out a killer game that everyone wants to play (and talk about). While many people think games are hard to build, they can actually be quite easy, and Learning iOS Game Programming is your perfect beginner's guide. Michael Daley walks you through every step as you build a killer 2D game for the iPhone.

In Learning iOS Game Programming, you'll learn how to build a 2D tile map game, Sir Lamorak's Quest: The Spell of Release (which is free in the App Store). You can download and play the game you're going to build while you learn about the code and everything behind the scenes. Daley identifies the key characteristics of a successful iPhone game and introduces the technologies, terminology, and tools you will use. Then, he carefully guides you through the whole development process: from planning storylines and game play all the way through testing and tuning.

Download the free version of Sir Lamorak's Quest from the App Store today, while you learn how to build the game in this book.

Coverage includes

Planning high-level game design, components, and difficulty levels

Using game loops to make sure the right events happen at the right time

Rendering images, creating sprite sheets, and building basic animations

Using tile maps to build large game worlds from small reusable images

Creating fire, explosions, smoke, sparks, and other organic effects

Delivering great sound via OpenAL and the iPhone's media player

Providing game control via iPhone's touch and accelerometer features

Crafting an effective, intuitive game interface

Building game objects and entities and making them work properly

Detecting collisions and ensuring the right response to them

Polishing, testing, debugging, and performance-tuning your game

Learning iOS Game Programming focuses on the features, concepts, and techniques you'll use most often-and helps you master them in a real-world context. This book is 100% useful and 100% practical; there's never been an iPhone game development book like it!

Praise for Learning iOS Game Programming

"An excellent introduction into the world of game development explaining every aspect of game design and implementation for the iPad, iPhone, and iPod touch devices. A great way for anyone interested in writing games to get started."

-Tom Bradley, Software Architect, Designer of TBXML

"A great developer and a great game.That's everything you can find in this book to learn how to write an awesome game for iPhone.Maybe you're the next AppStore hit!"

-Sebastien Cardoso

"With Learning iOS Game Programming, you'll be writing your own games in no time. The code included is well explained and will save you hours of looking up obscure stuff in the documentation and online forums."

-Pablo Gomez Basanta, Founder, Shifting Mind

"I always thought that to teach others one has to be an expert and a person with an established reputation in the field. Michael Daley proved me wrong. He is teaching others while studying himself. Michael's passion in teaching and studying, ease of solutions to problems, and a complete game as a resulting project makes this book one of the best I have ever read."

-Eugene Snyetilov

"If you're interested in 2D game programming with the iOS using OpenGL and OpenAL directly, this book walks you through creating a complete and fun game without getting bogged down in technical details."

-Scott D.Yelich

"Michael Daley brings clarity to the haze of iPhone application development. Concrete examples, thorough explanation, and timesaving tips make this book a must have for the up and coming iPhone game developer."

-Brandon Middleton, Creator of Tic Tac Toe Ten

"This is the A-Z guide to iOS game development; Michael's book takes you from the basics and terminology to using the techniques in practice on a fully working game. Before you know it, you will find yourself writing your own game, fueled by a firm grasp of the principles and techniques learned within. I could not ask for a better reference in developing our own games."

-Rod Strougo, Founder Prop Group

Preface xxi

1 Game Design 1

The Game That Started It All (For Me) 3

So, What's the Big Idea? 4

A Game That Fits with the iPhone 4

The Storyline 5

What's in a Name? 5

The Game's Objective 6

Game Play Components 7

Time 7

Lives 7

Health 8

Objects 8

Doors 9

Weapons 10

Entities 10

Player 11

Summary 11

2 The Three Ts: Terminology, Technology, and Tools 13

Terminology 14

Sprite 14

Sprite Sheet 16

Animation 18

Bitmap Fonts 19

Tile Maps 20

Particle System 21

Collision Detection 22

Artificial Intelligence (AI) 23

Game Loop 24

Technology 26

Objective-C 26

Cocoa Touch 27

OpenGL ES 27

OpenAL 30

Tools 31

The iPhone SDK 32

Summary 38

3 The Journey Begins 39

Creating the Project in Xcode 39

Running the Project 42

Under the Hood 43

Application Delegate 43

Examining the Header File 44

Examining the Implementation File 46

EAGLView 49

EAGLView.h 49

EAGLView.m 50

ES1Renderer 58

Examining ES1Renderer.h 58

Examining ES1Renderer.m 59

Creating the Framebuffer and Renderbuffer 60

Defining the Color Values 66

Positioning 67

How OpenGL Works 68

Applying Transformations on the Model 69

Rendering to the Screen 70

Summary 72

4 The Game Loop 73

Timing Is Everything 73

Collision Detection 74

The Game Loop 75

Frame-Based 75

Time-Based, Fixed Interval 77

Getting Started 78

Inside the EAGLView Class 79

Inside the EAGLView.m File 79

ES1Renderer Class 82

Configuring the View Port 85

Game Scenes and the Game Controller 86

Creating the Game Controller 87

The GameController Class 87

Creating the Singleton 89

Inside GameController.m 89

AbstractScene Class 92

GameScene Class 93

Summary 95

Exercises 95

5 Image Rendering 97

Introduction to Rendering 97

Rendering a Quad 98

Texture Mapping 101

Texture Coordinates 101

Interleaved Vertex Arrays 104

Structures 106

Image Rendering Classes 107

Texture2D Class 108

TextureManager Class 116

ImageRenderManager Class 119

The Image Class 126

I nitialization 126

Retrieving a Sub-Image 129

Duplicate an Image 130

Rendering an Image 130

Getters and Setters 134

Summary 134

Exercise 135

6 Sprite Sheets 137

Introduction to Sprite Sheets 137

Simple Sprite Sheet 138

Complex Sprite Sheets 139

Using Zwoptex 141

The SpriteSheet Class 142

Initialization 143

Retrieving Sprites 146

PackedSpriteSheet Class 147

Initialization 147

Parsing the Control File 148

Retrieving a Sprite 149

Summary 150

Exercise 151

7 Animation 153

Animation Chapter Project 153

Introduction to Animation 154

Frames 154

State w155

Type 155

Direction 155

Bounce Frame 155

Animation Class 156

Initialization 156

Adding Frames 157

Animation Updates 158

Animation Rendering 160

Finishing Things Off 161

Summary 163

Exercise 163

8 Bitmap Fonts 165

Bitmap Font Project 165

Introduction to Bitmap Fonts 166

Creating the Bitmap Font Sprite Sheet 167

The BitmapFont Class 170

Header File 170

What's with the C? 171

Initializer 171

Parsing the Control File 172

Rendering Text 176

Rendering Justified Text 178

Text Width and Height 180

Deallocation 181

Summary 181

Exercise 182

9 Tile Maps 183

Getting Started with the Tile Map Project 183

Introduction
Get Started Fast with iOS Game Programming

Since the launch of the App Store, games have been the hottest category of apps for the iPhone, iPod touch, and iPad. That means your best chance of tapping into the iPhone/iPad "Gold Rush" is to put out a killer game that everyone wants to play (and talk about). While many people think games are hard to build, they can actually be quite easy, and Learning iOS Game Programming is your perfect beginner's guide. Michael Daley walks you through every step as you build a killer 2D game for the iPhone.

In Learning iOS Game Programming , you'll learn how to build a 2D tile map game, Sir Lamorak's Quest: The Spell of Release (which is free in the App Store). You can download and play the game you're going to build while you learn about the code and everything behind the scenes. Daley identifies the key characteristics of a successful iPhone game and introduces the technologies, terminology, and tools you will use. Then, he carefully guides you through the whole development process: from planning storylines and game play all the way through testing and tuning.

Download the free version of Sir Lamorak's Quest from the App Store today, while you learn how to build the game in this book.

Coverage includes

Planning high-level game design, components, and difficulty levels
Using game loops to make sure the right events happen at the right time
Rendering images, creating sprite sheets, and building basic animations
Using tile maps to build large game worlds from small reusable images
Creating fire, explosions, smoke, sparks, and other organic effects
Delivering great sound via OpenAL and the iPhone's media player
Providing game control via iPhone's touch and accelerometer features
Crafting an effective, intuitive game interface
Building game objects and entities and making them work properly
Detecting collisions and ensuring the right response to them
Polishing, testing, debugging, and performance-tuning your game
Learning iOS Game Programming focuses on the features, concepts, and techniques you'll use most often-and helps you master them in a real-world context. This book is 100% useful and 100% practical; there's never been an iPhone game development book like it!

Praise for Learning iOS Game Programming

"An excellent introduction into the world of game development explaining every aspect of game design and implementation for the iPad, iPhone, and iPod touch devices. A great way for anyone interested in writing games to get started."

-Tom Bradley, Software Architect, Designer of TBXML

"A great developer and a great game.That's everything you can find in this book to learn how to write an awesome game for iPhone.Maybe you're the next AppStore hit!"

-Sebastien Cardoso

"With Learning iOS Game Programming , you'll be writing your own games in no time. The code included is well explained and will save you hours of looking up obscure stuff in the documentation and online forums."

-Pablo Gomez Basanta, Founder, Shifting Mind

"I always thought that to teach others one has to be an expert and a person with an established reputation in the field. Michael Daley proved me wrong. He is teaching others while studying himself. Michael's passion in teaching and studying, ease of solutions to problems, and a complete game as a resulting project makes this book one of the best I have ever read."

-Eugene Snyetilov

"If you're interested in 2D game programming with the iOS using OpenGL and OpenAL directly, this book walks you through creating a complete and fun game without getting bogged down in technical details."