O'Reilly logo

Cocos2d Cross-Platform Game Development Cookbook - Second Edition by Siddharth Shekar

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. Scenes and Menus

The topics covered in this chapter are:

  • Adding a MainMenu Scene
  • Adding text using CCLabel
  • Adding buttons with CCMenu
  • Adding a Gameplay Scene
  • Transitioning between scenes
  • Adding transition effects
  • Adding a Level Selection Scene
  • Scrolling a Level Selection Scene

Introduction

In the previous chapter, we discussed how to include and manipulate sprites. In this chapter, we will take a look at how to create scenes in a game, which are used to create the basics of menus in games.

Scenes are the building blocks of any game. Generally, in any game, you have the main menu scene in which you are allowed to navigate to different scenes, such as GameScene, OptionsScene, and CreditsScene. In each of these scenes, you have menus.

Similarly, in ...

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