
Learning Cocos2d-x Game Development
By :

The same project can be run on different platforms. Let's see a few examples of the same project, running on Windows (desktop mode), Windows RT (tile mode), iOS, and Android with ease and with no need to rewrite the code for different languages.
To run the project on Windows desktop, go to the project's folder and open the proj.win32
folder and double-click on wp8Game.sln
in desktop mode.
Once Visual Studio opens, click on Local Machine to build and run the project. Once built, you should see it running:
To run the project in Windows RT mode, you will need the Visual Studio 2012 Professional or Ultimate edition. The following steps will help you run the project on Windows RT:
proj.win32
, open proj.winrt
.wp8Game.sln
to open it in Visual Studio 2012.You can even take a copy of the Cocos2d-x 2.2.3 folder to a Mac and run it on the simulator. Just install the Xcode IDE; go to the proj.ios
folder and double-click on the Xcode project and that's all! You should now see the project running on an iOS simulator:
Running the project on Eclipse on an Android simulator is a long process, so I am just showing you the output on the Android Virtual Device (AVD):
Later in the book, we will also see how to configure the IDEs to run the project on an iOS simulator on Mac using the Xcode IDE and on Android simulator using the Eclipse IDE.
Change the font size
Change margin width
Change background colour