
Learning Cocos2d-x Game Development
By :

In this chapter, we will look at the basics of the Cocos2d-x frameworks and get the required tools installed to create the Cocos2d-x project. This will include downloading and installing Visual Studio IDE, Windows Phone SDK, Python, and Cocos2d-x and creating the project. We will also cover some basics such as coordinate systems, fundamental classes of Cocos2d-x, and how to run the same project on different devices running on different platforms.
The topics you will learn in this chapter are as follows:
The following are the requirements to get started:
At the time of writing this book, Version 3.0 of Cocos2d-x had already been released. I am using Version 2.2.3 for this book for the following reasons:
That being said, I would definitely keep a watch on v3.0 and the platforms it supports in the future releases. Also, the tools are being updated to support Version 3.0. I would recommend downloading v3.0 from the site and practicing with it once you have a good understanding of how Cocos2d-x works.
If you wish to run the game on iOS, Android, or Blackberry instead of Windows Phone 8, you can refer to Chapter 11, Porting, References, and Final Remarks, and see how to configure the IDE for that OS and then continue from the next chapter.
For Win32, you can continue with this chapter and you wouldn't have to install Windows Phone 8 SDK. You can also run the project on Windows 7 or higher machines, but you will have to make a small change in the AppDelegate.cpp
file, which is mentioned in Chapter 11, Porting, References, and Final Remarks.
Also, while opening the win32
project developed in Visual Studio 2012 with the currently installed Visual Studio 2013, you might get some errors. The following are the steps to be taken to fix this:
wp8GameComponent
project and then click on Properties.Cocos2d-x 2.2.3 can be downloaded for all the OSes from the links in this chapter.
Change the font size
Change margin width
Change background colour