Book Image

Cocos2d-X Game Development Blueprints

By : Karan Sequeira
Book Image

Cocos2d-X Game Development Blueprints

By: Karan Sequeira

Overview of this book

Table of Contents (17 chapters)
Cocos2d-x Game Development Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building Pumpkin Defense on Android


We will now build one of our own games to further our understanding of how the Android environment works. The game we will build is the one we created last, that is, Pumpkin Defense. Before you proceed, extract the source bundle for Pumpkin Defense and place it inside the projects folder inside your copy of the Cocos2d-x source.

Fire up your swanky new Eclipse and when you're asked to select a workspace, set it as the projects folder in your Cocos2d-x source. This is shown in the following screenshot:

Now, import the Pumpkin Defense Android project into Eclipse by selecting File | Import.... In the following window, select Existing Projects into Workspace under the General setting and click on Next:

In the next window, browse to the proj.android folder within the Pumpkin Defense source bundle and click on Finish:

Once it is imported, you can find the pumpkindefense project under the Package Explorer view. It should look something like this:

As you can see,...