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

Chapter 1. Getting Started

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:

  • Downloading and installing Visual Studio
  • Downloading and installing Windows Phone SDK
  • Downloading, installing, and configuring Python
  • Downloading Cocos2d-x
  • Creating your project and running it on a simulator
  • The basics of Cocos2d-x, the coordinate system, and project structure
  • Running the project on multiple platforms

The following are the requirements to get started:

  • Windows 8.0 (64-bit)
  • Visual Studio 2012 Express Edition
  • Windows Phone SDK 8.0
  • Python Version 2.7.6
  • Cocos2d-x Version 2.2.3

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:

  • Version 2.2.3 supports a wide array of platforms such as Blackberry, Windows Phone, Tizen, and Marmalade
  • There are a lot of tools that are freely available for Version 2.2.3 for advertisements, in-app purchases, and leaderboard and achievement integration, which in v3.0 you would have to write yourself at the moment

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.

Note

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:

  1. Right-click on the wp8GameComponent project and then click on Properties.
  2. In General under Configuration Properties, make sure Windows Phone 8.0 (V110) is selected for Platform Toolset.

    Note

    Cocos2d-x 2.2.3 can be downloaded for all the OSes from the links in this chapter.

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