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
Free Learning
Arrow right icon
Cocos2d-x cookbook
Cocos2d-x cookbook

Cocos2d-x cookbook: Over 50 hands-on recipes to help you efficiently administer and maintain your games with Cocos2d-x

Arrow left icon
Profile Icon Akihiro Matsuura
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6 (5 Ratings)
Paperback Nov 2015 254 pages 1st Edition
eBook
€20.98 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Akihiro Matsuura
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6 (5 Ratings)
Paperback Nov 2015 254 pages 1st Edition
eBook
€20.98 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€20.98 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Cocos2d-x cookbook

Chapter 2. Creating Sprites

In this chapter we're going to create sprites, animations, and actions. The following topics will be covered in this chapter:

  • Creating sprites
  • Getting the sprite's position and size
  • Manipulating sprites
  • Creating animations
  • Creating actions
  • Controlling actions
  • Calling functions with actions
  • Easing actions
  • Using a texture atlas
  • Using a batch node
  • Using 3D models
  • Detecting collisions
  • Drawing a shape

Introduction

Sprites are a 2D image. We can animate and transform them by changing their properties. Sprites are basically, items and your game is not complete without them. Sprites are not only displayed, but also transformed or moved. In this chapter, you will learn how to create sprites using 3D models in Cocos2d-x, and then, we will go through the advantages of sprites.

Creating sprites

Sprites are the most important things in games. They are images that are displayed on the screen. In this recipe, you will learn how to create a sprite and display it.

Getting ready

You can add the image that you made in the previous chapter into your project, by performing the following steps:

  1. Copy the image into the Resource folder MyGame/Resources/res.
  2. Open your project in Xcode.
  3. Go to Product | Clean from the Xcode menu.

You have to clean and build when you add new images into the resource folder. If you did not clean after adding new images, then Xcode will not recognize them. Finally, after you add the run_01.png to your project, your project will be seen looking like the following screenshot:

Getting ready

How to do it...

We begin with modifying the HelloWorld::init method in the following code:

bool HelloWorld::init()
{
    if ( !Layer::init() )
    {
        return false;
    }
    Size size = Director::getInstance()->getWinSize();
    auto sprite = Sprite::create("res/run_01...

Getting the sprite's position and size

There is a certain size and position of the sprite. In this recipe, we explain how to view the size and position of the sprite.

How to do it...

To get the sprite position, use the following code:

Vec2 point = sprite->getPosition();
float x = point.x;
float y = point.y;

To get the sprite size, use the following code:

Size size = sprite->getContentSize();
float width = size.width;
float height = size.height;

How it works...

By default, the sprite position is (0,0). You can change the sprite position using the setPosition method and get it using the getPosition method. You can get the sprite size using the getContentSize method. However, you cannot change the sprite size by the setContentSize method. The contentsize is a constant value. If you want to change the sprite size, you have to change the scale of the sprite. You will learn about the scale in the next recipe.

There's more...

Setting anchor points

Anchor point is a point that you set...

Manipulating sprites

A Sprite is a 2D image that can be animated or transformed by changing its properties, including its rotation, position, scale, color, and so on. After creating a sprite you can obtain access to the variety of properties it has, which can be manipulated.

How to do it...

Rotate

You can change the sprite's rotation to positive or negative degrees.

sprite->setRotation(30.0f);

You can get the rotation value using getRotation method.

float rotation = sprite->getRotation();

The positive value rotates it clockwise, and the negative value rotates it counter clockwise. The default value is zero. The preceding code rotates the sprite 30 degrees clockwise, as shown in the following screenshot:

Rotate

Scale

You can change the sprite's scale. The default value is 1.0f, the original size. The following code will scale to half size.

sprite->setScale(0.5f);

You can also change the width and height separately. The following code will scale to half the width only.

sprite->setScaleX...

Creating animations

When the characters in a game start to move, the game will come alive. There are many ways to make animated characters. In this recipe, we will animate a character by using multiple images.

Getting ready

You can create an animation from a series of the following image files:

Getting ready

You need to add the running girl's animation image files to your project and clean your project.

Tip

Please check the recipe Creating sprites, which is the first recipe in this chapter, on how to add images to your project.

How to do it...

You can create an animation using a series of images. The following code creates the running girl's animation.

auto animation = Animation::create();
for (int i=1; i<=8; i++) {  // from run_01.png to run_08.png
    std::string name = StringUtils::format("res/run_%02d.png", i);
    animation->addSpriteFrameWithFile(name.c_str());
}
animation->setDelayPerUnit(0.1f);
animation->setRestoreOriginalFrame(true);
animation->setLoops(10);
auto...

Creating actions

Cocos2d-x has a lot of actions, for example, move, jump, rotate, and so on. We often use these actions in our games. This is similar to an animation, when the characters in a game start their action, the game will come alive. In this recipe you will learn how to use a lot of actions.

How to do it...

Actions are very important effects in a game. Cocos2d-x allows you to use various actions.

Move

To move a sprite by a specified point over two seconds, you can use the following command:

auto move = MoveBy::create(2.0f, Vec2(100, 100));
sprite->runAction(move);

To move a sprite to a specified point over two seconds, you can use the following command:

auto move = MoveTo::create(2.0f, Vec2(100, 100));
sprite->runAction(move);

Scale

To uniformly scale a sprite by 3x over two seconds, use the following command:

auto scale = ScaleBy::create(2.0f, 3.0f);
sprite->runAction(scale);

To scale the X axis by 5x, and Y axis by 3x over two seconds, use the following command:

auto scale = ScaleBy...

Introduction


Sprites are a 2D image. We can animate and transform them by changing their properties. Sprites are basically, items and your game is not complete without them. Sprites are not only displayed, but also transformed or moved. In this chapter, you will learn how to create sprites using 3D models in Cocos2d-x, and then, we will go through the advantages of sprites.

Creating sprites


Sprites are the most important things in games. They are images that are displayed on the screen. In this recipe, you will learn how to create a sprite and display it.

Getting ready

You can add the image that you made in the previous chapter into your project, by performing the following steps:

  1. Copy the image into the Resource folder MyGame/Resources/res.

  2. Open your project in Xcode.

  3. Go to Product | Clean from the Xcode menu.

You have to clean and build when you add new images into the resource folder. If you did not clean after adding new images, then Xcode will not recognize them. Finally, after you add the run_01.png to your project, your project will be seen looking like the following screenshot:

How to do it...

We begin with modifying the HelloWorld::init method in the following code:

bool HelloWorld::init()
{
    if ( !Layer::init() )
    {
        return false;
    }
    Size size = Director::getInstance()->getWinSize();
    auto sprite = Sprite::create("res/run_01.png"...

Getting the sprite's position and size


There is a certain size and position of the sprite. In this recipe, we explain how to view the size and position of the sprite.

How to do it...

To get the sprite position, use the following code:

Vec2 point = sprite->getPosition();
float x = point.x;
float y = point.y;

To get the sprite size, use the following code:

Size size = sprite->getContentSize();
float width = size.width;
float height = size.height;

How it works...

By default, the sprite position is (0,0). You can change the sprite position using the setPosition method and get it using the getPosition method. You can get the sprite size using the getContentSize method. However, you cannot change the sprite size by the setContentSize method. The contentsize is a constant value. If you want to change the sprite size, you have to change the scale of the sprite. You will learn about the scale in the next recipe.

There's more...

Setting anchor points

Anchor point is a point that you set as a way...

Manipulating sprites


A Sprite is a 2D image that can be animated or transformed by changing its properties, including its rotation, position, scale, color, and so on. After creating a sprite you can obtain access to the variety of properties it has, which can be manipulated.

How to do it...

Rotate

You can change the sprite's rotation to positive or negative degrees.

sprite->setRotation(30.0f);

You can get the rotation value using getRotation method.

float rotation = sprite->getRotation();

The positive value rotates it clockwise, and the negative value rotates it counter clockwise. The default value is zero. The preceding code rotates the sprite 30 degrees clockwise, as shown in the following screenshot:

Scale

You can change the sprite's scale. The default value is 1.0f, the original size. The following code will scale to half size.

sprite->setScale(0.5f);

You can also change the width and height separately. The following code will scale to half the width only.

sprite->setScaleX(0...

Creating animations


When the characters in a game start to move, the game will come alive. There are many ways to make animated characters. In this recipe, we will animate a character by using multiple images.

Getting ready

You can create an animation from a series of the following image files:

You need to add the running girl's animation image files to your project and clean your project.

Tip

Please check the recipe Creating sprites, which is the first recipe in this chapter, on how to add images to your project.

How to do it...

You can create an animation using a series of images. The following code creates the running girl's animation.

auto animation = Animation::create();
for (int i=1; i<=8; i++) {  // from run_01.png to run_08.png
    std::string name = StringUtils::format("res/run_%02d.png", i);
    animation->addSpriteFrameWithFile(name.c_str());
}
animation->setDelayPerUnit(0.1f);
animation->setRestoreOriginalFrame(true);
animation->setLoops(10);
auto action = Animate::create...

Creating actions


Cocos2d-x has a lot of actions, for example, move, jump, rotate, and so on. We often use these actions in our games. This is similar to an animation, when the characters in a game start their action, the game will come alive. In this recipe you will learn how to use a lot of actions.

How to do it...

Actions are very important effects in a game. Cocos2d-x allows you to use various actions.

Move

To move a sprite by a specified point over two seconds, you can use the following command:

auto move = MoveBy::create(2.0f, Vec2(100, 100));
sprite->runAction(move);

To move a sprite to a specified point over two seconds, you can use the following command:

auto move = MoveTo::create(2.0f, Vec2(100, 100));
sprite->runAction(move);

Scale

To uniformly scale a sprite by 3x over two seconds, use the following command:

auto scale = ScaleBy::create(2.0f, 3.0f);
sprite->runAction(scale);

To scale the X axis by 5x, and Y axis by 3x over two seconds, use the following command:

auto scale = ScaleBy...

Controlling actions


In the previous recipe, you learned some of the basic actions. However, you may want to use more complex actions; for example, rotating a character while moving, or moving a character after jumping. In this recipe, you will learn how to control actions.

How to do it...

Sequencing actions

Sequence is a series of actions to be executed sequentially. This can be any number of actions.

auto move = MoveBy::create(2.0f, Vec2(100, 0));
auto rotate = RotateBy::create(2.0f, 360.0f);
auto action = Sequence::create(move, rotate, nullptr);
sprite->runAction(action);

The preceding command will execute the following actions sequentially:

  • Move a sprite 100px to the right over two seconds

  • Rotate a sprite clockwise by 360 degree over two seconds

It takes a total of four seconds to execute these commands.

Spawning actions

Spawn is very similar to Sequence, except that all actions will run at the same time. You can specify any number of actions at the same time.

auto move = MoveBy::create(2.0f...

Calling functions with actions


You may want to call a function by triggering some actions. For example, you are controlling the sequence action, jump, and move, and you want to use a sound for the jumping action. In this case, you can call a function by triggering this jump action. In this recipe, you will learn how to call a function with actions.

How to do it...

Cocos2d-x has the CallFunc object that allows you to create a function and pass it to be run in your Sequence. This allows you to add your own functionality to your Sequence action.

auto move = MoveBy::create(2.0f, Vec2(100, 0));
auto rotate = RotateBy::create(2.0f, 360.0f);
auto func = CallFunc::create([](){
    CCLOG("finished actions");
});
auto action = Sequence::create(move, rotate, func, nullptr);
sprite->runAction(action);

The preceding command will execute the following actions sequentially:

  • Move a sprite 100px to the right over two seconds

  • Rotate a sprite clockwise by 360 degrees over two seconds

  • Execute CCLOG

How it works...

Left arrow icon Right arrow icon

Description

Cocos2d-x is a suite of open source, cross-platform game-development tools used by thousands of developers all over the world. Cocos2d-x is a game framework written in C++, with a thin platform-dependent layer. Completely written in C++, the core engine has the smallest footprint and the fastest speed of any other game engine, and is optimized to be run on all kinds of devices. You will begin with the initial setup and installation of Cocos2d before moving on to the fundamentals needed to create a new project. You will then explore and create the sprites, animations, and actions that you will include in the game. Next you will look at strings and create labels, including a label with True Type Font (TTF) font support. Later, you will learn about layer and scene creation and transition. Then you will create the GUI parts essential for a game, such as buttons and switches. After that, you will breathe life into the game with background music and sound effects using the all new Cocos2d-x audio engine. You will then discover how to manage resource files and implement processes that depend on the operating system. Finally, you will polish your game with physics such as gravity and elevation, learn about tools that will help you make games more robust and stable, and get to know best practices to improve the game you have developed.

Who is this book for?

If you are a game developer and want to learn more about cross-platform game development in Cocos2d-x, then this book is for you. Knowledge of C++, Xcode, Eclipse, and how to use commands in the terminal are prerequisites for this book.

What you will learn

  • Install and set up Cocos2dx for your development environment
  • Build, test, and release game applications for iOS and Android
  • Develop your games for multiple platforms
  • Customize Cocos2dx for your games
  • Use a physical engine in your games
  • Save and load text, JSON, XML, or other formats
  • Explore the brand new features of Cocos2dx

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 03, 2015
Length: 254 pages
Edition : 1st
Language : English
ISBN-13 : 9781783284757
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Nov 03, 2015
Length: 254 pages
Edition : 1st
Language : English
ISBN-13 : 9781783284757
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 115.97
Cocos2d-x cookbook
€36.99
Cocos2d-X Game Development Blueprints
€41.99
Cocos2d-x by example (update)
€36.99
Total 115.97 Stars icon
Banner background image

Table of Contents

12 Chapters
1. Getting Started with Cocos2d-x Chevron down icon Chevron up icon
2. Creating Sprites Chevron down icon Chevron up icon
3. Working with Labels Chevron down icon Chevron up icon
4. Building Scenes and Layers Chevron down icon Chevron up icon
5. Creating GUIs Chevron down icon Chevron up icon
6. Playing Sounds Chevron down icon Chevron up icon
7. Working with Resource Files Chevron down icon Chevron up icon
8. Working with Hardware Chevron down icon Chevron up icon
9. Controlling Physics Chevron down icon Chevron up icon
10. Improving Games with Extra Features Chevron down icon Chevron up icon
11. Taking Advantages 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.6
(5 Ratings)
5 star 60%
4 star 40%
3 star 0%
2 star 0%
1 star 0%
Kenjis Jan 23, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Cocos2d-x ver.3 での開発について基本から学べて、物理エンジン、加速度センサー、sqlite、http通信など実際のゲームに欠かせない実践的な内容についても分かり易く説明されています。より実践的な一例として、スプライトシート、zipファイル、sqliteファイルの暗号化などについても記載されています。英語が得意でなくても、文章構成がシンプルで説明自体も長々しくなく簡潔で読み易かったです。トピックごとに "Getting ready(準備)"、"How to do it ...(どうやってコード書くか)"、"How it works ...(書いたコードで何が起きるのか) "、"There's more...(さらに詳しく)" といった具合に順序立てており、コード暗記というよりは一般的なゲーム開発の手法も学べるように構成されていると思います。
Amazon Verified review Amazon
Hugo Dec 20, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is simply awesome, for me is the best source to learn Cocos2d-x development in general and to make a top class game.Starting from the most basic concepts of the game engine, teaching how to use the engine features and how to go more deeply creating your own features based on your needs, using the base that Cocos2d-x have.This book is structured, you have good basis to make all kind of games, you will have one “how-to-do” to almost everything you may need to make your games, I liked because he teaches why he does and how, this way you don't have just a recipe, you have the basis to do much more.He shows how to use advanced techniques to make your games run in more professional style, using hardware communication on Android and iOS, this is very important and you don't find much information about, and he teaches from the basics, and you will feel comfortable to do what you need to do, using the specific platform capabilities.This book covers Physics, SQLite, Tiled Maps, Networking and much more, all the things you may need to make AAA cross-platform games.The author focus on iOS and Android, but you can use for all Cocos2d-x supported platforms, only have to know that if you want to develop to iOS, an Apple machine and an iPhone will be needed, but, all the examples for Android can be executed in all OS's, I use Linux and sometimes Windows, for the specific tools to facilitate your development, all that are mentioned have support for windows, and you may find alternatives, I have my own favorites.I recommend this book for everyone who want to make games, this is the best way to speed your project in a structured, organized and complete way.
Amazon Verified review Amazon
Sergio Martinez-Losa del Rincon Jan 04, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
There is something special in this book, indeed this book covers more than game development with cocos2d-x, it takes advantage of other topics like networking, HTTP request usage and SQLite integration to expand a simple development and turn you game into a great development.Besides this topics, there is a great chapter about physics with simple examples, this is one of the most difficult topic and this chapter makes it easy.The book cover many over themes like font management, UI designing, game UX and sprite sheet design. This book gives a lot of useful information to make a game from scratch to professional and the examples lets you develop a full game step by step.Cocos2d-x is available for several platforms and this books even tells hoe to configure all your tools and resources to build a game for iOS and Android.
Amazon Verified review Amazon
Perry Nally Jan 27, 2016
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Pretty great resource if you don't know much about Cocos2d-x. But if you already have knowledge in Cocos2d-x, like how to load sprites, physics, audio, and 3D models then only a part of this book may be useful. There is not much in the way of 3D, other than how to load a 3D model, which seems to have a spelling error in the first section it is described (using "3D modal" instead of "3D model"). Grammatically it needs a bit of work, but I understood everything that was being said.You can definitely use this as a reference or a getting started set of snippets, but all recipes would need to be modified to be implemented in a use-able game/app. That being said, you'll find the networking part very helpful. There does not seem to be enough clarity on the web on how to frame web service calls and process the data. This book helps with that. This is a critical part of securing external logins and other security items. It is a great book and I recommend it, but I cannot say its the most explanatory book on the subject, though it does cover all the relevant topics.Don't get me wrong, this book will help you go in the right direction and implement certain important standards, but you'll need to do your own leg work to figure out how to put all the pieces together.
Amazon Verified review Amazon
aseem gupta Jan 17, 2016
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Cocos2d-x current version: v3.9 - has more 3D APIs than 3.4 and also has refactored few 2D APIs. This book uses version 3.4 which is no less than perfect for creating 2D games and you can also use new SDK APIs with it without any trouble as at that time only cocos2d-x SDK APIs were introduced.---------TL;DR---------I expected real game usages would have been demonstrated which can be used directly or with some modifications or atleast would have given picture of where all it can be used. I guess, this is what cookbook stands for and not simply showing working of APIs.But I liked few chapters of this book for different reasons.----------CONS:----------1) Drawing shapes has been shown but real examples of it are not shown. I personally, think that merely showing working API is not a big deal.2) Progress Loader bar is show but timer is used to make progress and not actual resource loading where tough works goes in to implement to find out how many resources are loaded in the memory.3) Page view is shown which is good but this is normal API usage. Could have been better if had shown how page view is implemented to create cool menus like in Angry birds and some other games where on the screen, apart from the current page, some part of left and right page are also shown so that player knows that there is still something to be swiped left/right.---------PROS:---------1) Book is well organised. 'How it works’ part after every topic is good to have.2) Animations using plist is shown which is pretty convenient way if lots of animations are there in a game.3) ScrollView and Page View API usage is shown which you will miss in other places and which I remember I spent good time in implementing by myself. But it's merely API usage and you would have to think on how you can use this to adapt to your needs.4) VideoPlayer api is shown if someone wants to use movie player in his game. On different note, you can also show youtube videos from new SDK APIs.5) Physics chapter is explained nicely. But it uses inbuilt physics engine which is actually built upon chipmunk-not box2d but it’s as good as box2d for many games. I liked changing the gravity using accelerometer - I never thought I could it this way.6) People who are not aware of the tools to pack and use resources of your game in a professional way then you might like chapter 10 ‘’Improving Games with Extra features’.------------------------USPs of this book------------------------1) Chpt7: 'Working with Resource Files' is really good, particularly usage of sqlite for saving game data.2) Chpt11:'Taking Advantages’.a) Encrypting sqlite files for securing game data which is essential if you don't want players to change coins, etc they've earned in the game.b) Sprite sheet encryption is shown but very few games use it as it might need heavy processing before loading the game on mobiles. Anyways, example shows texture packer way for encrypting sprite sheets which is a paid feature.c) Observer pattern is shown which is actually the same as push notification section of the book Cocos2d-x beginner guide by example but with different example.(Just for a note, example in latter book is better example as it directly matches ready to use need. But it might not be the compulsory thing that you might want to add observer pattern, if you're a beginner, in your game because it’s a way how you design code and not something you can't avoid. Also, note, Push Notifications which I just talked about in 2nd book is not same as push notifications that we receive in our smartphones.)d) Http networking is shown which is almost same as cocos2d-x official programmer’s guide example. But this book gives a bit more explanation with a working example which might arouse curiosity in some readers. So, you might like it.e) Using native code(Objective C/Java usage with C++) which can be required by few games where developer wants some kind of processing based on which platform it is. Usage is shown but CCLOG is used which I don’t like in books as I don't find it as a good way to demonstrate a practical example.
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 included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.