Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Swift 3 Game Development
Swift 3 Game Development

Swift 3 Game Development: Build iOS 10 Games with Swift 3.0 , Second Edition

eBook
€8.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Swift 3 Game Development

Chapter 1.  Designing Games with Swift

Apple's newest version of its flagship programming language, Swift 3, is the perfect choice for game developers. As it matures, Swift is realizing its opportunity to be something special, a revolutionary tool for app creators. Swift is the gateway for developers to create the next big game in the Apple ecosystem. We have only started to explore the wonderful potential of mobile gaming and Swift is the modernization we need for our toolset. Swift is fast, safe, current, and attractive to developers coming from other languages. Whether you are new to the Apple world, or a seasoned veteran of Objective-C, I think you will enjoy making games with Swift.

Apple's website states the following:

"Swift is a successor to the C and Objective-C languages."

My goal in this book is to guide you step-by-step through the creation of a 2D game for iPhones and iPads. We will start with installing the necessary software, working through each layer of game development, ultimately publishing our new game to the App Store.

We will also have some fun along the way! We aim to create an endless flyer game featuring a magnificent flying penguin named Pierre. What is an endless flyer? Picture hit games like iCopter, Flappy Bird, Whale Trail, Jetpack Joyride, and many more-the list is quite long.

Endless flyer games are popular on the App Store and the genre necessitates that we cover many reusable components of 2D game design. I will show you how to modify our mechanics to create many different game styles. My hope is that our demo project will serve as a template for your own creative works. Before you know it, you will be publishing your own game ideas using the techniques we explore together.

In this chapter, we will cover the following topics:

  • Why you will love Swift
  • What you will learn in this book
  • New in Swift 3
  • Setting up your development environment
  • Creating your first Swift game

Why you will love Swift

Swift, as a modern programming language, benefits from the collective experience of the programming community; it combines the best parts of other languages and avoids poor design decisions. Here are a few of my favorite Swift features:

  • Beautiful syntax: Swift's syntax is modern and approachable, regardless of your existing programming experience. Apple have balanced syntax with structure to make Swift concise and readable.
  • Interoperability: Swift can plug directly into your existing projects and run side by side with your Objective-C code.
  • Strong typing: Swift is a strongly typed language. This means the compiler will catch more bugs at compile time, instead of when your users are playing your game! The compiler will expect your variables to be of a certain type (int, string, and so on) and will throw a compile-time error if you try to assign a value of a different type. While this may seem rigid if you are coming from a weakly typed language, the added structure results in safer, more reliable code.
  • Smart type inference: To make things easier, type inference will automatically detect the types of your variables and constants based upon their initial value. You do not need to explicitly declare a type for your variables. Swift is smart enough to infer variable types in most expressions.
  • Automatic memory management: As the Apple Swift developer guide states, "memory management just works in Swift". Swift uses a method called Automatic Reference Counting (ARC) to manage your game's memory usage. Besides a few edge cases, you can rely on Swift to safely clean up and turn off the lights.
  • An even playing field: One of my favorite things about Swift is how quickly the language is gaining mainstream adoption. We are all learning and growing together and there is a tremendous opportunity to break new ground.
  • Open source: From version 2.2 onwards, Apple made Swift open source, curating it through the website www.swift.org, and launched a package manager with Swift 3. This is a welcome change, as it fosters greater community involvement and a larger ecosystem of third-party tools and add-ons. Eventually, we should see Swift migrate to new platforms.

Prerequisites

I will try to make this text easy to understand for all skill levels:

  • I will assume you are brand new to Swift as a language
  • This book requires no prior game development experience, though it will help
  • I will assume you have a fundamental understanding of common programming concepts

What you will learn in this book

By the end of this book, you will be capable of creating and publishing your own iOS games. You will know how to combine the techniques we learned to create your own style of game and you will be well prepared to dive into more advanced topics with a solid foundation in 2D game design.

Embracing SpriteKit

