Contents

Introduction

Welcome to iOS Games!

PART I USING GLKIT IN IOS 5

CHAPTER 1 GAME PROGRAMMING FUNDAMENTALS

Looking Under the Hood

The Game Loop

Sprites

Sprite Sheets

The Game Engine

OpenGL ES

Artificial Intelligence

Game Controls

Wrapping Up

CHAPTER 2 ALL ABOUT DESIGN

What Is Game Design?

Choosing a Game Genre

Establishing a Look

Keeping Everything Under Control

Playing by the Rules

Finding Graphics and Sounds

But I’m Not an Artist

Let’s Make Some Noise

Wrapping Up

CHAPTER 3 USING OPENGL

Creating a New Project

Understanding the Basic Files

Examining Specific Files

Examining the Template App

Making Modifications

Wrapping Up

CHAPTER 4 CONTROLLERS AND SPRITES

Understanding Controllers

Examining the Chapter 4 Project

AbstractSceneController

GameController

ViewController

Drawing Sprites

Vertices

Textures

Putting Sprites in Action

Interleaved Vertex Data

Sprite Class

MenuSceneController

Wrapping Up

CHAPTER 5 ALL ABOUT CONTROL

Changing Scenes

Changing Scenes

Creating the Player Sprite

Touch-based control

Tilt-based Control

Virtual Joystick Control

Checking Bounds

Wrapping Up

CHAPTER 6 SHOOT TO KILL

Enemy Sprite Class

Strafing Run

Missiles

Enemy Movement and Intelligence

Creating Dynamic Difficulty Using AI

DumbSprite

Diagonal Sprite

Diagonal Sprite AI

Kamikaze Sprite AI

Wrapping Up

CHAPTER 7 BLOWING STUFF UP

Collision Detection Methods

Bounding Box Detection

Bounding Circle Detection

Per Pixel Detection

Collision Detection in Raiders

Adding Detection Code

Collision Checks and Effects

Collision Logic

Setting Off Explosions

Adding Sound Effects

Wrapping Up

CHAPTER 8 FINISHING TOUCHES

Building a Scoreboard

Rendering Fonts

Keeping Score

Player Lives

Winning the Level

Starting Over

Are We There Yet?

Wrapping Up

CHAPTER 9 BEING SOCIAL

Game Center Integration

Using Leaderboards, Achievements, and Scoring

Building Leaderboards

Sending Scores

Creating Achievements

Completing Game Center Integration

Sending a Tweet

Using TWTweetComposeViewController

Sending a Tweet Without a ViewController

Wrapping Up

CHAPTER 10 IAD, AIRPLAY, AND IN-APP PURCHASES

Using iAd

Getting AirPlay

Supporting In-App Purchases

Creating and Processing an IAP

Wrapping Up

PART II USING OPENGL ES 2.0

CHAPTER 11 PREPARING FOR OPENGL

Creating a New Project

Readying the App for OpenGL ES Conversion

Creating Buffers

Preparing the Rendering Code

Changing the ViewController

Creating the Program Object and Linking Shaders

Wrapping Up

CHAPTER 12 RAIDERS: OPENGL ES STYLE

Revisiting Sprites

Changing the Sprite Header

Loading a Texture in OpenGL ES 2.0

Applying Shaders

Using the Fragment Shader

Implementing Translations

Changing Classes

Editing ViewController

Modifying GameController

Altering BitmapFont

Wrapping Up

APPENDIX A INTRODUCING OBJECTIVE-C

Syntax Differences

Header and Implementation Files

Import Declarations

@interface declaration

Implementation File

Instantiating Objects

Memory Management

Retain/Release

New to iOS 5: ARC

Protocols and Categories

Wrapping Up

APPENDIX B FURTHER READING

Objective-C / iOS

OpenGL ES 2.0

Games Development

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset