售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Sparrow iOS Game Framework Beginner's Guide
Table of Contents
Sparrow iOS Game Framework Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Time for action – heading
What just happened?
Pop quiz – heading
Have a go hero – heading
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with Sparrow
Understanding the basics of Sparrow
System requirements
Setting up the Apple developer account
Downloading Xcode
Downloading Sparrow
Cloning the Git repository
Contents of the Sparrow package
The samples folder
The sparrow folder
Markdown files in the root folder
License
Setting up Sparrow
Option 1 – source tree reference
Time for action – adding Sparrow as a source tree reference
What just happened?
Time for action – using the barebone project as a template
What just happened?
Option 2 – CocoaPods
Time for action – installing command-line tools
What just happened?
Time for action – installing CocoaPods
What just happened?
Time for action – using the barebone project as a template
What just happened?
Running the template on the actual device
Time for action – running the template on the actual device
What just happened?
Getting Sparrow documentation files
Time for action – adding the Sparrow API documentation to Xcode
What just happened?
The idea for the game
Setting goals and expectations
Examining our gameplay elements
Code conventions
Pop quiz
Summary
2. Displaying Our First Objects
Understanding display objects
Explaining display object containers
Setting the background color
Time for action – changing the background color
What just happened?
What is a stage?
Creating our cardboard puppet doll
Time for action – creating a cardboard puppet doll
What just happened?
Have a go hero – improving the cardboard puppet doll
Explaining macros
The Angles macro
The Colors macro
The utility functions
Constants in Sparrow
Math
Color
Manipulating display objects
Time for action – manipulating display objects
What just happened?
Pop quiz
Summary
3. Managing Assets and Scenes
Working with assets
Managing our assets
Time for action – creating a base class
What just happened?
Have a go hero
Creating a texture manager
Time for action – managing our textures
What just happened?
Creating a sound manager
Time for action – implementing a sound manager
What just happened?
Creating a file manager
Time for action – managing remaining file types
What just happened?
Have a go hero
Basic error handling
Time for action – getting started with basic error handling
What just happened?
Have a go hero
Putting it all together
Time for action – creating an asset container class
What just happened?
Time for action – displaying an image
What just happened?
Have a go hero
What are scenes?
Time for action – implementing a scene class
What just happened?
Creating a scene director
Time for action – managing our scenes with a scene director
What just happened?
Have a go hero
Pop quiz
Summary
4. The Basics of Our Game
Taking care of cross-device compatibility
Understanding the texture size limit
How to deal with different screen sizes
Scaling the viewport
Black borders
Showing non-interactive screen space
Rearranging screen elements
Choosing the best option
Differences between various devices
Utilizing the iOS SDK
Retina and iPad support in Sparrow
App icons and splash images
The bottom line
Starting with the development of our game
Creating our scene manager setup
Time for action – creating our scene manager setup
What just happened?
Adding images to the battlefield scene
Time for action – adding images to the battlefield scene
What just happened?
Arranging images in the pirate cove scene
Time for action – arranging images in the pirate cove scene
What just happened?
Pop quiz
Summary
5. Beautifying Our Game
Working with tweens
Time for action – moving the pirate ship
What just happened?
Understanding transitions
Explaining jugglers
Updating the movement and canceling tweens
Time for action – updating the movement
What just happened?
Working with sprite sheets
Learning about texture formats
Using TexturePacker to create sprite sheets
Loading our first texture atlas
Time for action – loading our first texture atlas
What just happened?
Pop quiz
Summary
6. Adding Game Logic
Extending the asset manager
Time for action – adding texture atlases to the asset manager
What just happened?
Structuring our ships
Time for action – creating a ship class
What just happened?
Extending the ship class
Time for action – adding more functionality to the ship class
What just happened?
Shooting cannonballs
Time for action – allowing the ship to shoot cannonballs
What just happened?
Have a go hero
Collision detection
Time for action – letting cannonballs collide with ships
What just happened?
Loading gameplay-relevant data
Time for action – avoiding hardcoded values
What just happened?
Pop quiz
Summary
7. User Interface
Displaying the hit points of each ship
Time for action – placing a health bar on top of each ship
What just happened?
Adding buttons to the screen
Pausing and resuming the game
Displaying the pause and resume buttons on the screen
Time for action – putting buttons on the screen
What just happened?
Implementing the logic to pause and resume the game
Time for action – allowing the player to pause and resume
What just happened?
Have a go hero
Aborting the current game
Time for action – conceding the game
What just happened?
Adding dialogs to the screen
Time for action – creating a dialog class
What just happened?
Have a go hero
Adding custom events to the dialogs
Time for action – adding our own buttons to our dialog
What just happened?
Drawing text on the screen
Displaying our first text field
Time for action – adding a text field to the dialog
What just happened?
Explaining system fonts
Explaining bitmap fonts
Creating our very own bitmap font
Time for action – using bmGlyph to create a bitmap font
What just happened?
Displaying a text field with bitmap fonts
Time for action – using our bitmap font for a text field
What just happened?
Pop quiz
Summary
8. Artificial Intelligence and Game Progression
Artificial intelligence in theory
Explaining fuzzy logic
Explaining state machines
Letting the enemy ship move and attack
Moving the ship
Time for action – getting the enemy ship to move around
What just happened?
Attacking other ships
Time for action – the enemy should attack the player
What just happened?
Adding fuzzy values to the AI
Time for action – spicing up the AI with fuzzy values
What just happened?
Have a go hero
Adding progression to our game
Adding a World class
Time for action – adding a World class
What just happened?
Have a go hero
Updating the scene and dialog classes
Time for action – updating the scene and dialog classes
What just happened?
Adding game mechanics to the pirate cove
Time for action – making the pirate cove playable
What just happened?
Adding progression to the game
Have a go hero –turning our game into a real game
Adding win and lose conditions
Time for action – being able to win or lose
What just happened?
Pop quiz
Summary
9. Adding Audio to Our Game
Finding music and sound
Generating sound effects
Learning about audio formats
Music and sound effects for our game
Adding audio playback
Starting the audio engine
Time for action – getting audio files to play
What just happened?
Have a go hero
Playing music in our scenes
Time for action – playing music in our scenes
What just happened?
Have a go hero
Adding a sound effect
Time for action – sound effects in the pirate cove
What just happened?
Have a go hero
Pop quiz
Summary
10. Polishing Our Game
Adding additional scenes
The game over scene
Creating the game over scene
Time for action – showing the game over scene
What just happened?
Connecting the game over scene
Time for action – having the game over scene show up
What just happened?
Adding a main menu
Time for action – integrating the main menu into our game
What just happened?
Have a go hero
Adding an intro scene
Time for action – creating an intro for our game
What just happened?
Implementing tutorial mechanics
Time for action – adding a tutorial to our intro scene
What just happened?
Loading and saving the current state
Time for action – loading and saving the last played game
What just happened?
Pop quiz
Summary
11. Integrating Third-party Services
Getting word out to potential testers
Registering at Ubertesters
Integrating Ubertesters
Time for action – integrating Ubertesters
What just happened?
Creating a build for beta testers
Time for action – creating a build for beta testers
What just happened?
Deploying an application
Time for action – deploying an application
What just happened?
Explaining Game Center
Integrating Game Center authentication
Time for action – integrating Game Center authentication
What just happened?
Have a go hero
An overview of analytics services
Flurry analytics
Flox
Pop quiz
Summary
A. Pop Quiz Answers
Chapter 1, Getting Started with Sparrow
Pop quiz
Chapter 2, Displaying Our First Objects
Pop quiz
Chapter 3, Managing Assets and Scenes
Pop quiz
Chapter 4, The Basics of Our Game
Pop quiz
Chapter 5, Beautifying Our Game
Pop quiz
Chapter 6, Adding Game Logic
Pop quiz
Chapter 7, User Interface
Pop quiz
Chapter 8, Artificial Intelligence and Game Progression
Pop quiz
Chapter 9, Adding Audio to Our Game
Pop quiz
Chapter 10, Polishing Our Game
Pop quiz
Chapter 11, Integrating Third-party Services
Pop quiz
Afterword
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