Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Building Android Games with Cocos2d-x
  • Toc
  • feedback
Building Android Games with Cocos2d-x

Building Android Games with Cocos2d-x

By : Hernandez
4.3 (8)
close
Building Android Games with Cocos2d-x

Building Android Games with Cocos2d-x

4.3 (8)
By: Hernandez

Overview of this book

If you have a basic understanding of the C++ programming language and want to create videogames for the Android platform, then this technology and book is ideal for you.
Table of Contents (10 chapters)
close
9
Index

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text folder names, filenames, file extensions, pathnames, dummy URLs, and user input are shown as follows: "In order to add accelerometer support to our game, we are first going to add the following method declaration to our HelloWorldScene.h header file."

A block of code is set as follows:

void HelloWorld::movePlayerByTouch(Touch* touch, Event* event)
{
  Vec2 touchLocation = touch->getLocation();
  if(_sprPlayer->getBoundingBox().containsPoint(touchLocation)){
    movePlayerIfPossible(touchLocation.x);
  }
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

   Size screenSize = glview->getFrameSize();
   Size designSize(768, 1280);
   std::vector<std::string> searchPaths;   
   searchPaths.push_back("sounds");

Any command-line input or output is written as follows:

cocos new MyGame -p com.your_company.mygame -l cpp -d NEW_PROJECTS_DIR

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Clicking on the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete