Setting Up the Project

As mentioned in the last chapter, we will merge the code for Mr. Nom with our framework code. All the classes related to Mr. Nom will be placed in the package com.badlogic.androidgames.mrnom. Additionally, we have to modify the manifest file, as outlined in Chapter 4. Our default activity will be called MrNomGame. Just follow the ten steps outlined in the section “Android Game Project Setup in Ten Easy Steps” in Chapter 4 to set the <activity> attributes properly (that is, so that the game is fixed in portrait mode and configuration changes are handled by application) and to give our application the proper permissions (writing to external storage, using a wake lock, and so forth).

All the assets from the previous sections are located in the assets/ folder of the project. Additionally, we have to put icon.png files into the res/drawable, res/drawable-ldpi, res/drawable-mdpi, and res/drawable-hdpi folders. We just took the headright.png of Mr. Nom, renamed it icon.png, and put a properly resized version of it in each of the folders.

All that's left is putting our game code intothe com.badlogic.androidgames.mrnom package of the Eclipse project!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset