Time for action – running the game in Android
Follow these steps to deploy the game to Android:
Open the manifest file and set the
app
orientation toportrait
.Next, open the
Android.mk
file in a text editor.Edit the lines in
LOCAL_SRC_FILES
to read:LOCAL_SRC_FILES := hellocpp/main.cpp \ ../../Classes/AppDelegate.cpp \ ../../Classes/GameSprite.cpp \ ../../Classes/LineContainer.cpp \ ../../Classes/Rocket.cpp \ ../../Classes/GameLayer.cpp
Import the game into Eclipse and build it.
Save and run your application. This time, you can try out different size screens if you have the devices.
What just happened?
You now have Rocket Through running in Android.
Have a go hero
Add logic to the resetStar
method so that the new position picked is not too close to the _rocket
sprite. So, make the function a recurrent one until a proper position is picked.
And take the warp
particle system, which right now does not...