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
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mastering AndEngine Game Development
Mastering AndEngine Game Development

Mastering AndEngine Game Development: Move beyond basic games and explore the limits of AndEngine

eBook
$35.99 $39.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
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

Mastering AndEngine Game Development

Chapter 1. Setting Up the Project

Before you learn the advanced techniques covered in this book, you first need something to work with—a project that you can use as a foundation to implement every new piece of logic and algorithm. To this end, we will use this first chapter to set up the basis for the AndEngine-based application that we will build throughout the following chapters. We will also cover the basics of Android development, in both Java code and native C/C++, and see how to run and debug the resulting applications.

In this chapter, we will cover these topics:

  • Setting up a basic AndEngine project
  • Creating scenes
  • Running Android applications
  • Debugging

For this chapter, it is assumed that you have at least basic experience with developing Android applications. Experience with either Eclipse/ADT or Android Studio is useful, as is basic knowledge of coordinate systems and OpenGL.

Project requirements

To quickly set up an AndEngine application, we follow the general procedure of pulling the current AndEngine code from the AndEngine GitHub repository and using it as a library project dependency in our project. We will be using the GLES2-AnchorCenter branch for our project because it's the most current development branch at the time of writing this book. An additional advantage of using the AnchorCenter branch is the main change from the GLES2 branch—it uses the same coordinate system as OpenGL, in the sense that the origin is in the bottom-left part of the screen. This will make our lives easier later on, as it will save us the trouble of having to convert between two different coordinate systems.

Another difference between GLES2 and AnchorCenter is that the former positions new objects by default with the corner as the anchor point, while in the latter's case, the default anchor point is at the center of the object. We can change the anchor point wherever needed, of course, but it's good to be aware of this default behavior when we start positioning objects.

When setting up the new Android project, we target the latest available Android SDK version (4.4.2 at the time of writing this book) and use 2.2 as the minimum SDK version, since this is what GLES2 and the related AnchorCenter branch of AndEngine require. The project we are going to create is just a general, blank Android project without any associated themes or input methods. When presented with the choice to enable any of such options in Eclipse/ADT or another wizard, do not choose any of them. What we need is a blank slate, with only a basic Activity class as the starting point.

During the course of this book, we will use Eclipse/ADT as the development environment. In this IDE, we need to get the AndEngine project imported into the workspace so that in the properties of our new project, we can add it as an Android library dependency. Other development environments will have a similar setup, but we'll leave the details of these as an exercise for you.

Application basics

The base for building an AndEngine application is the BaseGameActivity class, which we'll use instead of the standard Activity class. The former provides the base functionality, which we'll need in our application. There's also the SimpleBaseGameActivity class, which exists for compatibility with GLES1. Unlike GLES2's BaseGameActivity, it does not use callbacks—methods called by AndEngine that we define ourselves—and uses a more basic setup and configuration model. As we're not using GLES1, we are not interested in using this class.

The BaseGameActivity class has four functions that we override for our own functionality:

  • onCreateEngineOptions()
  • onCreateResources(OnCreateResourcesCallback, pOnCreateResourcesCallback)
  • onCreateScene(OnCreateSceneCallback, pOnCreateSceneCallback)
  • onPopulateScene(Scene pScene, OnPopulateSceneCallback, pOnPopulateSceneCallback)

The advantage of the GLES2 base class is that through the calling of the callback in each overridden function, you can explicitly proceed to the next function in the list instead of implicitly having all of them called. Other than this, very little changes. In the onCreateEngineOptions() function, we still create a Camera object and assign it together with the parameters for the screen orientation and ratio to an EngineOptions object, which is returned. No callback is called here yet.

The remaining three functions respectively load the resources for the application, create the scene, and populate the said scene. A basic application skeleton thus looks like this:

public class MainActivity extends BaseGameActivity {
  private Scene mScene;
  private static final int mCameraHeight = 480;
  private static final int mCameraWidth = 800;

  @Override
  public EngineOptions onCreateEngineOptions() {
    Camera mCamera = new Camera(0, 0, mCameraWidth, mCameraHeight);
    final EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new RatioResolutionPolicy(
            mCameraWidth, mCameraHeight), mCamera);
    return engineOptions;
  }

  @Override
  public void onCreateResources(
      OnCreateResourcesCallback pOnCreateResourcesCallback)
      throws IOException {
    // Load any resources here
    pOnCreateResourcesCallback.onCreateResourcesFinished();		
  }

  @Override
  public void onCreateScene(OnCreateSceneCallback pOnCreateSceneCallback) 
      throws IOException {
    mScene = new Scene();
    pOnCreateSceneCallback.onCreateSceneFinished(mScene);
}

  @Override
  public void onPopulateScene(Scene pScene,
      OnPopulateSceneCallback pOnPopulateSceneCallback)
      throws IOException {
    // Populate the Scene here
    pOnPopulateSceneCallback.onPopulateSceneFinished();
  }
}

Creating the scene

To finish this basic application, we will be implementing a simple scene that merely creates a single sprite. For this, we will use the Scene object created in the code shown earlier. This object forms the root of the scene tree to which all the objects, such as sprites in the scene, attach. Before we can create the sprite, we need to set up the bitmap logic to load and handle textures. As we know, a sprite is more or less just a bitmap image. To display it, we first fetch the required image from the application's resources. Probably, you have already preloaded these in the onCreateResources() function, a procedure that, in general, is a very good idea for reducing load times later on in the application in order to prevent slowdowns.

An efficient way of using textures with OpenGL ES is to have only a single texture loaded at any given time. Since any given scene is likely to have more than one texture, we have to merge our textures into a single large texture. Here, we have two options:

  • Texture atlas
  • Texture packer

The texture atlas is the traditional approach, whereby you create a single, blank texture and place smaller textures on it. The texture atlas must have dimensions of powers of 2, and is limited in size by the memory buffer of the graphics processor of the device. Generally, sticking to an upper limit of 1,024 for either dimension is advisable.

Creating the scene

The texture packer is a relatively new approach. It uses an external application to create a texture atlas, which is then output together with a XML file that maps the textures on the atlas. The advantages of this method are less code in the resource loading section and a more visual approach to the atlas creation process. The TexturePack APIs are then used within the AndEngine application to load the XML file. It is important to note here that starting with the GLES2-AnchorCenter branch of AndEngine, the TexturePack API extension (AndEngineTexturePackerExtension) is integrated, and thus available by default.

To access the individual textures in the texture atlas, we create texture region instances, which are a mapping of a specific region of the said atlas. Once all is said and done, these texture regions are essentially our textures, as we use them within a scene. After the loading stage of the resources and the creation of the atlas and texture regions, we can pretty much ignore these details and use the texture regions without considering the implementation.

For the sample application that we are developing in this chapter, we will use the former approach of creating the texture atlas in code, as we have only a single sprite to display. Briefly, we first create the atlas:

this.mFaceTexture = new AssetBitmapTexture(this.getTextureManager(), this.getAssets(), "gfx/helloworld.png");
this.mFaceTextureRegion = TextureRegionFactory.extractFromTexture(
                  this.mFaceTexture);

This code loads a PNG file called helloworld.png from the assets folder of the Android application into a texture that we use as the texture atlas. Next, we create a texture region out of it, as we'll need this to actually reference the texture. Then we load the texture atlas into the memory buffer of the video processor:

this.mFaceTexture.load();

Leaving the onCreateResources() function, we move on to onPopulateScene(), in which we basically add sprites to the scene, one sprite in this particular case. After setting the background color of the Scene object to a nice shade of gray using the RGB values in floating-point format (three times 0.8f), we determine the center of the camera's view:

final float centerX = mCameraWidth / 2;
final float centerY = mCameraHeight / 2;

Finally, we create the sprite using the texture region we created before, and add it to the scene:

final Sprite sprite = new Sprite(centerX, centerY, this.mFaceTextureRegion, this.getVertexBufferObjectManager());
pScene.attachChild(sprite);

When we run the application, we see the following appear on the screen:

Creating the scene

That's it! We're now ready to build and launch the application. You should look at the sample project (AndEngineOnTour) for this chapter and try to get it running. We will be building upon it in the coming chapters.

Running Android applications

When it comes to running Android applications, we get to choose between using a real device (phone or tablet) and an emulator Android Virtual Device (AVD) as the target. Both have their advantages and drawbacks. While Android devices offer the complete experience at full speed, their disadvantages include the following:

  • Slower to start. Loading an application onto an AVD is generally faster, decreasing debugging times.
  • Limited access, with the root account unavailable on Android devices unless you enable it in the firmware. Full access to the device's filesystem is disabled, including application data.

AVDs do not have these disadvantages, but they have the following limitations:

  • They are slow: Even when using the Intel Atom images and having Intel's HAXM virtualization add-on installed, any device handily beats an AVD
  • Lack of OpenGL ES support: While OpenGL ES support is experimentally being added, it's still unstable and, of course, so slow that it is unsuitable for any serious application
  • Lack of microphone support: At the time of writing this book, it's not possible to use a system microphone with an AVD
  • No motion sensors: We can only test portrait and landscape modes
  • No light sensor or LED:
  • No compass, GPS, and so on: These can be faked, however, by setting GPS coordinates in the AVD

Beyond these differences, devices and AVDs are quite similar. Which one to use depends largely on your needs. However, any verification and non-simple debugging should, as a rule of thumb, always be done on a device. While an AVD approaches the functionality of a real device, it is still so different and limited that its results should not be relied upon as real device behavior.

That said, both can be used in an identical fashion with ADB, or the Android Debug Bridge. ADB is a client-server program that consists of a server running on the Android device or AVD, and a client running on the system accessing it. The ADB client can either be run as a command-line tool or be used from within an IDE such as Eclipse for purposes such as uploading applications to the Android device or AVD, uploading and downloading files, and viewing system and application logs in real time.

Especially the ability to view logs in real time for any running application is very helpful to us when we try to debug an application, as we can output any debug messages to the log.

Debugging

As mentioned before, the easiest way to debug an Android application running on either a device or an AVD instance is to output debug messages to the log output (LogCat) so that they can be read via ADB. The API in Android for this purpose is the Log class. It uses various categories to distinguish between the importance of the messages, ranging from verbose to error.

For example, to output a debug string to LogCat, we use the following code in Java:

Log.d("AndEngineOnTour", "This is debug output.");

The first part is the tag for the application or class that we output from, and the second part is the actual message. The tag is used in filtering to, for example, only see the output from our own application. We can also use a filter on the log category.

When writing native code in C/C++ using the Native Development Kit (NDK), we may also want to use LogCat. Here, we just have to include one header and use a slightly modified function call, like this:

#include <android/log.h>
__android_log_print(ANDROID_LOG_DEBUG, "AndEngineOnTour", "This is debug output");

Finally, we can use a debugger. For Java, this is easy, with IDEs such as Eclipse/ADT offering ready-to-use debugging functionality with full integration. This allows easy debugging, adding of breakpoints, and the like. For native code, this is slightly more complex, as we have to resort to using gdb.

The gdb tool is part of the GNU Compiler Collection (GCC), which also contains the compiler used to compile the native code for an Android application. In this case, we want to use its gdb debugger to attach to the native code process on the Android device or AVD so that we can set breakpoints and otherwise monitor the execution.

For gdb to be able to work with such a process, we need to compile the native code with debug symbols enabled, and modify the Android manifest. This involves the following steps:

  • AndroidManifest.xml needs the android:debuggable="true" setting in the <application> tag
  • The Application.mk file needs APP_OPTIM := debug added
  • Finally, we use NDK_DEBUG=1 in the command that we use to build the native code

The NDK contains a script called ndk-gdb that automates the process of setting up gdb, but the essence of what is involved is that we need to push the gdbserver instance onto the device or AVD that we intend to debug on, and connect to this server remotely with gdb. The details of this procedure are beyond the scope of this book, however.

Our goals

By the end of this book, you will have gained the advanced skills needed to make the most complex AndEngine-based games. These skills will also be useful for other game engines, whether Android-based or not. We will have built a full game application that demonstrates the full possibilities of using AndEngine as the base platform.

These possibilities include advanced graphics options, multiplayer, 3D effects, scene transitions, and user interfaces. With the knowledge gained, you should be able to create your own games with ease, or cooperate with others to make even larger and more complex games.

Summary

In this chapter, we went over the basics of Android development, as well as the setting up of a basic AndEngine application. We covered the debugging techniques for both Java-based and native code, and explored the advantages and disadvantages of hardware Android devices and emulated devices. Finally, we looked ahead to what our goals for the coming chapters are, including the development of an application that demonstrates the lessons of these chapters.

In the next chapter, we will build on this basic framework as we extend it to support three-dimensional objects (meshes) in our project.

Left arrow icon Right arrow icon

Key benefits

  • • Extend the basic AndEngine features without modifying any of AndEngine's code
  • • Understand advanced technologies and gain the skills to create the ultimate games in AndEngine
  • • Theory supported with practical examples to stimulate your imagination and creativity

Description

AndEngine is a popular and easy-to-use game framework, best suited for Android game development. After learning the basics of creating an Android game using AndEngine it's time you move beyond the basics to explore further. For this you need to understand the theory behind many of the technologies AndEngine uses. This book aims to provide all the skills and tools you need to learn more about Android game development using AndEngine. With this book you will get a quick overview of the basics of AndEngine and Android application development. From there, you will learn how to use 3D models in a 2D scene, render a visual representation of a scene's objects, and create interaction between these objects. You will explore frame-based animations and learn to use skeletal animations. As the book progresses, you will be guided through exploring all the relevant aspects of rendering graphics with OpenGL ES, generating audio using OpenSL ES and OpenAL, making the best use of Android's network API, implementing anti-aliasing algorithms, shaders, dynamic lighting and much more. With all this, you will be ready to enhance the look and feel of your game with its user interface, sound effects and background music. After an in-depth study of 2D and 3D worlds and multi-player implementations, you will be a master in AndEngine and Android game development.

Who is this book for?

This book is aimed at developers who have gone through all the basic AndEngine tutorials and books, and are looking for something more. It's also very suitable for developers with knowledge of other game engines who are looking to develop with AndEngine. Knowledge of Java, C++ and Android development are a prerequisite for getting the most out of this book.

What you will learn

  • • Extend AndEngine to use and render 3D models
  • • Integrate and use various physics engines with AndEngine
  • • Advanced animations and their implementation in AndEngine
  • • Lighting theory and its application for both 2D and 3D objects
  • • Using skeletal animation with AndEngine
  • • Use GLSL shaders with AndEngine for effects and anti-aliasing
  • • Add sounds and effects to AndEngine using both basic and 3D audio libraries
  • • Efficient network implementations with AndEngine for multi-players
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 28, 2015
Length: 278 pages
Edition : 1st
Language : English
ISBN-13 : 9781783981144
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
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 United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Sep 28, 2015
Length: 278 pages
Edition : 1st
Language : English
ISBN-13 : 9781783981144
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 $ 141.97
Mastering AndEngine Game Development
$48.99
Mastering Android Application Development
$48.99
Python Game Programming By Example
$43.99
Total $ 141.97 Stars icon

Table of Contents

15 Chapters
1. Setting Up the Project Chevron down icon Chevron up icon
2. Replacing 2D Sprites with 3D Models Chevron down icon Chevron up icon
3. Physics Engine Integration Chevron down icon Chevron up icon
4. Frame-based Animation Sequences Chevron down icon Chevron up icon
5. Skeletal Animations Chevron down icon Chevron up icon
6. Creating 3D Effects in 2D Chevron down icon Chevron up icon
7. Static Lighting Chevron down icon Chevron up icon
8. Dynamic Lighting Chevron down icon Chevron up icon
9. User Interfaces Chevron down icon Chevron up icon
10. Shading, Aliasing, and Resolutions Chevron down icon Chevron up icon
11. Adding Sounds and Effects Chevron down icon Chevron up icon
12. Building Worlds for Our Project Chevron down icon Chevron up icon
13. Networking and Latency Chevron down icon Chevron up icon
14. Adding Custom Functionality 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 Half star icon 4.8
(4 Ratings)
5 star 75%
4 star 25%
3 star 0%
2 star 0%
1 star 0%
ruben Dec 02, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I really recommend this book it is explained with examples I have read many books but this one is more complete.This book is practical .This book aims to provide all the skills and tools you need to learn more about Android game development using AndEngine.With this book you will get a quick overview of the basics of AndEngine and Android application development. From there, you will learn how to use 3D models in a 2D scene, render a visual representation of a scene's objects, and create interaction between these objects. You will explore frame-based animations and learn to use skeletal animations.
Amazon Verified review Amazon
Sergio Nov 16, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I'm one of the technical reviewers of this book. I have to say that AndEngine is one of the best Android game engines, and it's open source!. But there is no official documentation about it, so this book is the "missing manual" you need to learn how AndEngine works, and create successful Android games. This book covers from the most basic features, like setting up your project, to the more advanced like using native code. This book not only covers all AndEngine features, but adds more features, like using 3D models in AndEngine. So if you develop (or you will) games for Android, this book is for you.
Amazon Verified review Amazon
SuJo Dec 02, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book isn't for the absolute beginner, but with some prior reading you'll be able to easily digest this book. I gave the book 5 stars because it covered all the basics that I expect in a Game Programming Book, and having read quite a few of these tech heavy manuals (as well as following along) they should all cover math, theory, game mechanics, design, a solid game loop, and the use of shaders.The book covered skeletal animation with AndEngine which was really great and an added bonus for making your game go from indie to studio quality. The networking implementation was solid, and I always design my network communications prior to writing code so I can get all the logging features sorted out using UML diagrams.I highly recommend this title to anyone who is serious about creating games using AndEngine for Android Game Development, but most important a lot of the features are parallel towards PC/iOS game programming which makes this book more viable as a tool. While you'll have to utilize what you've learned here about design and organization to transfer to a different platform, it's highly possible because this book was so well covered.
Amazon Verified review Amazon
Winston Dec 01, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I agree with the previous reviewer. AndEngine is a great game engine to develop games with. It is important to note that this book is not for the C/Java newbie and anyone who does not know there way around the Android SDK. I particularly enjoyed the chapter on OpenGL and OpenGL ES.
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 digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

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
Modal Close icon
Modal Close icon