售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Swift 3 Game Development - Second Edition
Swift 3 Game Development - Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Designing Games with Swift
Why you will love Swift
Prerequisites
What you will learn in this book
Embracing SpriteKit
Reacting to player input
Structuring your game code
Building UI/menus/levels
Integrating with Game Center
Maximizing fun
Crossing the finish line
Monetizing your work
New in Swift 3
Setting up your development environment
Introducing and installing Xcode
Creating our first Swift game
Navigating our project
Exploring the SpriteKit demo
Examining the demo code
Cleaning up
Summary
2. Sprites, Camera, Action!
Sharpening our pencils
Checkpoint 2-A
Drawing your first sprite
Building a SKSpriteNode class
Adding animation to your toolkit
Sequencing multiple animations
Recapping your first sprite
The story on positioning
Alignment with anchor points
Adding textures and game art
Downloading the free assets
More exceptional art
Drawing your first textured sprite
Adding the bee image to your project
Loading images with SKSpriteNode
Designing for retina
The ideal asset approach
Hands-on with retina in SpriteKit
Organizing your assets
Exploring Assets.xcassets
Collecting art into texture atlases
Updating our bee node to use the texture atlas
Iterating through texture atlas frames
Putting it all together
Centering the camera on a sprite
Checkpoint 2-B
Summary
3. Mix in the Physics
Laying the foundation
Following protocol
Reinventing the bee
The icy tundra
Adding the ground texture to Assets.xcassets
Adding the Ground class
Tiling a texture
Running wire to the ground
A wild penguin appears!
Renovating the GameScene class
Exploring the physics system
Dropping like flies
Solidifying the ground
Checkpoint 3-A
Exploring physics simulation mechanics
Bee meets bee
Impulse or force?
Checkpoint 3-B
Summary
4. Adding Controls
Retrofitting the Player class for flight
The Beekeeper
Updating the Player class
Moving the ground
Assigning a physics body to the player
Creating a physics body shape from a texture
Polling for device movement with Core Motion
Implementing the Core Motion code
Checkpoint 4-A
Wiring up the sprite onTap events
Implementing touchesBegan in the GameScene
Larger than life
Teaching our penguin to fly
Listening for touches in GameScene
Fine-tuning gravity
Spreading your wings
Improving the camera
Pushing Pierre forward
Tracking the player's progress
Looping the ground
Checkpoint 4-B
Summary
5. Spawning Enemies, Coins, and Power-ups
Introducing the cast
Locating and adding the art assets
Adding the Power-up Star
Adding the Star class
Adding a new enemy - the Mad Fly
Adding the MadFly class
Another terror - Bats!
Adding the Bat class
Guarding the ground - adding the Blade
Adding the Blade class
Adding the coins
Creating the coin classes
Organizing the project navigator
Testing the new game objects
Checkpoint 5-A
Preparing for endless flight
Summary
6. Generating a Never-Ending World
Designing levels with the SpriteKit scene editor
Separating level data from game logic
Using custom classes in the scene editor
Encounters in endless flying
Creating our first encounter
Integrating scenes into the game
Checkpoint 6-A
Spawning endless encounters
Building more encounters
Updating the EncounterManager class
Storing metadata in SKSpriteNodeuserData property
Wiring up EncounterManager in the GameScene class
Spawning the Power-up Star at random
Turning bronze coins to gold
Checkpoint 6-B
Summary
7. Implementing Collision Events
Learning the SpriteKit collision vocabulary
Collision versus contact
Physics category masks
Using category masks in Swift
Adding contact events to our game
Setting up the physics categories
Assigning categories to game objects
The player
The ground
The Power-up Star
Enemies
Coins
Preparing GameScene for contact events
Viewing console output
Testing our contact code
Checkpoint 7-A
Player health and damage
Animations for damage and game over
The damage animation
The game over animation
Collecting coins
The Power-up Star logicterrific progress in this chapter. To download my project up to this
Checkpoint 7-B
Summary
8. Polishing to a Shine - HUD, Parallax Backgrounds, Particles, and More
Adding a HUD
Implementing the HUD
Parallax background layers
Adding the background assets
Implementing a background class
Wiring up backgrounds in the GameScene class
Checkpoint 8-A
Harnessing SpriteKit's particle system
Adding the circle particle asset
Creating a SpriteKit particle file
Configuring the path particle settings
Adding the particle emitter to the game
Granting safety as the game starts
Checkpoint 8-B
Summary
9. Adding Menus and Sounds
Building the main menu
Creating the menu scene and menu nodes
Launching the main menu when the game starts
Wiring up the START GAME button
Adding the restart game menu
Extending the HUD
Wiring up GameScene for game over
Informing the GameScene class when the player dies
Implementing touch events for the restart menu
Checkpoint 9-A
Adding music and sound
Adding the sound assets to the game
Playing background music
Playing sound effects
Adding the coin sound effect to the Coin class
Adding the power-up and hurt sound effects to the Player class
Playing a sound when the game starts
Checkpoint 9-B
Summary
10. Standing Out in the Crowd with Advanced Features
Adding fun crates to smash open
Creating the Crate particle effects
Recycling emitter nodes with particle pools
Checkpoint 10-A
Wiring up crate contact events
Adding a health crate
Smashing coin crates
Checkpoint 10-B
Summary
11. Choosing a Monetization Strategy
Developing your marketing plan
When to start marketing
Marketing checklist
Leveraging crowdfunding
Pros and cons of crowdfunding
Showing display ads for revenue
The upsides to showing ads
The downsides to showing ads
Selling in-app purchases
In-app purchase strategies
A word about farming your players
Localization into foreign markets
Managing scope and completing projects
Summary
12. Integrating with Game Center
Registering an app with iTunes Connect
Creating a test user
Authenticating the player's Game Center account
Opening Game Center in our game
Checkpoint 10-A
Adding a leaderboard of high scores
Creating a new leaderboard in iTunes Connect
Updating the leaderboard from the code
Adding an achievement
Creating a new achievement in iTunes Connect
Updating achievements from the code
Checkpoint 10-B
Summary
13. Ship It! Preparing for the App Store and Publication
Finalizing assets
Adding app icons
Designing the launch screen
Taking screenshots for each supported device
Finalizing iTunes Connect information
Configuring pricing
Uploading our project from Xcode
Submitting for review in iTunes Connect
Summary
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