O'Reilly logo

Building Android Games with Cocos2d-x by Raydelto Hernandez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Graphics

In this chapter, we will cover how to create and handle all your game graphics. We will create the scenes, the transitions between those using the game director, create sprites, locate them in the desired position, move them around using actions, and bring our characters to life using animation.

The following topics will be covered in this chapter:

  • Creating scenes
  • Understanding nodes
  • Understanding sprites
  • Understanding actions
  • Animating sprites
  • Adding the game menus
  • Handling multiple screen resolutions

Creating scenes

The scene concept is very important within the Cocos2d-x game engine, since all the displayed screens in our game are considered scenes. Creating an analogy between Cocos2d-x and the Android native Java development, we ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required