What this book covers
Chapter 1, Getting Started, is an introduction to Cocos2d-x with instructions to download and install Visual Studio 2012. It also shows you how to download Cocos2d-x and create a multiplatform project. This chapter guides you through the procedure to open the project in Visual Studio and run it on the Windows desktop, Windows Phone 8 simulator, and iOS device simulator.
Chapter 2, Displaying the Hero and Controls, shows you how to display the player and make it move around with various control mechanisms, such as actions, accelerometer, touches, and on-screen buttons.
Chapter 3, Enemies and Controls, shows you how to create a custom enemy class and a bullet class, make the enemy spawn from the right-hand side of the screen at different heights, and make the enemy move towards the left. The player has to tap on the left-hand side of the screen to make the hero reach the same height as the enemy and tap on the right-hand side of the screen to shoot.
Chapter 4, Collision Detection and Scoring, shows the different mechanics of collision detection and discusses their advantages and disadvantages. We will also see how to keep a track of our score.
Chapter 5, HUD, Parallax Background, and the Pause Button, shows you how to add a GUI and a scrolling background layer. It also explains the process of adding a pause and resume button along with a pause screen.
Chapter 6, Animations, discusses a couple of animation tools and techniques. Questions such as "What is a spritesheet animation?" and "How is it different from a skeletal animation?" will be answered. Also, it will show you how to animate characters using these techniques and how to change the state of the animation using state machines.
Chapter 7, Particle Systems, discusses how to include particles in the game. You will be taking a look at inbuilt particle systems in Cocos2d-x and creating your own custom particle system. You'll also get a glimpse of Particle Designer and other tools used to create particles.
Chapter 8, Adding Main and Option Menu Scenes, discusses Options and Play scenes, creating the main menu and credits scene, and adding GUI buttons on each of the screens to navigate between them. It also explains the process of loading the main screen once the game is loaded.
Chapter 9, Adding Sounds and Effects, shows you how to add the background score and sound effects in the game. It also discusses actions such as pausing and resuming sounds and effects and adding a mute button in the Options scene. You can also take a look at different audio formats and how to convert between them using the free software, Audacity.
Chapter 10, Publishing to the Windows Phone Store, lets you take a look at the Windows Phone Store. It explains the various steps needed to create a store account, prepare the app for upload, check the app on the local machine, and publish games on the Windows Phone Store.
Chapter 11, Porting, References, and Final Remarks, explains how to port the game on to different platforms, such as iOS and Android, using the same code base. It also lets you take a look at some of the useful website references, books, and blogs to take your coding and game development skills to the next level.