𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Learning iOS game programming: a hands-on guide to building your first iphone game

✍ Scribed by Daley, Michael


Publisher
Addison-Wesley Professional
Year
2010;2011
Tongue
English
Leaves
446
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


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 "

✦ Table of Contents


Cover......Page 1
Table of Contents......Page 10
Preface......Page 22
1 Game Design......Page 28
The Game That Started It All (For Me)......Page 30
A Game That Fits with the iPhone......Page 31
What’s in a Name?......Page 32
The Game’s Objective......Page 33
Lives......Page 34
Objects......Page 35
Doors......Page 36
Entities......Page 37
Summary......Page 38
2 The Three Ts: Terminology, Technology, and Tools......Page 40
Sprite......Page 41
Sprite Sheet......Page 43
Animation......Page 45
Bitmap Fonts......Page 46
Tile Maps......Page 47
Particle System......Page 48
Collision Detection......Page 49
Artificial Intelligence (AI)......Page 50
Game Loop......Page 51
Objective-C......Page 53
OpenGL ES......Page 54
OpenAL......Page 57
Tools......Page 58
The iPhone SDK......Page 59
Summary......Page 65
Creating the Project in Xcode......Page 66
Running the Project......Page 69
Application Delegate......Page 70
Examining the Header File......Page 71
Examining the Implementation File......Page 73
EAGLView.h......Page 76
EAGLView.m......Page 77
Examining ES1Renderer.h......Page 85
Examining ES1Renderer.m......Page 86
Creating the Framebuffer and Renderbuffer......Page 87
Defining the Color Values......Page 93
Positioning......Page 94
How OpenGL Works......Page 95
Applying Transformations on the Model......Page 96
Rendering to the Screen......Page 97
Summary......Page 99
Timing Is Everything......Page 100
Collision Detection......Page 101
Frame-Based......Page 102
Time-Based, Fixed Interval......Page 104
Getting Started......Page 105
Inside the EAGLView.m File......Page 106
ES1Renderer Class......Page 109
Configuring the View Port......Page 112
Game Scenes and the Game Controller......Page 113
The GameController Class......Page 114
Inside GameController.m......Page 116
AbstractScene Class......Page 119
GameScene Class......Page 120
Exercises......Page 122
Introduction to Rendering......Page 124
Rendering a Quad......Page 125
Texture Coordinates......Page 128
Interleaved Vertex Arrays......Page 131
Structures......Page 133
Image Rendering Classes......Page 134
Texture2D Class......Page 135
TextureManager Class......Page 143
ImageRenderManager Class......Page 146
Initialization......Page 153
Retrieving a Sub-Image......Page 156
Rendering an Image......Page 157
Summary......Page 161
Exercise......Page 162
Introduction to Sprite Sheets......Page 164
Simple Sprite Sheet......Page 165
Complex Sprite Sheets......Page 166
Using Zwoptex......Page 168
The SpriteSheet Class......Page 169
Initialization......Page 170
Retrieving Sprites......Page 173
Initialization......Page 174
Parsing the Control File......Page 175
Retrieving a Sprite......Page 176
Summary......Page 177
Exercise......Page 178
Animation Chapter Project......Page 180
Frames......Page 181
Bounce Frame......Page 182
Initialization......Page 183
Adding Frames......Page 184
Animation Updates......Page 185
Animation Rendering......Page 187
Finishing Things Off......Page 188
Exercise......Page 190
Bitmap Font Project......Page 192
Introduction to Bitmap Fonts......Page 193
Creating the Bitmap Font Sprite Sheet......Page 194
Header File......Page 197
Initializer......Page 198
Parsing the Control File......Page 199
Rendering Text......Page 203
Rendering Justified Text......Page 205
Text Width and Height......Page 207
Summary......Page 208
Exercise......Page 209
Getting Started with the Tile Map Project......Page 210
Introduction to Tile Maps......Page 211
Tile Map Editor......Page 213
Layers......Page 215
Creating a Tile Map......Page 216
Create a New Tile Set......Page 217
Creating Object Layers......Page 218
Placing Objects......Page 219
Tileset Element......Page 220
Layer Element......Page 221
Object Group Element......Page 222
Layer Class......Page 223
TileSet Class......Page 229
TiledMap Class......Page 231
Initialization......Page 232
Parsing a Map File......Page 234
Creating the Layer Images......Page 243
Rendering a Layer......Page 245
Summary......Page 247
Exercise......Page 248
10 The Particle Emitter......Page 250
Particle Emitter Project......Page 251
Introduction to Particle Systems......Page 252
Particle System Parameters......Page 253
A Particle Is Born......Page 254
A Particle Lives......Page 255
A Particle Is Reborn......Page 256
Particle Emitter Configuration......Page 257
TBXMLParticleAdditions Class......Page 258
ParticleEmitter Class......Page 260
Have a Play......Page 274
Summary......Page 275
Sound Project......Page 276
Audio Sessions......Page 277
Playing Sound Effects......Page 279
Creating Sound Effects......Page 281
Sound Manager Classes......Page 283
SoundManager Class......Page 284
Sound Effect Management......Page 300
Loading Sound Effects......Page 301
Playing Sound Effects......Page 303
Stopping Sound Effects......Page 306
Handling Sound Interruptions......Page 308
Summary......Page 311
User Input Project......Page 312
Touch Events......Page 314
Processing Touch Events......Page 316
The touchesBegan Phase......Page 317
The touchesMoved Phase......Page 319
Processing Taps......Page 321
Accelerometer Events......Page 323
Summary......Page 325
Game Interface Project......Page 326
OpenGL ES Interface......Page 327
Rendering the Interface......Page 328
Handling Touches......Page 331
OpenGL ES Orientation......Page 335
Creating the Interface......Page 339
Wiring Up the Interface......Page 342
UIKit Orientation......Page 345
Showing and Hiding a UIKit Interface......Page 347
Summary......Page 350
Game Objects and Entities Project......Page 352
Game Objects......Page 353
AbstractObject Class......Page 354
EnergyObject Class......Page 356
Game Entities......Page 365
AbstractEntity Class......Page 366
Artificial Intelligence......Page 368
Player Entity Class......Page 370
Saving a Game Object or Entity......Page 379
Summary......Page 382
Introduction to Collision Detection......Page 384
Collision Pruning......Page 385
Frame-Based Versus Time-Based......Page 386
Axis-Aligned Bounding Boxes......Page 387
Detecting Collisions......Page 388
Collision Map......Page 389
Entity-to-Map Collision Detection......Page 392
Entity-to-Entity Collision Detection......Page 394
Summary......Page 395
The β€œCamera”......Page 396
Saving Game State......Page 398
Loading Game State......Page 400
Saving Game Settings......Page 402
Loading Game Settings......Page 403
Saving High Scores......Page 404
Adding a Score......Page 406
Saving High Scores......Page 407
Loading High Scores......Page 408
Performance and Tuning......Page 409
Using Instruments......Page 410
Leaks Instrument......Page 411
Using the OpenGL ES Instrument......Page 414
Compiling for Thumb......Page 416
Beta Testing......Page 417
Multiple Device Types......Page 418
Summary......Page 419
A......Page 422
C......Page 423
E......Page 424
G......Page 425
I......Page 426
J......Page 427
L......Page 428
O......Page 433
P......Page 434
R......Page 435
S......Page 436
T......Page 437
U......Page 439
Y-Z......Page 440

