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 (e.g., 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, etc.).

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. I 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 into the com.badlogic.androidgames.mrnom package of the Eclipse project!

0 0

Post a comment