Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Cocos2d-x Game Development

You're reading from   Learning Cocos2d-x Game Development Learn cross-platform game development with Cocos2d-x

Arrow left icon
Product type Paperback
Published in Sep 2014
Publisher
ISBN-13 9781783988266
Length 266 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Siddharth Shekar Siddharth Shekar
Author Profile Icon Siddharth Shekar
Siddharth Shekar
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Getting Started 2. Displaying the Hero and Controls FREE CHAPTER 3. Enemies and Controls 4. Collision Detection and Scoring 5. HUD, Parallax Background, and the Pause Button 6. Animations 7. Particle Systems 8. Adding Main and Option Menu Scenes 9. Adding Sounds and Effects 10. Publishing to the Windows Phone Store 11. Porting, References, and Final Remarks Index

Running the project on multiple platforms

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.

Running the project on Windows (desktop mode)

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:

Running the project on Windows (desktop mode)

Running the project on Windows RT (tile mode)

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:

  1. In the project's folder, instead of proj.win32, open proj.winrt.
  2. Double-click on wp8Game.sln to open it in Visual Studio 2012.
  3. Select Local Windows Debugger in the drop-down list next to the green triangle button on the toolbar and click on it.
  4. Once it has been built, it will open in fullscreen mode, as shown in the following screenshot:
    Running the project on Windows RT (tile mode)

Running the project on the iPhone simulator using Xcode

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 the iPhone simulator using Xcode

Running the project on an Android simulator using Eclipse

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):

Running the project on an Android simulator using Eclipse

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.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image