Contents

About the Author

About the Technical Reviewer

Acknowledgments

images Chapter 1: A Simple First Game

Creating a Project in Xcode: Sample 1

A Project’s File Structure

Customizing Your Project

Arranging Xcode Views to Make Life Easier

Adding a New View

Simple Navigation

Adding the Rock, Paper, Scissors View

Customizing a UIView

Summary

images Chapter 2: Setting up Your Game Project

Creating Your Game Project

Customizing a Universal Application

How an iOS Application Initializes

Understanding UIViewControllers

Customizing Behavior Based on Device Type

Graphically Designing Your UI in a Universal Way

A First Look at Interface Builder

Adding UI Elements to an XIB File

Responding to Changes in Orientation

Summary

images Chapter 3: Explore the Game Application Life Cycle

Understanding the Views in a Game

Exploring the Role Each View Plays

Understanding the Project’s Structure

Configuring an Application for Multiple Views

Changing Views in Response to User Actions

Using a Delegate to Communicate Application State

HighscoreController: A Simple, Reusable Component

Preserving Game State

Archiving and Unarchiving Game State

Implementing Life Cycle Tasks

Summary

images Chapter 4: Quickly Build an Input-Driven Game

Exploring How to Get Content on the Screen

Understanding UIView

Core Graphics Type Definitions

Using Core Graphics Types

Understanding Animations

The Static Animation Tasks of UIView

Building the Game Coin Sorter

Implementing Game State

Initialization and Setup

Starting a New Game

Continuing a Game

Initializing the UIViews for Each Coin

The Model

Interpreting User Input

Animating Views with Core Animation

Summary

images Chapter 5: Quickly Build a Frame-by-Frame Game

Setting Up Your First Frame-by-Frame Animation

Simple Movement

Implementing the Classes

Moving the Spaceship

Understanding CADisplayLink and NSRunLoop

Abstracting the UI

Understanding Actors

Drawing Actors on the Screen

Actor State and Animations

The Tumbling Effect

The Rotating Effect

Summary

images Chapter 6: Create Your Characters: Game Engine, Image Actors, and Behaviors

Understanding the Game Engine Classes

The GameController Class

Setting Up GameController

The Actor Class

Implementing Actor

Working with the Power-Up Actor

Implementing Our Power-Up Actor

Inspecting ImageRepresentation

Understanding Behaviors by Example

Summary

images Chapter 7: Build Your Game: Vector Actors and Particles

Saucers, Bullets, Shields, and Health Bars

The Actor Classes

Drawing Actors with Core Graphics via VectorRepresentation

The VectorRepresentation Class

A UIView for Vector-Based Actors: VectorActorView

Drawing a HealthBar

Drawing the Bullet Class

Adding Particle Systems to Your Game

Simple Particle System

Creating Based Vector-Based Particles

Summary

images Chapter 8: Building Your Game: Understanding Gestures and Movements

Touch Input: The Basics

Extending UIView to Receive Touch Events

Looking At the Event Code

Applying Touch Events to Actors

Understanding Gesture Recognizers

Tap Gestures

Pinch Gestures

Pan (or Drag) Gesture

Rotation Gesture

Long Press Gesture

Swipe Gesture

Interpreting Device Movements

Responding a to Motion Event (Shaking)

Responding to Accelerometer Data

Summary

images Chapter 9: Game Center and Social Media

Game Center

Enabling Game Center in iTunes Connect

Using Game Center in Your Game

Awarding Achievements

Twitter Integration

Facebook Integration

Creating a Facebook Application

Authenticating with Facebook

Making Posts to Facebook

Summary

images Chapter 10: Monetizing via the Apple App Store

In-App Purchases

Overview of Purchase Types

Nonconsumable

Consumable

Free Subscriptions

Auto-Renewing Subscriptions

Nonrenewing Subscriptions

Preparing for In-app Purchases

Enabling and Creating In-App Purchases

Creating a Test User

Class and Code for In-App Purchases

In-App Purchase Implementation

Driving the UI from Existing Purchases

Making the Purchase

Responding to a Successful Purchase

Summary

images Chapter 11: Add Sound to Your Game

How to Play Sound

Correct Audio Behavior

Users Switch Their Devices to Silent When They Want To

Your Game May Not Be the Only Application Making Sound

Your Game Is Not the Only Application

Implementing Sound in Your Game

Setting Up Audio

Responding to Other Audio Changes

Audio in a Game

Setting up the GameController

Sound Effects for In-game Events

Audio Driven by an Actor

Summary

images Chapter 12: A Completed Game: Belt Commander

Belt Commander: Game Recap

Implementing View-to-View Navigation

Launching the Application

The XIB Files

View Navigation

Implementing the Game

Game Classes

Understanding BeltCommanderController

BeltCommanderController, One Step at a Time

Summary

images Chapter 13: Physics!

Overview of the Physics-Based Example

An Overview of Box2D

The World

The Bodies

Fixtures

Adding Box2D to an Xcode Project

Understanding the Example

Extending GameController

The Physics Actors

Extending Physics Actor

A Little Cleanup

Summary

images Appendix A: Designing and Creating Graphics

The Art in Video Games

Style in Video Games

Branding and Perception

Creating the Images Files

Naming Conventions

Support Images

Mutli-Resolution Images

A Multi-Resolution Example

Creating Final Assets

Tools

GIMP

Blender 3D

Inkscape

Summary

Index

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

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