✦ Subjects


Computer Science;Programming


πŸ“œ SIMILAR VOLUMES


Learning iOS Game Programming: A Hands-O
✍ Michael Daley πŸ“‚ Library πŸ“… 2010 πŸ› Addison-Wesley Professional 🌐 English

<P style="MARGIN: 0px"><B>Get Started Fast with iOS Game Programming</B></P> <P style="MARGIN: 0px">Β </P> <P style="MARGIN: 0px">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 iPh

Learning IOS Game Programming A Hands-on
✍ Michael Daley πŸ“‚ Library πŸ“… 2010 πŸ› Addison Wesley 🌐 English

Learning IOS Game Programming A Hands-on Guide to Building Your First IPhone Game /by Michael Daley. 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.<br>That means your best chance of tap

Learning iPhone Game Programming: A Hand
✍ Michael Daley πŸ“‚ Library πŸ“… 2010 πŸ› Addison Wesley 🌐 English

<P style="MARGIN: 0px"><B>Get Started Fast with iOS Game Programming</B></P> <P style="MARGIN: 0px">Β </P> <P style="MARGIN: 0px">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 iPh

Learning Android Game Programming: A Han
✍ Richard A. Rogers πŸ“‚ Library πŸ“… 2011 πŸ› Addison-Wesley Professional 🌐 English

<B> <P style="MARGIN: 0px">Build the Next Great Android Game!</P> <P style="MARGIN: 0px"> </B>Β </P> <P style="MARGIN: 0px"> <B> <I> <B>Learning Android Game Programming </B> </I> </B>is your hands-on, start-to-finish guide to creating winning games for today’s rapidly growing Android mobile devic

Learning Android Game Programming: A Han
✍ Richard A. Rogers πŸ“‚ Library πŸ“… 2011 πŸ› Addison-Wesley Professional 🌐 English

<B> <P style="MARGIN: 0px">Build the Next Great Android Game!</P> <P style="MARGIN: 0px"> </B>Β </P> <P style="MARGIN: 0px"> <B> <I> <B>Learning Android Game Programming </B> </I> </B>is your hands-on, start-to-finish guide to creating winning games for today’s rapidly growing Android mobile devic