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
Android NDK Game Development Cookbook
Android NDK Game Development Cookbook

Android NDK Game Development Cookbook: For C++ developers, this is the book that can swiftly propel you into the potentially profitable world of Android games. The 70+ step-by-step recipes using Android NDK will give you the wide-ranging knowledge you need.

Arrow left icon
Profile Icon Sergey Kosarevsky Profile Icon Viktor Latypov
Arrow right icon
€41.99
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (5 Ratings)
Paperback Nov 2013 320 pages 1st Edition
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Sergey Kosarevsky Profile Icon Viktor Latypov
Arrow right icon
€41.99
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (5 Ratings)
Paperback Nov 2013 320 pages 1st Edition
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€8.99 €32.99
Paperback
€41.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

Android NDK Game Development Cookbook

Chapter 2. Porting Common Libraries

In this chapter, we will cover:

  • Compiling the native static libraries for Windows
  • Compiling the native static libraries for Android
  • Compiling the libcurl networking library
  • Compiling the OpenAL library
  • Compiling libvorbis, libmodplug, and libtheora
  • Using the FreeImage graphics library
  • Using FreeType library for text rendering
  • Implementing timing in physics
  • Rendering graphics in 2D
  • Setting up Box2D simulations
  • Building the ODE physical library

Introduction

This chapter explains how to port existing popular C/C++ libraries to Android using Android NDK. These libraries are widely used to implement feature-rich applications with graphics, sounds, and physical simulations entirely in C++. There is not much fun in simply compiling libraries. So, the parts related to FreeImage, FreeType, and Box2D provide minimal samples to demonstrate the functionality of each library. Audio and networking libraries are discussed in greater detail in the subsequent chapters. We will show you how to compile libraries and, of course, give some short samples and hints on how to start using them.

Typical caveats for porting libraries across different processors and operating systems are memory access (structure alignment/padding), byte-order (endianness), calling conventions, and floating-point issues. All the libraries described below address these issues quite well, and even if some of them do not officially support Android NDK, fixing this is just...

Compiling the native static libraries for Windows

To build the Windows version of libraries, we need a C++ compiler. We use MinGW with the GCC toolchain described in Chapter 1, Establishing a Build Environment. For each library, we have a collection of source-code files, and we need to get the static library, a file with the .a extension.

Getting ready

Let us assume the src directory contains the source code of a library we need to build for Android.

How to do it...

  1. Let us start with writing a makefile:
    CFLAGS = -I src

    This line defines a variable with a list of compiler command-line parameters. In our case, we instruct the compiler to search the src directory for header files. If the library source code spans across many directories, we need to add the –I switch for each of the directories.

  2. Next, we add the following lines for each source file:
    <SourceFile>.o:
      gcc $(CFLAGS) –c <SourceFile>.cpp –o <SourceFile>.o

    <SourceFile> should be replaced by the...

Compiling the native static libraries for Android

Android NDK includes a number of GCC and Clang toolchains for each kind of the supported processors.

Getting ready

When building a static library from the source code, we follow the steps similar to the Windows version.

How to do it...

  1. Create a folder named jni and create the Application.mk file with the appropriate compiler switches, and set the name of the library accordingly. For example, one for the FreeImage library should look like the following:
    APP_OPTIM := release
    APP_PLATFORM := android-8
    APP_STL := gnustl_static
    APP_CPPFLAGS += -frtti 
    APP_CPPFLAGS += -fexceptions
    APP_CPPFLAGS += -DANDROID
    APP_ABI := armeabi-v7a x86
    APP_MODULES := FreeImage
  2. The Android.mk file is similar to the ones we have written for the sample applications in the previous chapter, yet with a few exceptions. At the top of the file, some required variables must be defined. Let us see what the Android.mk file for the FreeImage library may look like:
    # Android API level...

Compiling the libcurl networking library

The libcurl library is a de facto standard for native applications, which deal with numerous networking protocols. The libcurl compilation for Android on a Windows host requires some additional steps to be done. We explain them in this recipe.

Getting ready

Download the libcurl source code from the library homepage: http://curl.haxx.se/libcurl/.

How to do it...

  1. Since the libcurl library build process is based on Autoconf, we will need to generate a curl_config.h file before actually building the library. Run the configure script from the folder containing the unpacked libcurl distribution package. Cross-compilation command-line flags should be set to:
    --host=arm-linux CC=arm-eabi-gcc
  2. The -I parameter of the CPPFLAGS variable should point to the /system/core/include subfolder of your NDK folder, in our case:
    CPPFLAGS=”-I D:/NDK/system/core/include”
  3. The libcurl library can be customized in many ways. We use this set of parameters (disable all...

Compiling the OpenAL library

OpenAL is a cross-platform audio library used in many gaming engines. Here are some notes on how to build it for Android.

Getting ready

Download the source code of the Martins Mozeiko port from his page: http://pielot.org/2010/12/14/openal-on-android/.

The home page of the library is as follows: http://github.com/AerialX/openal-soft-android.

How to do it...

  1. To render the generated, or saved, audio stream we use the OpenAL library, which is compiled using the standard Android.mk and Application.mk configuration files included in the accompanying materials.
  2. The Android port of the library is actually a wrapper made by Martins Mozeiko for the Android Java class android.media.AudioTrack using the JNI. The code is licensed under the GNU Library General Public License and is included in the book’s supplementary materials.

How it works…

The minimalistic source code to initialize and deinitialize OpenAL looks as follows:

ALCdevice* Device = alcOpenDevice( NULL...

Compiling libvorbis, libmodplug, and libtheora

For the loading of audio streams, we use libogg, libvorbis, and libmodplug. Video streams are handled in a similar way with the libtheora library. Here, we only give general hints on how to build the libraries from their sources, since the actual build process is straightforward once you have our typical Android.mk and Application.mk files in place.

Getting ready

Download the sources of libvorbis and libtheora codecs from http://www.xiph.org/downloads and the libmodplug library from http://modplug-xmms.sourceforge.net.

How to do it...

  1. libvorbis and libtheora both depend on libogg. The compilation of these libraries is straightforward with the provided makefiles and a standard Android.mk file with the list of source files.

    Note

    Makefiles for libvorbis and libtheora libraries must refer to the include directories of libogg.

  2. libmodplug is an open source tracker music decoder by Olivier Lapicque. We provide a shortened version of his library, with loaders...

Introduction


This chapter explains how to port existing popular C/C++ libraries to Android using Android NDK. These libraries are widely used to implement feature-rich applications with graphics, sounds, and physical simulations entirely in C++. There is not much fun in simply compiling libraries. So, the parts related to FreeImage, FreeType, and Box2D provide minimal samples to demonstrate the functionality of each library. Audio and networking libraries are discussed in greater detail in the subsequent chapters. We will show you how to compile libraries and, of course, give some short samples and hints on how to start using them.

Typical caveats for porting libraries across different processors and operating systems are memory access (structure alignment/padding), byte-order (endianness), calling conventions, and floating-point issues. All the libraries described below address these issues quite well, and even if some of them do not officially support Android NDK, fixing this is just a...

Compiling the native static libraries for Windows


To build the Windows version of libraries, we need a C++ compiler. We use MinGW with the GCC toolchain described in Chapter 1, Establishing a Build Environment. For each library, we have a collection of source-code files, and we need to get the static library, a file with the .a extension.

Getting ready

Let us assume the src directory contains the source code of a library we need to build for Android.

How to do it...

  1. Let us start with writing a makefile:

    CFLAGS = -I src

    This line defines a variable with a list of compiler command-line parameters. In our case, we instruct the compiler to search the src directory for header files. If the library source code spans across many directories, we need to add the –I switch for each of the directories.

  2. Next, we add the following lines for each source file:

    <SourceFile>.o:
      gcc $(CFLAGS) –c <SourceFile>.cpp –o <SourceFile>.o

    <SourceFile> should be replaced by the actual name of the ...

Compiling the native static libraries for Android


Android NDK includes a number of GCC and Clang toolchains for each kind of the supported processors.

Getting ready

When building a static library from the source code, we follow the steps similar to the Windows version.

How to do it...

  1. Create a folder named jni and create the Application.mk file with the appropriate compiler switches, and set the name of the library accordingly. For example, one for the FreeImage library should look like the following:

    APP_OPTIM := release
    APP_PLATFORM := android-8
    APP_STL := gnustl_static
    APP_CPPFLAGS += -frtti 
    APP_CPPFLAGS += -fexceptions
    APP_CPPFLAGS += -DANDROID
    APP_ABI := armeabi-v7a x86
    APP_MODULES := FreeImage
  2. The Android.mk file is similar to the ones we have written for the sample applications in the previous chapter, yet with a few exceptions. At the top of the file, some required variables must be defined. Let us see what the Android.mk file for the FreeImage library may look like:

    # Android API level...

Compiling the libcurl networking library


The libcurl library is a de facto standard for native applications, which deal with numerous networking protocols. The libcurl compilation for Android on a Windows host requires some additional steps to be done. We explain them in this recipe.

Getting ready

Download the libcurl source code from the library homepage: http://curl.haxx.se/libcurl/.

How to do it...

  1. Since the libcurl library build process is based on Autoconf, we will need to generate a curl_config.h file before actually building the library. Run the configure script from the folder containing the unpacked libcurl distribution package. Cross-compilation command-line flags should be set to:

    --host=arm-linux CC=arm-eabi-gcc
  2. The -I parameter of the CPPFLAGS variable should point to the /system/core/include subfolder of your NDK folder, in our case:

    CPPFLAGS=”-I D:/NDK/system/core/include”
  3. The libcurl library can be customized in many ways. We use this set of parameters (disable all protocols except...

Compiling the OpenAL library


OpenAL is a cross-platform audio library used in many gaming engines. Here are some notes on how to build it for Android.

Getting ready

Download the source code of the Martins Mozeiko port from his page: http://pielot.org/2010/12/14/openal-on-android/.

The home page of the library is as follows: http://github.com/AerialX/openal-soft-android.

How to do it...

  1. To render the generated, or saved, audio stream we use the OpenAL library, which is compiled using the standard Android.mk and Application.mk configuration files included in the accompanying materials.

  2. The Android port of the library is actually a wrapper made by Martins Mozeiko for the Android Java class android.media.AudioTrack using the JNI. The code is licensed under the GNU Library General Public License and is included in the book’s supplementary materials.

How it works…

The minimalistic source code to initialize and deinitialize OpenAL looks as follows:

ALCdevice* Device = alcOpenDevice( NULL );
ALCcontext*...

Compiling libvorbis, libmodplug, and libtheora


For the loading of audio streams, we use libogg, libvorbis, and libmodplug. Video streams are handled in a similar way with the libtheora library. Here, we only give general hints on how to build the libraries from their sources, since the actual build process is straightforward once you have our typical Android.mk and Application.mk files in place.

Getting ready

Download the sources of libvorbis and libtheora codecs from http://www.xiph.org/downloads and the libmodplug library from http://modplug-xmms.sourceforge.net.

How to do it...

  1. libvorbis and libtheora both depend on libogg. The compilation of these libraries is straightforward with the provided makefiles and a standard Android.mk file with the list of source files.

    Note

    Makefiles for libvorbis and libtheora libraries must refer to the include directories of libogg.

  2. libmodplug is an open source tracker music decoder by Olivier Lapicque. We provide a shortened version of his library, with loaders...

Left arrow icon Right arrow icon

Key benefits

  • Tips and tricks for developing and debugging mobile games on your desktop
  • Enhance your applications by writing multithreaded code for audio playback, network access, and asynchronous resource loading
  • Enhance your game development skills by using modern OpenGL ES and develop applications without using an IDE
  • Features two ready-to-run Android games

Description

Android NDK is used for multimedia applications which require direct access to a system's resources. Android NDK is also the key for portability, which in turn provides a reasonably comfortable development and debugging process using familiar tools such as GCC and Clang toolchains. If your wish to build Android games using this amazing framework, then this book is a must-have.This book provides you with a number of clear step-by-step recipes which will help you to start developing mobile games with Android NDK and boost your productivity debugging them on your computer. This book will also provide you with new ways of working as well as some useful tips and tricks that will demonstrably increase your development speed and efficiency.This book will take you through a number of easy-to-follow recipes that will help you to take advantage of the Android NDK as well as some popular C++ libraries. It presents Android application development in C++ and shows you how to create a complete gaming application. You will learn how to write portable multithreaded C++ code, use HTTP networking, play audio files, use OpenGL ES, to render high-quality text, and how to recognize user gestures on multi-touch devices. If you want to leverage your C++ skills in mobile development and add performance to your Android applications, then this is the book for you.

Who is this book for?

If you are a C++ developer who wants to jump into the world of Android game development and who wants to use the power of existing C++ libraries in your existing Android Java applications, then this book is for you. You need to have basic knowledge of C or C++ including pointer manipulation, multithreading, and object-oriented programming concepts as well as some experience developing applications without using an IDE.

What you will learn

  • Port popular C++ libraries to Android
  • Write portable multithreaded code
  • Play audio with OpenAL
  • Implement gesture recognition
  • Render text with FreeType
  • Use OpenGL ES to port and abstract APIs from the game code to develop games on a desktop PC
  • Debug mobile applications on your desktop
  • Access Flickr and Picasa web services from C++
  • Extract resources from APK archives
  • Develop Android applications without an IDE
Estimated delivery fee Deliver to Germany

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 25, 2013
Length: 320 pages
Edition : 1st
Language : English
ISBN-13 : 9781782167785
Languages :

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 Germany

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Publication date : Nov 25, 2013
Length: 320 pages
Edition : 1st
Language : English
ISBN-13 : 9781782167785
Languages :

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 120.97
Android Native Development Kit Cookbook
€41.99
Android NDK Game Development Cookbook
€41.99
Android Security Cookbook
€36.99
Total 120.97 Stars icon
Banner background image

Table of Contents

10 Chapters
1. Establishing a Build Environment Chevron down icon Chevron up icon
2. Porting Common Libraries Chevron down icon Chevron up icon
3. Networking Chevron down icon Chevron up icon
4. Organizing a Virtual Filesystem Chevron down icon Chevron up icon
5. Cross-platform Audio Streaming Chevron down icon Chevron up icon
6. Unifying OpenGL ES 3 and OpenGL 3 Chevron down icon Chevron up icon
7. Cross-platform UI and Input Systems Chevron down icon Chevron up icon
8. Writing a Match-3 Game Chevron down icon Chevron up icon
9. Writing a Picture Puzzle Game Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(5 Ratings)
5 star 60%
4 star 20%
3 star 0%
2 star 0%
1 star 20%
User Jan 04, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is my first book on Android Native Development Kit. I hope you will find it useful and write great games for Android.
Amazon Verified review Amazon
C. Moeller May 01, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If you’d like to try making games on Android using C++, or want to use a C++ library with your current game, this book would be very helpful for you. The last two chapters especially bring it all together, creating two simpler games, just to demonstrate all the basic techniques needed to make any game (A tetris type game, and a picture puzzle that fetches pictures from the internet, and creates a cool little 3d carousel to display them).This book would be most helpful to someone who either has a C++ background, and wants to create Android games, while trying to avoid Java, or for a current Android Java programmer, who needs or wants higher performance for cpu intensive tasks. The target audience isn’t someone new to programming.Don’t expect it to teach you C++, or in depth game programming, but it will teach you how to create a game using C++ on Android (and on desktop, which is much more time efficient to debug on, and can really help you get your games out faster). From there you could extrapolate, and use the techniques to create any kind of game you like.
Amazon Verified review Amazon
Johnny Aug 23, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
good service
Amazon Verified review Amazon
Ralf Apr 25, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
The book is as the title suggests a cookbook for developing games using the Android NDK.While I have only skimmed through the chapters, my initial impression is that it covers thebasic building blocks of game development: toolchain setup, compilation of existing libraries,audio, video, user interaction, and sums it up in two chapters where the authors discuss 2basic games.One criticism I have is that personally I found the Windows-specific code to be off-topic,perhaps it would have been more suitable for an appendix chapter.While the book does not seem to go into as much depth as the "Android NDK Beginner's Guide"it does seem like a nice way to jump into NDK game development. The authors certainlyhave a lot of experience to share with someone new to game development of Android.
Amazon Verified review Amazon
xuechjbj Dec 31, 2013
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
accumulating some libraries which want to integate into android. useless.can i refund it? it is first book i regretted.
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