SpriteKit is Apple's 2D game development framework and your main tool for iOS game design. SpriteKit will handle the mechanics of our graphics rendering, physics, and sound playback. As far as game development frameworks go, SpriteKit is a terrific choice. It is built and supported by Apple and thus integrates perfectly with Xcode and iOS. You will learn to be highly proficient with SpriteKit as we will be using it exclusively in our demo game.

We will learn to use SpriteKit to power the mechanics of our game in the following ways:

  • Animating our player, enemies, and power-ups
  • Painting and moving side-scrolling environments
  • Playing sounds and music
  • Applying physics such as gravity and impulses for movement
  • Handling collisions between game objects

Reacting to player input

The control schemes in mobile games must be inventive. Mobile hardware forces us to simulate traditional controller inputs, such as directional pads and multiple buttons, on the screen. This takes up valuable visible area and provides less precision and feedback than with physical devices. Many games operate with only a single input method: a single tap anywhere on the screen. We will learn how to make the best of mobile input and explore new forms of control by sensing device motion and tilt.

Structuring your game code

It is important to write well-structured code that is easy to re-use and modify as your game design inevitably changes. You will often find mechanical improvements as you develop and test your games and you will thank yourself for a clean working environment. Though there are many ways to approach this topic, we will explore some best practices to build an organized system with classes, protocols, inheritance, and composition.

Building UI/menus/levels

We will learn to switch between scenes in our game with a menu screen. We will cover the basics of user experience design and menu layout as we build our demo game.

Integrating with Game Center

Game Center is Apple's built-in social gaming network. Your game can tie into Game Center to store and share high scores and achievements. We will learn how to register for Game Center, tie it into our code, and create a fun achievement system.

Maximizing fun

If you are like me, you will have dozens of ideas for games floating around your head. Ideas come easily, but designing fun gameplay is difficult! It is common to find that your ideas need gameplay enhancements once you see your design in action. We will look at how to avoid dead-ends and see your project through to the finish line. Plus, I will share my tips and tricks to ensure your game will bring joy to your players.

Crossing the finish line

Creating a game is an experience you will treasure. Sharing your hard work will only sweeten the satisfaction. Once our game is polished and ready for public consumption, we will navigate the App Store submission process together. You will end up feeling confident in your ability to create games with Swift and bring them to market in the App Store.

Monetizing your work

Game development is a fun and rewarding process, even without compensation, but the potential exists to start a career, or side job, selling games on the App Store. Successfully promoting and marketing your game is an important task. I will outline your options and start you down the path to monetization.

New in Swift 3

The biggest feature in Swift 3 is syntax compatibility and stability. Apple is trying to refine its young, shifting language into its final foundational shape. Each successive update of Swift has introduced breaking syntax changes that made older code incompatible with the newest version of Swift; this is very inconvenient for developers. Going forward, Swift 3 aims to reach maturity and maintain source compatibility with future releases of the language. Swift 3 also features the following:

  • A package manager that will help grow the ecosystem
  • A more consistent, readable API and API guidelines that often result in less code for the same result
  • Improved tooling and bug fixes in the IDE, Xcode
  • Many small syntax improvements in consistency and clarity

Swift has already made tremendous steps forward as a powerful, young language. Now Apple is working on polishing Swift into a mature, production-ready tool. The overall developer experience improves with Swift 3.

Setting up your development environment

Learning a new development environment can be a roadblock. Luckily, Apple provides some excellent tools for iOS developers. We will start our journey by installing Xcode.

Introducing and installing Xcode

Xcode is Apple's Integrated Development Environment (IDE). You will need Xcode to create your game projects, write and debug your code, and build your project for the App Store. Xcode also comes bundled with an iOS simulator to test your game on virtualized iPhones and iPads on your computer.

Apple praises Xcode as "an incredibly productive environment for building amazing apps for Mac, iPhone, and iPad" .

To install Xcode, search for Xcode in the AppStore, or visit http://developer.apple.com and select Developer and then Xcode.

Note

Swift is continually evolving and each new Xcode release brings changes to Swift. If you run into errors because Swift has changed, you can always use Xcode's built-in syntax update tool. Simply use Xcode's Edit | Convert to Latest Syntax option to update your code.

