Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Learning Java by Building Android Games
Learning Java by Building Android Games

Learning Java by Building Android Games: Learn Java and Android from scratch by building five exciting games , Third Edition

Arrow left icon
Profile Icon John Horton
Arrow right icon
₱1989.99
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (13 Ratings)
Paperback Mar 2021 686 pages 3rd Edition
eBook
₱579.99 ₱1591.99
Paperback
₱1989.99
Subscription
Free Trial
Arrow left icon
Profile Icon John Horton
Arrow right icon
₱1989.99
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (13 Ratings)
Paperback Mar 2021 686 pages 3rd Edition
eBook
₱579.99 ₱1591.99
Paperback
₱1989.99
Subscription
Free Trial
eBook
₱579.99 ₱1591.99
Paperback
₱1989.99
Subscription
Free Trial

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
Product feature icon AI Assistant (beta) to help accelerate your learning
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

Learning Java by Building Android Games

Chapter 1: Java, Android, and Game Development

Welcome to Learning Java by Building Android Games (Third Edition). In this first chapter, we will delve straight into Java, Android, and game development. By the end, you will have built and deployed the first part of the first game, and you will also have a great insight into what you will achieve in this book going forward.

Additionally, we will look at some diagrams and an outline of each of the five games that we will develop throughout the book.

Furthermore, we will explore and discover what is so great about Android, what exactly Android and Java are, how they work and complement each other, and what that means to us as future game developers.

Moving quickly on, we will set up the required software so that we can build and deploy the outline for our first game.

Important note

It is my aim to keep this book up to date. Please check the following web page for further discussions and tips on any changes to Android Studio...

Technical requirements

The following are the official technical requirements for Android development with Android Studio and its related tools. However, these are the absolute bare minimum requirements. Please refer to the Setting up Android Studio section for further details.

Windows

  • Microsoft® Windows® 7/8/10 (64 bit)
  • 4 GB RAM minimum; 8 GB RAM recommended
  • 2 GB of available disk space minimum; 4 GB recommended (500 MB for IDE + 1.5 GB for Android SDK and emulator system image)
  • 1280 x 800 minimum screen resolution

Mac

  • Mac® OS X® 10.10 (Yosemite) or higher, up to 10.14 (macOS Mojave)
  • 4 GB RAM minimum; 8 GB RAM recommended
  • 2 GB of available disk space minimum; 4 GB recommended (500 MB for IDE + 1.5 GB for Android SDK and emulator system image)
  • 1280 x 800 minimum screen resolution

Linux

  • GNOME or KDE desktop

    Tested on gLinux, based on Debian.

  • 64-bit distribution capable of running 32-bit applications...

What's new in the third edition?

The second edition saw a massive overhaul and a doubling of the number of games built compared to the first edition. Unfortunately, there are only so many pages that can fit inside a paperback book. Therefore, this edition focuses on improving the way Java, Android, and game development concepts are taught. I have rethought the way these topics are explained and have made it more visual than before. In addition to this, I have managed to squeeze in about a dozen new mini topics. These are either Java fundamentals, such as variable types, which were not covered in earlier editions; new Android Studio features, such as the profiler; or classic programming concepts that never quite made it in before, such as method recursion.

Why Java, Android, and games?

When Android first arrived in 2008, it was a bit drab compared to the much more stylish iOS on the Apple iPhone/iPad. However, quite quickly, through diverse handset offers that struck a chord with the practical price-conscious and the fashion-conscious and tech-savvy, Android user numbers exploded.

For many, myself included, developing Android games is the most rewarding pastime and business.

Quickly putting together a prototype of a game idea, refining it, and then deciding to run with it and wire it up into a fully fledged game is such an exciting and rewarding process. Programming can be fun, and I have been programming all my life. However, creating games, especially for Android, is somehow extraordinarily rewarding.

Explaining exactly why this is is quite difficult. Maybe it is the fact that the platform is free and open. You can distribute your games without requiring the permission of a big controlling corporation – nobody can...

The games we will build

Let's take a look at some useful screenshots and get a little bit more detail about each of the games from the book. We will go into further details and explanations as we start each project.

Sub' Hunter

The first game we build will allow us to introduce some key Java beginner's topics, including code comments, variables, operators, methods, loops, generating random numbers, if, else, switch, and a brief introduction to Object-Oriented Programming (OOP). We will also learn how to communicate with the Android operating system, detect screen touches, draw simple graphics, manage the screen resolution, and handle different screen sizes. All of this will be used to build a simpler variation of the classic Minesweeper game. Here is a screenshot of our game:

Figure 1.1 – The Sub' Hunter game

This will be a tap-to-shoot game where the player has to guess the position of the sub', then refine their next...

How Java and Android work together

Before we start our Android quest, we need to understand how Android and Java work together.

Android is a complex system, but you do not need to understand it in depth in order to make amazing apps.

After we write a program, in Java, for Android, we click on a button, and our code is transformed into another form – the form that is understood by Android. This other form is called bytecode, and the transformation process is called compiling. The reason you can use the Kotlin programming language to write Android apps is that it directly compiles to the same bytecode as Java. In fact, Java can be translated to Kotlin with the click of a button.

Then, when the user installs our application, the bytecode is translated by another process, known as the Android Runtime (ART), into machine code. This is the fastest possible execution format. So, if you have ever heard people saying that you shouldn't use Java because it is slow, then...

Setting up Android Studio

Setting up Android Studio is quite straightforward if a little lengthy. Grab a refreshment and get started with the following steps. This tutorial will install Android Studio to the D drive. I chose the D drive because it is a big installation – approximately 12 GB once we have everything downloaded – and the D drive on many PCs is typically larger and has more free space than the C drive. Should you wish to install Android Studio on the C drive (or any other drive), then these instructions should be easy to adjust.

Visit https://developer.android.com/studio and click on the Download Android Studio button. This will begin the download of the latest stable version for Windows. You will need to accept the terms and conditions to commence the download.

While you are waiting for the download to complete, create a new folder at the root of your D drive, called Android. Inside the Android folder, create another new folder, called Android Studio...

Starting the first project – Sub' Hunter

Now we can get started on the first game. I will go into a lot more detail about what exactly Sub' Hunter does and how it is played. However, for now, let's just build something and see our first Android game start to take shape.

Important note

The complete code, as it stands at the end of this chapter, is on the GitHub repo of the Chapter 1 folder. Note, however, that you still need to go through the project creation phase, which is explained in this chapter (and at the beginning of all projects), as Android Studio does lots of work that we cannot see.

