| |
| |
Introduction | |
| |
| |
| |
The Tools To Get Started | |
| |
| |
| |
Games On Ios | |
| |
| |
What Makes a Good iOS Game? | |
| |
| |
Device Usage | |
| |
| |
Use Unique Features of iOS | |
| |
| |
Make Your Game Fun | |
| |
| |
Graphics and Design | |
| |
| |
Developing Your Idea | |
| |
| |
Documenting Your Game | |
| |
| |
Prototyping Your Game | |
| |
| |
Preparing to Code | |
| |
| |
Game-Related Frameworks | |
| |
| |
Cocoa | |
| |
| |
Drawing: UIKit and Core Graphics | |
| |
| |
User Interaction: Cocoa Touch | |
| |
| |
Animation: Core Animation | |
| |
| |
Sound: Core Audio | |
| |
| |
Game Kit | |
| |
| |
Summary | |
| |
| |
| |
The Xcode Programming Environment | |
| |
| |
The Coding Environment | |
| |
| |
Creating a Project | |
| |
| |
Navigating Your Project | |
| |
| |
The Navigator Area | |
| |
| |
Navigating by Symbol | |
| |
| |
Searching Your Code | |
| |
| |
Viewing Code Issues | |
| |
| |
Examining Logs | |
| |
| |
Editing Your Code | |
| |
| |
Code Coloring | |
| |
| |
Indentation and Snippets | |
| |
| |
Fix-it | |
| |
| |
Integrated Help | |
| |
| |
Using the Jump Bars | |
| |
| |
The Assistant Editor | |
| |
| |
Xcode Debugging Tools | |
| |
| |
Breaking and Stepping through Your Code | |
| |
| |
Additional Breakpoint Features | |
| |
| |
Building a Simple Interface | |
| |
| |
Summary | |
| |
| |
| |
The C Programming Language | |
| |
| |
Introducing C | |
| |
| |
Variables and Expressions | |
| |
| |
Data Types | |
| |
| |
Variables | |
| |
| |
Base Data Types | |
| |
| |
Generating Output and Accepting Input | |
| |
| |
Extending the Data Types | |
| |
| |
Operators | |
| |
| |
Assignment Operators | |
| |
| |
Arithmetic Operators | |
| |
| |
Relational Operators | |
| |
| |
Logical Operators | |
| |
| |
Scope | |
| |
| |
Structures | |
| |
| |
Arrays | |
| |
| |
Loops | |
| |
| |
for Loops | |
| |
| |
while and do…while Loops | |
| |
| |
break and continue | |
| |
| |
Execution Flow and Decisions | |
| |
| |
The if Statement | |
| |
| |
The Conditional Operator | |
| |
| |
Choosing an Option with switch | |
| |
| |
Breaking Up Code with Functions | |
| |
| |
Pointers | |
| |
| |
A Game Example | |
| |
| |
Summary | |
| |
| |
| |
The Objective-C Programming Language | |
| |
| |
Classes and Objects | |
| |
| |
Instance Variables | |
| |
| |
Methods and Messages | |
| |
| |
Managing Memory | |
| |
| |
Automatic Reference Counting | |
| |
| |
Inheritance | |
| |
| |
Building Subclasses from a Base Class | |
| |
| |
Overriding Base Class Methods | |
| |
| |
Polymorphism | |
| |
| |
Building a Game in Objective-C | |
| |
| |
Exposing Class Data with Properties | |
| |
| |
Declaring a Property | |
| |
| |
Accessing a Property | |
| |
| |
Class Methods | |
| |
| |
Implementing the MindPlayer | |
| |
| |
Building the Game Loop | |
| |
| |
Summary | |
| |
| |
| |
The Cocoa Foundation Framework | |
| |
| |
Model-View-Controller Architecture | |
| |
| |
Your First iOS Game | |
| |
| |
Building the UI | |
| |
| |
Outlets and Actions | |
| |
| |
Handling Text with NSString | |
| |
| |
NSString Methods | |
| |
| |
Mutable and Immutable Types | |
| |
| |
String Comparison | |
| |
| |
Collecting Objects with NSArray | |
| |
| |
NSArray Methods | |
| |
| |
Modifying Arrays by Using NSMutableArray | |
| |
| |
Wrapping Numbers with NSNumber | |
| |
| |
Other Collection Classes | |
| |
| |
NSSet | |
| |
| |
NSDictionary | |
| |
| |
Building the Game Model | |
| |
| |
Periodic Events and Timers | |
| |
| |
Summary | |
| |
| |
| |
Game Building Blocks | |
| |
| |
| |
Drawing With Uikit And Core Graphics | |
| |
| |
Introducing the Drawing Frameworks | |
| |
| |
UIKit | |
| |
| |
Core Graphics | |
| |
| |
The Drawing Environment | |
| |
| |
The Graphics Context | |
| |
| |
The UIView Coordinate System | |
| |
| |
The drawRect: Method | |
| |
| |
Drawing Shapes with UIBezierPath | |
| |
| |
Specifying Colors with UIColor | |
| |
| |
Advanced Drawing with Core Graphics | |
| |
| |
Shadows | |
| |
| |
Gradients | |
| |
| |
Starting the Blocker Game with the BlockView | |
| |
| |
Working with Images | |
| |
| |
The Image Classes | |
| |
| |
The View Hierarchy | |
| |
| |
Animation and Timing with CADisplayLink | |
| |
| |
Finishing the Blocker Game | |
| |
| |
Summary | |
| |
| |
| |
Responding To User Interaction | |
| |
| |
Events in iOS | |
| |
| |
The Event Architecture | |
| |
| |
Event Objects | |
| |
| |
Handling Multitouch Events | |
| |
| |
Building a Simple Touch-Based Game: Simon Says | |
| |
| |
Responding to Motion with the Accelerometer | |
| |
| |
Recognizing Gestures | |
| |
| |
Summary | |
| |
| |
| |
Animating Your Graphics | |
| |
| |
Animating Images with UIImageView | |
| |
| |
Introducing Core Animation | |
| |
| |
A Brief Introduction to Blocks | |
| |
| |
Animating UIView Properties and Transitions | |
| |
| |
Property Animations | |
| |
| |
Transition Animations | |
| |
| |
Core Animation Basics | |
| |
| |
Layer Layout | |
| |
| |
Animatable Properties | |
| |
| |
Layer Trees | |
| |
| |
Summary | |
| |
| |
| |
Making Noise With Ios Audio Apis | |
| |
| |
Playing Simple Sounds with the System Sound Services | |
| |
| |
Playing Sounds with the AV Foundation Framework | |
| |
| |
The AVAudioPlayer Class | |
| |
| |
Format and Performance Considerations | |
| |
| |
Confi guring the Audio Session | |
| |
| |
Playing Multiple Sounds Simultaneously | |
| |
| |
Looping Sounds | |
| |
| |
Media Player Framework | |
| |
| |
Summary | |
| |
| |
| |
Building A Networked Game With Gamekit | |
| |
| |
Introducing GameKit | |
| |
| |
Starting Out | |
| |
| |
Networking Your Game | |
| |
| |
NSData and NSCoding | |
| |
| |
Converting Classes to Data with Archives | |
| |
| |
Connecting and Sending Data | |
| |
| |
Running the Game | |
| |
| |
Summary | |
| |
| |
Appendix: Answers To Exercises | |
| |
| |
Index | |