Xcode performs common IDE features to help you write better, faster code. If you have used IDEs in the past, then you are probably familiar with autocompletion, live error highlighting, running and debugging a project, and using a project manager pane to create and organize your files. However, any new program can seem overwhelming at first. We will walk through some common interface functions over the next few pages. I have also found tutorial videos on YouTube to be particularly helpful if you are stuck. Most common search queries result in helpful videos.

Creating our first Swift game

Do you have Xcode installed? Let's see some game code in action in the simulator!

We will start by creating a new project in Xcode. For our demo game, we will create a side-scrolling endless flyer featuring an astonishing flying penguin named Pierre. I am going to name this project Pierre Penguin Escapes the Antarctic, but feel free to name your project whatever you like. Follow these steps to create a new project in Xcode:

  1. Launch Xcode and navigate to File | New | Project.
  2. You will see a screen asking you to select a template for your new project. Select iOS | Application in the left pane, and Game in the right pane. It should look like this:

    Creating our first Swift game

  3. Once you have selected Game, click Next. The following screen asks us to enter some basic information about our project. Don't worry; we are almost at the fun bit. Fill in the Product Name field with the name of your game.
  4. Let's fill in the Team field. Do you have an active Apple developer account? If not, you can skip over the Team field for now. If you do, your Team is your developer account. Click Add Team and Xcode will open the accounts screen where you can log in. Enter your developer credentials, as shown in the following screenshot:

    Creating our first Swift game

  5. Once you're authenticated, you can close the accounts screen. Your developer account should appear in the Team dropdown.
  6. You will want to pick a meaningful Organization Name and Organization Identifier when you create your own games for publication. Your Organization Name is the name of your game development studio. For me, that is Joyful Games. By convention, your Organization Identifier should follow a reverse domain name style. I will use io.JoyfulGames since my website is JoyfulGames.io.
  7. After you filled out the name fields, be sure to select Swift for the Language, SpriteKit for Game Technology, and Universal for Devices.
  8. For now, uncheck Integrate GameplayKit, uncheck Include Unit Tests, and uncheck Include UI Tests. We will not use these features in our demo game. Here are my final project settings:

    Creating our first Swift game

  9. Click Next and you will see the final dialog box. Save your new project. Pick a location on your computer and click Next. And we are in! Xcode has pre-populated our project with a basic SpriteKit template.

Navigating our project

Now that we have created our project, you will see the project navigator on the left-hand side of Xcode. You will use the project navigator to add, remove, and rename files and generally organize your project. You might notice that Xcode has created quite a few files in our new project. We will take it slow; don't feel that you have to know what each file does yet, but feel free to explore them if you are curious:

Navigating our project

Exploring the SpriteKit demo

Use the project navigator to open up the file named GameScene.swift. Xcode created GameScene.swift to store the default scene of our new game.

What is a scene? SpriteKit uses the concept of scenes to encapsulate each unique area of a game. Think of the scenes in a movie; we will create a scene for the main menu, a scene for the Game Over screen, a scene for each level in our game, and so on. If you are on the main menu of a game and you tap Play, you move from the menu scene to the Level 1 scene.

Tip

SpriteKit prepends its class names with the letters "SK"; consequently, the scene class is SKScene.

You will see there is already some code in this scene. The SpriteKit project template comes with a very small demo. Let's take a quick look at this demo code and use it to test the iOS simulator.

Note

Please do not be concerned with understanding the demo code at this point. Your focus should be on learning the development environment.

Look for the run toolbar at the top of the Xcode window. It should look something like the following:

Exploring the SpriteKit demo

Select the iOS device of your choice to simulate using the dropdown on the far right. Which iOS device should you simulate? You are free to use the device of your choice. I will be using an iPhone SE for the screenshots in this book, so choose iPhone SE if you want your results to match my images perfectly.

Note

