Game Development Reference
In-Depth Information
Time for action - running the game in
Android
Time to deploy the game to Android.
1. Navigate to the proj.android folder and open the file AndroidMani-
fest.xml in a text editor. Then go to the folder jni and open the file
Android.mk in a text editor.
2. In the AndroidManifest.xml file, edit the following line in the activity
tag as follows:
android:screenOrientation="portrait"
3. Next, let's edit the make file, so open the Android.mk file and edit the lines in
LOCAL_SRC_FILES to read:
LOCAL_SRC_FILES := hellocpp/main.cpp \
../../Classes/AppDelegate.cpp \
../../Classes/b2Sprite.cpp \
../../Classes/Eskimo.cpp \
../../Classes/GSwitch.cpp \
../../Classes/Igloo.cpp \
../../Classes/Platform.cpp \
../../Classes/LevelSelectLayer.cpp \
../../Classes/MenuLayer.cpp \
../../Classes/GameLayer.cpp
4. Now import the project into Eclipse and build it.
5. You can now save it and run the game in your Android device.
Search WWH ::




Custom Search