Swift 3 Game Development - Second Edition

Embrace the mobile gaming revolution by creating popular iOS Games with Swift 3.0
Preview in Mapt

Swift 3 Game Development - Second Edition

Stephen Haney

Embrace the mobile gaming revolution by creating popular iOS Games with Swift 3.0
Mapt Subscription
FREE
$29.99/m after trial
eBook
$10.00
RRP $31.99
Save 68%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$10.00
$39.99
$29.99 p/m after trial
RRP $31.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Swift 3 Game Development - Second Edition Book Cover
Swift 3 Game Development - Second Edition
$ 31.99
$ 10.00
Unity 2017 Game Development Essentials - Third Edition Book Cover
Unity 2017 Game Development Essentials - Third Edition
$ 39.99
$ 10.00
Buy 2 for $20.00
Save $51.98
Add to Cart

Book Details

ISBN 139781787127753
Paperback258 pages

Book Description

Swift is the perfect choice for game development. Developers are intrigued by Swift 3.0 and want to make use of new features to develop their best games yet. Packed with best practices and easy-to-use examples, this book leads you step by step through the development of your first Swift game.

This book starts by introducing SpriteKit and Swift's new features that can be used for game development. After setting up your first Swift project, you will build your first custom class, learn how to draw and animate your game, and add physics simulations.

Then, you will add the player character, NPCs, and powerups. To make your game more fun and engaging, you will learn how to set up scenes and backgrounds, build fun menus, and integrate with Apple Game Center to add leaderboards and achievements. You will then make your game stand out by adding animations when game objects collide, and incorporate proven techniques such as the advanced particle system and graphics. Finally, you will explore the various options available to start down the path towards monetization and publish your finished games to the App Store.

By the end of this book, you will be able to create your own iOS games using Swift and SpriteKit.

Table of Contents

Chapter 1: Designing Games with Swift
Why you will love Swift
Prerequisites
What you will learn in this book
New in Swift 3
Setting up your development environment
Exploring the SpriteKit demo
Examining the demo code
Cleaning up
Summary
Chapter 2: Sprites, Camera, Action!
Sharpening our pencils
Checkpoint 2-A
Drawing your first sprite
Building a SKSpriteNode class
Adding animation to your toolkit
The story on positioning
Adding textures and game art
Designing for retina
Organizing your assets
Centering the camera on a sprite
Checkpoint 2-B
Summary
Chapter 3: Mix in the Physics
Laying the foundation
Renovating the GameScene class
Exploring the physics system
Checkpoint 3-A
Exploring physics simulation mechanics
Bee meets bee
Checkpoint 3-B
Summary
Chapter 4: Adding Controls
Retrofitting the Player class for flight
Assigning a physics body to the player
Polling for device movement with Core Motion
Checkpoint 4-A
Wiring up the sprite onTap events
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
Checkpoint 4-B
Summary
Chapter 5: Spawning Enemies, Coins, and Power-ups
Introducing the cast
Locating and adding the art assets
Adding the Power-up Star
Adding a new enemy - the Mad Fly
Another terror - Bats!
Guarding the ground - adding the Blade
Adding the coins
Organizing the project navigator
Testing the new game objects
Checkpoint 5-A
Preparing for endless flight
Summary
Chapter 6: Generating a Never-Ending World
Designing levels with the SpriteKit scene editor
Encounters in endless flying
Checkpoint 6-A
Spawning endless encounters
Spawning the Power-up Star at random
Turning bronze coins to gold
Checkpoint 6-B
Summary
Chapter 7: Implementing Collision Events
Learning the SpriteKit collision vocabulary
Adding contact events to our game
Assigning categories to game objects
Preparing GameScene for contact events
Checkpoint 7-A
Player health and damage
Animations for damage and game over
Checkpoint 7-B
Summary
Chapter 8: Polishing to a Shine - HUD, Parallax Backgrounds, Particles, and More
Adding a HUD
Parallax background layers
Checkpoint 8-A
Harnessing SpriteKit's particle system
Granting safety as the game starts
Checkpoint 8-B
Summary
Chapter 9: Adding Menus and Sounds
Building the main menu
Adding the restart game menu
Checkpoint 9-A
Adding music and sound
Playing sound effects
Checkpoint 9-B
Summary
Chapter 10: Standing Out in the Crowd with Advanced Features
Adding fun crates to smash open
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
Chapter 11: Choosing a Monetization Strategy
Developing your marketing plan
Leveraging crowdfunding
Showing display ads for revenue
Selling in-app purchases
Localization into foreign markets
Managing scope and completing projects
Summary
Chapter 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
Adding an achievement
Checkpoint 10-B
Summary
Chapter 13: Ship It! Preparing for the App Store and Publication
Finalizing assets
Designing the launch screen
Uploading our project from Xcode
Submitting for review in iTunes Connect
Summary

What You Will Learn

  • Deliver powerful graphics, physics, and sound in your game by using SpriteKit
  • Set up the scene using the new capabilities of the scene editor and custom classes
  • Maximize gameplay with little-known tips and strategies for fun and repeatable action
  • Make use of animations, graphics, and particles to polish your game
  • Understand the current mobile monetization landscape to choose the best option for your own situation
  • Integrate your game with Game Center so that your players can share their high scores and achievements
  • Publish your game to the App Store and enjoy people playing your games

Authors

Table of Contents

Chapter 1: Designing Games with Swift
Why you will love Swift
Prerequisites
What you will learn in this book
New in Swift 3
Setting up your development environment
Exploring the SpriteKit demo
Examining the demo code
Cleaning up
Summary
Chapter 2: Sprites, Camera, Action!
Sharpening our pencils
Checkpoint 2-A
Drawing your first sprite
Building a SKSpriteNode class
Adding animation to your toolkit
The story on positioning
Adding textures and game art
Designing for retina
Organizing your assets
Centering the camera on a sprite
Checkpoint 2-B
Summary
Chapter 3: Mix in the Physics
Laying the foundation
Renovating the GameScene class
Exploring the physics system
Checkpoint 3-A
Exploring physics simulation mechanics
Bee meets bee
Checkpoint 3-B
Summary
Chapter 4: Adding Controls
Retrofitting the Player class for flight
Assigning a physics body to the player
Polling for device movement with Core Motion
Checkpoint 4-A
Wiring up the sprite onTap events
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
Checkpoint 4-B
Summary
Chapter 5: Spawning Enemies, Coins, and Power-ups
Introducing the cast
Locating and adding the art assets
Adding the Power-up Star
Adding a new enemy - the Mad Fly
Another terror - Bats!
Guarding the ground - adding the Blade
Adding the coins
Organizing the project navigator
Testing the new game objects
Checkpoint 5-A
Preparing for endless flight
Summary
Chapter 6: Generating a Never-Ending World
Designing levels with the SpriteKit scene editor
Encounters in endless flying
Checkpoint 6-A
Spawning endless encounters
Spawning the Power-up Star at random
Turning bronze coins to gold
Checkpoint 6-B
Summary
Chapter 7: Implementing Collision Events
Learning the SpriteKit collision vocabulary
Adding contact events to our game
Assigning categories to game objects
Preparing GameScene for contact events
Checkpoint 7-A
Player health and damage
Animations for damage and game over
Checkpoint 7-B
Summary
Chapter 8: Polishing to a Shine - HUD, Parallax Backgrounds, Particles, and More
Adding a HUD
Parallax background layers
Checkpoint 8-A
Harnessing SpriteKit's particle system
Granting safety as the game starts
Checkpoint 8-B
Summary
Chapter 9: Adding Menus and Sounds
Building the main menu
Adding the restart game menu
Checkpoint 9-A
Adding music and sound
Playing sound effects
Checkpoint 9-B
Summary
Chapter 10: Standing Out in the Crowd with Advanced Features
Adding fun crates to smash open
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
Chapter 11: Choosing a Monetization Strategy
Developing your marketing plan
Leveraging crowdfunding
Showing display ads for revenue
Selling in-app purchases
Localization into foreign markets
Managing scope and completing projects
Summary
Chapter 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
Adding an achievement
Checkpoint 10-B
Summary
Chapter 13: Ship It! Preparing for the App Store and Publication
Finalizing assets
Designing the launch screen
Uploading our project from Xcode
Submitting for review in iTunes Connect
Summary

Book Details

ISBN 139781787127753
Paperback258 pages
Read More

Read More Reviews

Recommended for You

Swift 3 Protocol-Oriented Programming - Second Edition Book Cover
Swift 3 Protocol-Oriented Programming - Second Edition
$ 31.99
$ 10.00
Test-Driven iOS Development with Swift 3 Book Cover
Test-Driven iOS Development with Swift 3
$ 31.99
$ 10.00
Swift Functional Programming - Second Edition Book Cover
Swift Functional Programming - Second Edition
$ 35.99
$ 10.00
Mastering Swift 4 - Fourth Edition Book Cover
Mastering Swift 4 - Fourth Edition
$ 35.99
$ 10.00
Mastering Swift 3 Book Cover
Mastering Swift 3
$ 35.99
$ 10.00
Swift 3 Protocol-Oriented Programming - Second Edition Book Cover
Swift 3 Protocol-Oriented Programming - Second Edition
$ 31.99
$ 10.00