Follow these steps to start the project:

  1. Run Android Studio (if it isn't running already) in the same way you would run any other app. On Windows 10, for example, the launch icon appears in the start menu.

    Tip

    If you are prompted to Import Studio settings from:, choose Do not import settings.

  2. You will be greeted with the Android Studio welcome screen...

Android Studio and our project – a very brief guided tour

I won't go into all of the dozens of different windows and menu options because we will cover them as needed. However, here are a few details to help you begin familiarizing yourself with Android Studio.

Take a look at the following screenshot. You will notice two major sections – one section on the left and a larger window on the right:

Figure 1.13 – Project panel and Editor window

Let's take a look at the panel on the left.

The Project panel

The panel on the left can be changed into various different views. We will need it just as it is for virtually the whole book. This is the Project panel/window. Let's take a closer look:

Figure 1.14 – The Project panel folders and sub-folders

As you can see, there are several folders and sub-folders. For around 90 percent of every project, we will only need one folder. The folder I am...

Refactoring MainActivity to SubHunter

It is a good practice to use meaningful names for all the different parts of our code. We will see this as we progress through the projects. For now, I think MainActivity is a bit vague and inconclusive. We could make do with it, but let's rename it to something more meaningful. This will also allow us to see how we can use the refactoring tool of Android Studio. The reason that we use the term "refactoring" instead of just "renaming" is that when we change the names we use in our code, there is often much more than just a simple name change going on behind the scenes. For example, later, when we refactor the MainActivity filename to SubHunter, Android Studio will change the name of the file as well as some code in the AndroidManifest.xml file and the MainActivity.java (which will soon be SubHunter.java) file.

In the Project panel, right-click on the MainActivity file and select Refactor | Rename. In the pop-up window...

Locking the game to full screen and landscape orientation

We want to use every pixel that the player's Android device has to offer, so we will make changes to the AndroidManifest.xml file. This allows us to use a style for our app that hides all of the default menus and titles from the user interface.

Make sure that the AndroidManifest.xml file is open in the Editor window. If you followed along with the previous section, then it will be open already.

In the AndroidManifest.xml file, locate the following line of code:

<android:name=".SubHunter">

Place the cursor before the closing > character, as shown in the preceding code. Press the Enter key a couple of times to move the > character a couple of lines below the rest of the line.

Immediately underneath ".SubHunter", but before the newly positioned >, type in or copy and paste this next line of code. This will make the game run without any user interface.

Note that the line...

Amending the code to use the full screen and the best Android class

When you write code for Android, you will always be working within the confines of the operating system. As there are so many variations of Android apps, it makes sense that the Android team would supply lots of different options for us. We will now make a few minor changes so that we are using the most efficient code possible.

When we generated the project, Android Studio built a project that was more ideally suited to a regular app with a conventional user interface. We have already hidden the action bar by modifying the XML. Now we will make a couple of minor code changes in the SubHunter.java file to use an Android class that is more suited to game development.

Find the following line of code near the top of the SubHunter.java file:

import androidx.appcompat.app.AppCompatActivity;

Change the preceding line of code to the same as this following line of code:

import android.app.Activity;

Immediately...

Deploying the game so far

Before we can properly explain any of the code and learn our first bit of Java, you might be surprised to learn that we can already run our project. It will just be a blank screen, but as we will be running the game as often as possible to check our progress, let's learn how to do that now. You have three options:

  • Run the game on the emulator on your PC (this is part of Android Studio).
  • Run the game on a real Android device in USB debugging mode.
  • Export the game as a full Android project that can be uploaded to the Play Store.

The first option is the easiest to set up because we did it as part of setting up Android Studio. If you have a powerful PC, you will hardly see the difference between an emulator and a real device. However, screen touches are emulated by mouse clicks, so proper testing of the player's experience is not possible.

The second option that uses a real device has a couple more steps; however, once it is...

Summary

We have covered a lot of ground in this first chapter. We learned why games, Android, and Java are all useful and potentially profitable ways to learn how to program. We discovered how Android and Java work together, and we have taken a look at the five games that we will build throughout this book. Finally, we got started on the first game, Sub' Hunter, and deployed a blank project to an emulator and a real device.

In the next chapter, we will learn the first set of basics for Java and coding in general. Additionally, we will scratch the surface of some more advanced Java topics that we will keep coming back to throughout the book. These topics include OOP, classes, objects, and methods, and we will explore how these topics are intimately related.

Following this, we can then make sense of the code that Android Studio generated for us and that we modified (in SubHunter.java), and we can start to type our own code.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Learn Java, Android, and object-oriented programming from scratch
  • Find out how to build games including Sub Hunter, Retro Pong, Bullet Hell, Classic Snake, and Scrolling Shooters
  • Create and design your own games by learning all the concepts that a game developer must know

Description

Android is one of the most popular mobile operating systems today. It uses the most popular programming language, Java, as one of the primary languages for building apps of all types. Unlike most other Android books, this book doesn’t assume that you have any prior knowledge of Java programming, instead helps you get started with building Android games as a beginner. This new, improved, and updated third edition of Learning Java by Building Android Games helps you to build Android games from scratch. Once you've got to grips with the fundamentals, the difficulty level increases steadily as you explore key Java topics, such as variables, loops, methods, object-oriented programming (OOP), and design patterns while working with up-to-date code and supporting examples. At each stage, you'll be able to test your understanding by implementing the concepts that you’ve learned to develop a game. Toward the end, you’ll build games such as Sub Hunter, Retro Pong, Bullet Hell, Classic Snake, and Scrolling Shooter. By the end of this Java book, you'll not only have a solid understanding of Java and Android basics but will also have developed five cool games for the Android platform.

Who is this book for?

Learning Java by Building Android Games is for anyone who is new to Java, Android, or game programming and wants to develop Android games. The book will also serve as a refresher for those who already have experience using Java on Android or any other platform but are new to game development.

What you will learn

  • Set up a game development environment in Android Studio
  • Respond to a player's touch and program intelligent enemies who can challenge the player in different ways
  • Explore collision detection, sprite sheets animation, simple tracking and following, AI, parallax backgrounds, and particle explosions
  • Animate objects at 60 FPS and manage multiple independent objects using OOP
  • Work with design patterns such as OOP, singleton, strategy, and entity-component
  • Work with the Android API, the SoundPool API, Paint, Canvas, Bitmap classes, and detect version numbers
Estimated delivery fee Deliver to Philippines

Standard delivery 10 - 13 business days

₱492.95

Premium delivery 5 - 8 business days

₱2548.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 26, 2021
Length: 686 pages
Edition : 3rd
Language : English
ISBN-13 : 9781800565869
Vendor :
Google
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
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Philippines

Standard delivery 10 - 13 business days

₱492.95

Premium delivery 5 - 8 business days

₱2548.95
(Includes tracking information)

Product Details

Publication date : Mar 26, 2021
Length: 686 pages
Edition : 3rd
Language : English
ISBN-13 : 9781800565869
Vendor :
Google
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.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
$199.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
$279.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 7,807.97
How to Build Android Apps with Kotlin
₱3571.99
Learning Java by Building Android Games
₱1989.99
Android Programming for Beginners
₱2245.99
Total 7,807.97 Stars icon
Banner background image

Table of Contents

23 Chapters
Chapter 1: Java, Android, and Game Development Chevron down icon Chevron up icon
Chapter 2: Java – First Contact Chevron down icon Chevron up icon
Chapter 3: Variables, Operators, and Expressions Chevron down icon Chevron up icon
Chapter 4: Structuring Code with Java Methods Chevron down icon Chevron up icon
Chapter 5: The Android Canvas Class – Drawing to the Screen Chevron down icon Chevron up icon
Chapter 6: Repeating Blocks of Code with Loops Chevron down icon Chevron up icon
Chapter 7: Making Decisions with Java If, Else, and Switch Chevron down icon Chevron up icon
Chapter 8: Object-Oriented Programming Chevron down icon Chevron up icon
Chapter 9: The Game Engine, Threads, and the Game Loop Chevron down icon Chevron up icon
Chapter 10: Coding the Bat and Ball Chevron down icon Chevron up icon
Chapter 11: Collisions, Sound Effects, and Supporting Different Versions of Android Chevron down icon Chevron up icon
Chapter 12: Handling Lots of Data with Arrays Chevron down icon Chevron up icon
Chapter 13: Bitmap Graphics and Measuring Time Chevron down icon Chevron up icon
Chapter 14: Java Collections, the Stack, the Heap, and the Garbage Collector Chevron down icon Chevron up icon
Chapter 15: Android Localization – Hola! Chevron down icon Chevron up icon
Chapter 16: Collections and Enumerations Chevron down icon Chevron up icon
Chapter 17: Manipulating Bitmaps and Coding the Snake Class Chevron down icon Chevron up icon
Chapter 18: Introduction to Design Patterns and Much More! Chevron down icon Chevron up icon
Chapter 19: Listening with the Observer Pattern, Multitouch, and Building a Particle System Chevron down icon Chevron up icon
Chapter 20: More Patterns, a Scrolling Background, and Building the Player's Ship Chevron down icon Chevron up icon
Chapter 21: Completing the Scrolling Shooter Game Chevron down icon Chevron up icon
Chapter 22: What Next? Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(13 Ratings)
5 star 69.2%
4 star 7.7%
3 star 0%
2 star 0%
1 star 23.1%
Filter icon Filter
Top Reviews

Filter reviews by




Justin Horner Apr 15, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
There's a tricky balance between writing resources targeted to beginners while also introducing game development. I'm happy to say this book balances these two with ease and is one of the best introductions to game development I've seen in quite a while.The author follows a spiral-based curriculum where concepts are introduced with only the information you need to accomplish the goal. They are revisited to learn more detail when required. This approach allows the reader to make progress quickly by knowing what's necessary to achieve the goal and gain knowledge as complexity needs to increase.You'll start by learning the absolute basics of variables, functions, and how to use the Android SDK to render lines, shapes, and text. As you continue through the book, you'll be introduced to Object-Oriented Programming. You'll learn about encapsulation, polymorphism, and inheritance, Heap, Stack, Garbage Collector, Localization, Design Patterns, and much more.I first learned programming to make games. Of course, my bias here is that game development is a fantastic way to learn programming. I believe this is an excellent book to begin your journey!
Amazon Verified review Amazon
Amazon Customer Mar 31, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is suitable for beginners who would like to learn Java and Android. This book covers Java, Object-Oriented Programming, and Game development for Android and the book teaches you how to use Java for android app development. The author has tried so hard to keep it simple and understandable for anyone starting programming in Java. The author has explained every topic in detail and all programs are well explained. In each chapter, the necessary knowledge for both Java and Android is being conveyed to the extent that should be sufficient to understand the programs. This book is comprehensive, up to date, and easy to follow.
Amazon Verified review Amazon
Kindle-Kunde Apr 29, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Learning coding with fun!I would recommend this book for everyone.For beginners as for advanced learners.Lots of good examples and lot of fun.
Amazon Verified review Amazon
Jorge Felico May 27, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have been wanting to get into android development for the longest time but the thought of learning a new programming language was daunting. I found this book to be very informative with easy to follow Java examples to build simple Android games. I would definetly recommend to anyone wanting to pick up Android development with Java.
Amazon Verified review Amazon
Jarvis Hill Apr 07, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book did a great job of introducing me to the fundamental of Java. I end up creating several games and learned a lot about Java. In the beginning, I start off learning the basics. It tackled manipulating variables; understanding and using methods; how to use conditional statements and operators; and how to use and import classes. As I advance through the book and tackle more complex games, I started to learn about Object Orient Programing, Managing Memory, Design Patterns, and more. This has to be one of the best ways to learn Java.
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