O'Reilly logo

Mastering Cocos2d Game Development by Alex Ogorek

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

Creating menus, scenes, and scene transitions

Scenes make up the core of Cocos2d. When you go from the main menu to the Level Select screen, those are (when done in a best practice coding way) two different scenes. You can transition from one scene to another in any way your heart desires. However, it's generally done by tapping a button. For example, Play, Settings, and Shop are all examples of a menu button that a user might press to trigger a scene transition.

Creating a new file for the scene

Most likely, your game isn't going to have just one screen. If so, then you can skim over this as it likely won't pertain to you. However, the vast majority of games made have at the very least a main menu, a settings menu, a pause screen, and some sort ...

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