Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
LibGDX Game Development By Example
LibGDX Game Development By Example

LibGDX Game Development By Example: Learn how to create your very own game using the libGDX cross-platform framework

eBook
€20.98 €29.99
Paperback
€36.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
Table of content icon View table of contents Preview book icon Preview Book

LibGDX Game Development By Example

Chapter 1. Getting to Know LibGDX

Creating games is fun, and that is why I like to do it. The process of having an idea for a game to actually delivering it has changed over the years. Back in the 1980s, it was quite common that the top games around were created by either a single person or a very small team. However, anyone who is lucky enough (in my opinion) to see games grow from being quite a simplistic affair to the complex beast that the now AAA titles are, must have also seen the resources needed for these grow with them. The advent of mobile gaming reduced the barrier for entry; once again, the smaller teams could produce a game that could be a worldwide hit! Now, there are games of all genres and complexities available across major gaming platforms.

Due to this explosion in the number of games being made, new general-purpose game-making tools appeared in the community. Previously, the in-house teams built and maintained very specific game engines for their games; however, this would have led to a lot of reinventing the wheel. I hate to think how much time I would have lost if for each of my games, I had to start from scratch.

Now, instead of worrying about how to display a 2D image on the screen, I can focus on creating that fun player experience I have in my head. My tool of choice? LibGDX.

Introducing LibGDX

Before I dive into what LibGDX is, here is how LibGDX describes itself. From the LibGDX wiki—https://github.com/libgdx/libgdx/wiki/Introduction:

LibGDX is a cross-platform game and visualization development framework.

So what does that actually mean? What can LibGDX do for us game-makers that allows us to focus purely on the gameplay?

To begin with, LibGDX is Java-based. This means you can reuse a lot, and I mean a lot, of tools that already exist in the Java world.

I can imagine a few of you right now must be thinking, "But Java? For a game? I thought Java is supposed to be slow". To a certain extent, this can be true; after all, Java is still an interpreted language that runs in a virtual machine. However, to combat the need for the best possible performance, LibGDX takes advantage of the Java Native Interface (JNI) to implement native platform code and negate the performance disadvantage. One of the beauties of LibGDX is that it allows you to go as low-level as you would like. Direct access to filesystems, input devices, audio devices, and OpenGL (via OpenGL ES 2.0/3.0) is provided. However, the added edge LibGDX gives is that with the APIs that are built on top of these low-level facilities, displaying an image on the screen takes now a days only a few lines of code.

Note

A full list of the available features for LibGDX can be found here: http://libgdx.badlogicgames.com/features.html

I am happy to wait here while you go and check it out.

Impressive list of features, no?

So, how cross-platform is this gaming platform? This is probably what you are thinking now. Well, as mentioned before, games are being delivered on many different platforms, be it consoles, PCs, or mobiles.

LibGDX currently supports the following platforms:

  • Windows
  • Linux
  • Mac OS X
  • Android
  • BlackBerry
  • iOS
  • HTML/WebGL

That is a pretty comprehensive list. Being able to write your game once and have it delivered to all the preceding platforms is pretty powerful.

At this point, I would like to mention that LibGDX is completely free and open source. You can go to https://github.com/libGDX/libGDX and check out all the code in all its glory. If the code does something and you would like to understand how, it is all possible; or, if you find a bug, you can make a fix and offer it back to the community.

Along with the source code, there are plenty of tests and demos showcasing what LibGDX can do, and more importantly, how to do it. Check out the wiki for more information:

"Who else uses LibGDX?" is quite a common query that comes up during a LibGDX discussion. Well it turns out just about everyone has used it. Google released a game called "Ingress" (https://play.google.com/store/apps/details?id=com.nianticproject.ingress&hl=en) on the play store in 2013, which uses LibGDX. Even Intel (https://software.intel.com/en-us/articles/getting-started-with-libgdx-a-cross-platform-game-development-framework) has shown an interest in LibGDX. Finally, I would like to end this section with another quote from the LibGDX website:

LibGDX aims to be a framework rather than an engine, acknowledging that there is no one-size-fits-all solution. Instead we give you powerful abstractions that let you chose how you want to write your game or application.

LibGDX wiki—https://github.com/libgdx/libgdx/wiki/Introduction

This means that you can use the available tools if you want to; if not, you can dive deeper into the framework and create your own!

Setting up LibGDX

We know by now that LibGDX is this awesome tool for creating games across many platforms with the ability to iterate on our code at superfast speeds. But how do we start using it?

Thankfully, some helpful people have made the setup process quite easy. However, before we get to that part, we need to ensure that we have the prerequisites installed, which are as follows:

  • Java Development Kit 7+ (at the time of writing, version 8 is available)
  • Android SDK

Not that big a list! Follow the given steps:

  1. First things first. Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html.
  2. Download and install the latest JDK if you haven't already done so. Oracle developers are wonderful people and have provided a useful installation guide, which you can refer to if you are unsure on how to install the JDK, at

    http://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html.

  3. Once you have installed the JDK, open up the command line and run the following command:
    java -version
    

    If it is installed correctly, you should get an output similar to this:

    Setting up LibGDX
  4. If you generate an error while doing this, consult the Oracle installation documentation and try again.
  5. One final touch would be to ensure that we have JAVA_HOME configured. On the command line, perform the following:
    • For Windows, set JAVA_HOME = C:\Path\ToJDK\
    • For Linux and Mac OSX, export JAVA_HOME = /Path/ToJDK/
  6. Next, on to the Android SDK.

At the time of writing, Android Studio has just been released. Android Studio is an IDE offered by Google that is built upon JetBrains IntelliJ IDEA Java IDE. If you feel comfortable using Android Studio as your IDE, and as a developer who has used IntelliJ for the last 5 years, I suggest that you at least give it a go. You can download Android Studio + Android SDK in a bundle from here:

http://developer.android.com/sdk/index.html

Alternatively, if you plan to use a different IDE (Eclipse or NetBeans, for example) you can just install the tools from the following URL:

http://developer.android.com/sdk/index.html#Other

You can find the installation instructions here:

https://developer.android.com/sdk/installing/index.html?pkg=tools

However, I would like to point out that the official IDE for Android is now Android Studio and no longer Eclipse with ADT.

For the sake of simplicity, we will only focus on making games for desktops for the greater part of this book. We will look at exporting to Android and iOS later on.

Once the Android SDK is installed, it would be well worth running the SDK manager application; so, finalize the set up.

If you opt to use Android Studio, you can access this from the SDK Manager icon in the toolbar. Alternatively, you can also access it as follows:

  • On Windows: Double-click on the SDK's Manager.exe file at the root of the Android SDK directory
  • On Mac/Linux: Open a terminal and navigate to the tools/ directory in the location where the Android SDK is installed, then execute Android SDK.

The following screen might appear:

Setting up LibGDX

As a minimum configuration, select:

  • Android SDK Tools
  • Android SDK Platform-tools
  • Android SDK Build-tools (latest available version)
  • Latest version of SDK Platform

Let them download and install the selected configuration. Then that's it!

Well, not really. We just need to set the ANDROID_HOME environment variable. To do this, we can open up a command line and run the following command:

  • On Windows: Set ANDROID_HOME=C:/Path/To/Your/Android/Sdk
  • On Linux and Mac OS X: Export ANDROID_HOME=/Path/To/Your/Android/Sdk

Phew! With that done, we can now move on to the best part—creating our first ever LibGDX game!

Creating a project

Follow the given steps to create your own project:

  1. As mentioned earlier, LibGDX comes with a really useful project setup tool. Download the application from here:

    http://libgdx.badlogicgames.com/download.html

    At the time of writing, it is the big red "Download Setup App" button in the middle of your screen.

  2. Once downloaded, open the command line and navigate to the location of the application. You will notice that it is a JAR file type. This means we need to use Java to run it.
    Creating a project
  3. Running this will open the setup UI:
    Creating a project

Before we hit the Generate button, let's just take a look at what we are creating here:

  • Name: This is the name of our game.
  • Package: This is the Java package our game code will be developed in.
  • Game class: This parameter sets the name of our game class, where the magic happens!
  • Destination: This is the project's directory. You can change this to any location of your choice.
  • Android SDK: This is the location of the SDK. If this isn't set correctly, we can change it here. Going forward, it might be worth setting the ANDROID_HOME environment variable.

Next is the version of LibGDX we want to use. At time of writing, the version is 1.5.4.

Now, let's move on to the subprojects. As we are only interested in desktops at the moment, let's deselect the others.

Finally, we come to extensions. Feel free to uncheck any that are checked. We won't be needing any of them at this point in time. For more information on available extensions, check out the LibGDX wiki (https://github.com/libgdx/libgdx/wiki).

Once all is set, let's hit the Generate button!

There is a little window at the bottom of the UI that will now spring to life. Here, it will show you the setup progress as it downloads the necessary setup files.

Once complete, open that command line, navigate to the directory, and run your preferred tree command (in Windows, it is just "tree").

Creating a project

Hopefully, you will have the same directory layout as the previous image shows.

The astute among you will now ask, "What is this Gradle?" and quite rightly so. I haven't mentioned it yet, although it appears twice in our projects directory.

What is Gradle?

Well, Gradle is a very excellent build tool and LibGDX leverages its abilities to look after the dependencies, build process, and IDE integration. This is especially useful if you are going to be working in a team with a shared code base. Even if you are not, the dependency management aspect is worth it alone.

Anyone who isn't familiar with dependency management may well be used to downloading Java JARs manually and placing them in a libs folder, but they might run into problems later when the JAR they just downloaded needs another JAR, and so on. The dependency management will take care of this for you and even better is that the LibGDX setup application takes care of this for you by already describing the dependencies that you need to run!

Within LibGDX, there is something called the Gradle Wrapper. This is essentially the Gradle application embedded into the project. This allows portability of our project, as now if we want someone else to run it, they can.

I guess this leads us to the question, how do we use Gradle to run our project? In the LibGDX wiki (https://github.com/libgdx/libgdx/wiki/Gradle-on-the-Commandline), you will find a comprehensive list of commands that can be used while developing your game.

However, for now, we will only cover the desktop project.

What you may not have noticed is that the setup application actually generates a very simple "Hello World" game for us. So, we have something we can run from the command line right away!

Let's go for it!

On our command line, let's run the following:

  • On Windows: gradlew desktop:run
  • On Linux and Mac OS X: ./gradlew desktop:run

    The following screen will appear once you execute the preceding command:

    What is Gradle?

You will get an output similar to the preceding screenshot. Don't worry if it suddenly wants to start downloading the dependencies. This is our dependency management in action! All those JARs and native binaries are being downloaded and put on to classpaths. But, we don't care. We are here to create games!

So, after the command prompt has finished downloading the files, it should then launch the "Hello World" game.

What is Gradle?

Awesome! You have just launched your very first LibGDX game!

Although, before we get too excited, you will notice that not much actually happens here. It is just a red screen with the Bad Logic Games logo.

I think now is the time to look at the code!

Importing a project

So far, we have launched the "Hello World" game via the command line, and haven't seen a single line of code so far. Let's change that.

To do this, I will use IntelliJ IDEA. If you are using Android Studio, the screenshots will look familiar. If you are using Eclipse, I am sure you will be able to see the common concepts.

To begin with, we need to generate the appropriate IDE project files. Again, this is using Gradle to do the heavy lifting for us.

Once again, on the command line, run the following (pick the one that applies):

  • On Windows: gradlew idea or gradlew eclipse
  • On Linux and Mac OS X: ./gradlew idea or ./gradlew eclipse

Now, Gradle will have generated some project files. Open your IDE of choice and open the project.

Once the project is open, have a poke around and look at some of the files. I think our first port of call should be the build.gradle file in the root of the project. Here, you will see that the layout of our project is defined and the dependencies we require are on display.

It is a good time to mention that going forward, there will be new releases of LibGDX, and to update our project to the latest version, all we need to do is update the following property:

gdxVersion = '1.6.4'

Now, run your game and Gradle will kick in and download everything for you!

Next, we should look for our game class, remember the one we specified in the setup application—MyGdxGame.java? Find it, open it, and be in awe of how simple it is to display that red screen and Bad Logic Games logo. In fact, I am going to paste the code here for you to see how simple it is:

public class MyGdxGame extends ApplicationAdapter {
  SpriteBatch batch;
  Texture img;
  @Override
  public void create () {
    batch = new SpriteBatch();
    img = new Texture("badlogic.jpg");
  }

  @Override
  public void render () {
    Gdx.gl.glClearColor(1, 0, 0, 1);
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
    batch.begin();
    batch.draw(img, 0, 0);
    batch.end();
  }
}

We will cover what all this means in the next chapter, but, essentially, we can see that when the create() method is called, it sets up a SpriteBatch batch and creates a texture from a given JPEG file. Then, on the render() method, this is called on every iteration of the game loop; it covers the screen with the color red, then it draws the texture at the (0, 0) coordinate location.

Finally, we will look at the DesktopLauncher class, which is responsible for running the game in the desktop environment. Let's take a look at the following code snippet:

public class DesktopLauncher {
  public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    new LwjglApplication(new MyGdxGame(), config);
  }
}

The preceding code shows how simple it is. We have a configuration object that will define how our desktop application runs, setting things like screen resolution and framerate, amongst others. In fact, this is an excellent time to utilize the open source aspect of LibGDX. In your IDE, click through to the LwjglApplicationConfiguration class. You will see all the properties that can be tweaked and notes on what they mean.

The instance of the LwjglApplicationConfiguration class is then passed to the constructor of another class LwjglApplication, along with an instance of our MyGdxGame class.

Finally, those who have worked with Java a lot in the past will recognize that it is wrapped in a main method—a traditional entry point for a Java application.

That is all that is needed to create and launch a desktop-only LibGDX game.

Tip

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Summary

In this chapter, we looked at what LibGDX is about and how to go about creating a standard project, running it from the command line and importing it into your preferred IDE ready for development.

Coming up in the next chapter, we will look at making our very first LibGDX-based game! We will take a very well known old mobile game and recreate it in LibGDX. We will also introduce the game cycle concept along with rendering our own textures to the screen, move them, and access input detection.

Left arrow icon Right arrow icon

Description

LibGDX is a cross-platform game development framework in Java that makes game programming easier and fun to do. It currently supports Windows, Linux, Mac OS X, Android, and HTML5. With a vast feature set on offer, there isn't a game that can’t be made using libGDX. It allows you to write your code once and deploy it to multiple platforms without modification. With cross-platform delivery at its heart, a game can be made to target the major markets quickly and cost effectively. This book starts with a simple game through which the game update cycle is explained, including loading textures onto your screen, moving them around, and responding to input. From there you’ll move on to more advanced concepts such as creating a formal game structure with a menu screen, adding a game screen and loading screen, sprite sheets, and animations. You’ll explore how to introduce a font to optimize text, and with the help of a game that you’ll create, you’ll familiarise yourself with the 2D tile map API to create worlds that scroll as the characters move. In the final sample game of the book, you’ll implement a basic version of an Angry Birds clone, which will allow you to use the physic library box2D that libGDX provides access to. An overview of exporting games to different platforms is then provided. Finally, you will discover how to integrate third-party services into games and take a sneak peak at the Social Media API to get a basic understanding of how it fits into the libGDX ecosystem.

Who is this book for?

This book is intended for those who wish to learn the concepts of game development using libGDX. An understanding of Java and other programming languages would definitely be helpful, although it is not a must.
Estimated delivery fee Deliver to Sweden

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 26, 2015
Length: 280 pages
Edition : 1st
Language : English
ISBN-13 : 9781785281440
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
Estimated delivery fee Deliver to Sweden

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Publication date : Aug 26, 2015
Length: 280 pages
Edition : 1st
Language : English
ISBN-13 : 9781785281440
Languages :
Tools :

Packt Subscriptions

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

Frequently bought together


Stars icon
Total 120.97
Learning LibGDX Game Development- Second Edition
€41.99
Mastering LibGDX Game Development
€41.99
LibGDX Game Development By Example
€36.99
Total 120.97 Stars icon

Table of Contents

12 Chapters
1. Getting to Know LibGDX Chevron down icon Chevron up icon
2. Let's Get These Snakes Out of This Book! Chevron down icon Chevron up icon
3. Making That Snake Slick Chevron down icon Chevron up icon
4. What the Flap Is the Hype About? Chevron down icon Chevron up icon
5. Making Your Bird More Flightworthy Chevron down icon Chevron up icon
6. Onto the Next Platform...Game Chevron down icon Chevron up icon
7. Extending the Platform Chevron down icon Chevron up icon
8. Why Are All the Birds Angry? Chevron down icon Chevron up icon
9. Even Angrier Birds! Chevron down icon Chevron up icon
10. Exporting Our Games to the Platforms Chevron down icon Chevron up icon
11. Third-party Services Chevron down icon Chevron up icon
Index 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
(15 Ratings)
5 star 53.3%
4 star 6.7%
3 star 26.7%
2 star 13.3%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




R. Rose Sep 10, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have been looking for a book on Libgdx for a while and when I saw the author mention this on twitter I thought I would give it a go. Libgdx is a cross platform game engine, which is really rather good. The book starts with an example of building a simple snake game, illustrating the mechanics of the game and how to utilise Libgdx. Personally I would have preferred a more basic version of snake, however this is not to the detriment of the book.The second example game, is what make the book for me. It is another version of flappy bird (flappee bee) and again the author gets into the mechanics of the game exceedingly well. This section is a step up in challenge from the previous snake game, however it is paced at the right level. I personally prefer the incremental approach which allows you to build your skills whilst gaining valuable feedback on your code.The final game is a platformer and again building upon the information previously attained, an incremental body of knowledge is used to illuminate a fascinating process of building a working game.Finally I must commend the author on the content, the book is very easy to read (a couple of typos) and I really enjoyed the examples.
Amazon Verified review Amazon
Michelle and Tim Sep 11, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
LibGDX has quickly become the darling of the cross-platform game development world for those ideas that need a bit more power than HTML5 and mobile wrappers can provide. The issue with most books I have found is not actually in the books, but in LibGDX itself. It has been moving and evolving so fast that many of the books on the market today are already outdated. They either use the old project setup method, which is much more difficult and not recommended or the text is so out of date the instructions are worthless.But with word in the LibGDX community that the codebase is stabilizing, this new book fits the bill very well. Going through the initial setup, the pictures and instructions matched-up perfectly, and hopefully will for a long time now that the work flow is more mature. I had no problem setting up my environment at all following this book, and I was also happy to see the author using Jetbrains IDEs (although you can still use Eclipse, and the author describes how).One of the main things I enjoyed about this book is the multi-game style. Most game dev books are in one of two camps: build one larger game through the whole book, or several smaller games. I tend to prefer the latter, since you get to see more varied solutions to a wide variety of problems. It also allows the author to mold each game around the topic being discussed. The only downside is that you have a bit of boilerplate setup for each game before you can tackle the star topic, but the author does re-use code from earlier chapters, and the code is of course available for download if you don't want to keep going through the setup each time.An important distinction that potential readers would probably want to know up-front is that most of the book assumes deployment to desktop platforms. There is a nice treatment near the end that discusses porting to mobile devices, so you aren't left out in the cold, but it will take a bit of self-guided research to completely convert all the games in the book to mobile format (mostly centering around touch input and mobile design itself). Since most developers are likely coming to LibGDX to learn mobile development, that is kind of surprising, but I did not feel the need to remove a star since this book will still get you 95% of the way there. Learning the core of LibGDX is the largest hurdle, and this book fits that bill nicely.In conclusion, I highly recommend this book for learning the basics of LibGDX. It is a fairly short, easy read that still tackles a ton of topics. You may still need a bit of outside research if your aim is mobile game development, but you will have the foundation to do that. Plus, every other book on LibGDX is woefully outdated save for Packt's other book on the topic, "Learning LibGDX Game Development, 2nd Edition". I would still rather choose this book, though, because it is a faster, easier read that will get you at your keyboard working on your own games faster. However, the true scholars among us may want to read this book cover-to-cover first and then grab Learning LibGDX 2nd Ed and pick through some of the chapters on more advanced topics and cross-platform mobile development. You would really be prepared for anything following that path!
Amazon Verified review Amazon
Dan Sep 24, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is an excellent way to learn how to build your own games. The fact that the games can be exported to most platforms is what makes LibGDX so good.The book gets straight intoteaching you how to make games through a few great examples; this make it easy for you to then move on and create your own concepts.if you're looking to learn how to build your own games, this is the book to go for. Both beginners and novice developers should find this book useful.
Amazon Verified review Amazon
Raja Biswas Jan 13, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Best LibGDX game development book. This is the only book that starts from beginning and show you everything that you need to do to build fully functional games. This book shows how to build Complete games like Snake, Flappy bird, Platformer, Angry Birds and more. The step by step approach of the writer is very easy to follow. Loved it. :)
Amazon Verified review Amazon
iPaul Dec 14, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good intro book to LibGDX, starts with a simple game (Snake) example and expands this in the next chapters.
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