Unfortunately, expect your game to play poorly in the simulator. SpriteKit suffers from poor FPS in the iOS simulator. Once our game becomes relatively complex, we will see our FPS drop, even on high-end computers. The simulator will get you through, but it is best if you can plug in a physical device to test.

It is time for our first glimpse of SpriteKit in action! Press the gray play arrow in the toolbar (handy keyboard shortcut: command + r). Xcode will build the project and launch the simulator. The simulator starts in a new window, so make sure you bring it to the front. You should see a gray background with white text: Hello, World. Click around on the gray background. You will see colorful, spinning boxes spawning wherever you click:

Exploring the SpriteKit demo

If you have made it this far, congratulations! You have successfully installed and configured everything you need to make your first Swift game.

Once you have finished playing with the spinning squares, you can close the simulator down and return to Xcode. Note: you can use the keyboard command command + q to exit the simulator or press the stop button inside Xcode. If you use the stop button, the simulator will remain open and launch your next build faster.

Examining the demo code

Let's quickly explore the demo code. Do not worry about understanding everything just yet; we will cover each element in depth later. At this point, I am hoping you will acclimatize to the development environment and pick up a few things along the way. If you are stuck, keep going! Things will actually get simpler in the next chapter, once we clear away the SpriteKit demo and start on our own game.

Make sure you have GameScene.swift open in Xcode.

The demo GameScene class implements some functions you will use in your games. Let's examine these functions. Feel free to read the code inside each function, but I do not expect you to understand the specific code just yet.

  • The game invokes the didMove function whenever it switches to the GameScene. You can think of it a bit like an initialize, or main, function for the scene. The SpriteKit demo uses it to draw the Hello, World text to the screen and set up the spinning square shape that shows up when we tap.
  • There are seven functions involving touch which handle the user's touch input to the iOS device screen. The SpriteKit demo uses these functions to spawn the spinning square wherever we touch the screen. Do not worry about understanding these functions at this time.
  • The update function runs once for every frame drawn to the screen. The SpriteKit demo does not use this function, but we may have reason to implement it later.

Cleaning up

I hope that you have absorbed some Swift syntax and gained an overview of Swift and SpriteKit. It is time to make room for our own game; let's clear all of that demo code out! We want to keep a little bit of the boilerplate, but we can delete most of what is inside the functions. To be clear, I do not expect you to understand this code yet. This is simply a necessary step towards the start of our journey.

Firstly, we will remove the Hello, World text from the demo. Open the file GameScene.sks from the project navigator in Xcode. You will see a gray layout view with Hello, World written in the middle. Simply click anywhere on the Hello, World text and press your delete key to remove it. Make sure you save your file before moving on.

Secondly, please replace all of the code from your GameScene.swift with the following code:

import SpriteKit 
 
class GameScene: SKScene { 
    override func didMove(to view: SKView) { 
    } 
} 

Once your GameScene.swift looks like the preceding code, you are ready to move on to Chapter 2, Sprites, Camera, Actions! The real fun begins now!

Summary

You have already accomplished a lot. You have had your first experience with Swift, installed and configured your development environment, launched code successfully into the iOS simulator, and prepared your project for the first steps towards your own game. Great work!

We have seen enough of the "Hello World" demo; are you ready to draw your own graphics to the game screen? We will make use of sprites, textures, colors, and animation in Chapter 2, Sprites, Camera, Action!

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Create and design games for iPhone and iPad using SpriteKit and Swift 3.0
  • Learn the core fundamentals of SpriteKit game development and mix and match techniques to customize your game
  • This step-by-step practical guide will teach you to build games from scratch using little-known tips and strategies for maximum fun

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.

Who is this book for?

If you wish to create and publish fun iOS games using Swift, then this book is for you. You should be familiar with basic programming concepts. However, no prior game development or Apple ecosystem experience is required.

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
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 07, 2017
Length: 258 pages
Edition : 2nd
Language : English
ISBN-13 : 9781787127753
Vendor :
Apple
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Publication date : Feb 07, 2017
Length: 258 pages
Edition : 2nd
Language : English
ISBN-13 : 9781787127753
Vendor :
Apple
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 102.97
Swift 4 Programming Cookbook
€36.99
Swift 3 Object-Oriented Programming
€32.99
Swift 3 Game Development
€32.99
Total 102.97 Stars icon
Banner background image

Table of Contents

13 Chapters
1. Designing Games with Swift Chevron down icon Chevron up icon
2. Sprites, Camera, Action! Chevron down icon Chevron up icon
3. Mix in the Physics Chevron down icon Chevron up icon
4. Adding Controls Chevron down icon Chevron up icon
5. Spawning Enemies, Coins, and Power-ups Chevron down icon Chevron up icon
6. Generating a Never-Ending World Chevron down icon Chevron up icon
7. Implementing Collision Events Chevron down icon Chevron up icon
8. Polishing to a Shine - HUD, Parallax Backgrounds, Particles, and More Chevron down icon Chevron up icon
9. Adding Menus and Sounds Chevron down icon Chevron up icon
10. Standing Out in the Crowd with Advanced Features Chevron down icon Chevron up icon
11. Choosing a Monetization Strategy Chevron down icon Chevron up icon
12. Integrating with Game Center Chevron down icon Chevron up icon
13. Ship It! Preparing for the App Store and Publication Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(6 Ratings)
5 star 50%
4 star 50%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Alexander Key Mar 03, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I'm still not finished with the book, but after skimming through as a semi intermediate Swift programmer It's a great introduction into Spritekit and writing a basic game, it's tailored to beginners so don't feel discouraged if you're new to Swift, Stephen's approach is slow and makes sure to explain things thoroughly which is great.Looking forward to finishing and will update my review when I do so
Amazon Verified review Amazon
Jan Schee Apr 09, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The book clearly guides reader step by step to develop a simple game o iOS.
Amazon Verified review Amazon
CrescendoLife Apr 20, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I highly recommend this book/author.My background going into this book:Very basic understanding of Xcode--able to set up project and work on sample code and playgrounds using free Apple Education books 1) Intro to App Development with Swift 2) The Swift Programming Language (Swift 3.1)Other somewhat limited previous experience setting up Cordova for iPhone app/programs in Xcode.The reason for giving background: knowing how to set up Xcode did not refer to the guidance in this book regarding setting up a programming environment.That said, this book was as close as I've seen in technical books to an "A" were it to receive a grade.1) The incorporating assets from online was a seamless experience.2) The code from the book was explained and/or written lucidly so as to permit understanding and be able to apply the concepts in personal projects with confidence.3) Also the instructions for adding code to the ongoing project were done in such a way that out of 100+/- code additions to be copy/pasted or typed I had to check against the repo twice which was easily done.4) The code just worked with no tinkering--which translates to truly being able to finish the project as written.PLEASE NOTE: I only needed to complete through Chapter 11 for my purposes. So you will need to rely on others for a review of Chapters 11 (Integrating with Game Center) and 12 (Ship it...)
Amazon Verified review Amazon
PocketTim May 05, 2017
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Good Points:- Spritekit, nodes and children and the accompanying logic is explained very clearly, this is the first learning resource that has made it all click for me.- Very quick results after only a few pages and the code snippets provided are reusable as many ways as your imagination can see fit.- Even if you're completely new to programming and Xcode, as long as you've got a Mac you'll be able to recreate the example game with no trouble and have some confidence in editing it slightly.Bad Points:- The Swift syntax and language is not explained at all. The author explains what the code is doing, but not how the code works. This is not a resource for learning swift. There's nothing really wrong with this as it's not what the book is for but it's worth keeping in mind before buying.- Many images are pretty much useless and although links to the full colour variants are provided, I don't like to break away from a book like this when I've already got enough to do.Definitely worth a buy if you have some programming knowledge and you want to take a step into the world of 2D Swift Game Development.
Amazon Verified review Amazon
The Man Apr 12, 2017
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Good book, not for a total beginner to programming or to Swift. Book gets confusing near the end and the support email never responded when I emailed them for clarity. On the whole a good book.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela