Chapter 2. Displaying the Hero and Controls

In the previous chapter, we saw the inside workings of Cocos2d-x, where we saw which projects and libraries were included. We also looked at the project and folder structure of a single project and dug deeper into understanding the classes that act as the basic building blocks for creating any game.

From this chapter, we will look at how to take those building blocks and make a functional game out of it.

In this chapter, we will see how to display objects, such as the background image and player, and position them on the screen. Once the player is on the screen, the next thing we will do is make her move around. We will look at different ways that the hero can be controlled in.

The things you will learn ...

Get Learning Cocos2d-x Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.