O'Reilly logo

Cocos2d-x Game Development Essentials by Gareth Jones, Arutosh Gurung, Frahaan Hussain

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 5. The Game Sprites

This chapter will guide you through the process of using sprites to display game objects such as the background, player characters, and Non-playable Characters (NPCs).

Sprites are computer graphics that are used to represent objects to be displayed within a scene; for example, a player would be a sprite within the game environment. These player sprites would interact with other sprites that are present.

The topics that are covered in this chapter are as follows:

  • Adding sprites
  • Positioning sprites
  • Moving sprites

Sprites simplify the process of displaying game objects—you don't need to create a bitmap with assigned memory, position the bitmap, and draw it. Sprites allow all of this to be done behind the scenes. Cocos2d-x has ...

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