Book Image

Cocos2d-x by Example: Beginner's Guide

By : Roger Engelbert
Book Image

Cocos2d-x by Example: Beginner's Guide

By: Roger Engelbert

Overview of this book

Table of Contents (19 chapters)
Cocos2d-x by Example Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – running the game in Android


Follow these steps to deploy the game to Android:

  1. Open your project's Android.mk file in a text editor.

  2. Edit the lines in LOCAL_SRC_FILES to read:

    LOCAL_SRC_FILES := hellocpp/main.cpp \
                       ../../Classes/AppDelegate.cpp \
                       ../../Classes/Block.cpp \
                       ../../Classes/GameSprite.cpp \
                       ../../Classes/Player.cpp \
                       ../../Classes/Terrain.cpp \
                       ../../Classes/GameLayer.cpp
  3. Import the game into Eclipse and wait until all classes are compiled.

  4. That's it. Save it and run your application.

What just happened?

You now have Victorian Rush Hour running in Android.