September 2013
Beginner to intermediate
388 pages
8h 19m
English
We will now remove some of the old code that was used to draw test sprites. Additionally, we will add three new constants to define the amount of start, extra lives, and the viewport dimension of the GUI camera.
Change the code of Constants class as follows:
public class Constants {
// Visible game world is 5 meters wide
public static final float VIEWPORT_WIDTH = 5.0f;
// Visible game world is 5 meters tall
public static final float VIEWPORT_HEIGHT = 5.0f;
// GUI Width
public static final float VIEWPORT_GUI_WIDTH = 800.0f;
// GUI Height
public static final float VIEWPORT_GUI_HEIGHT = 480.0f; // Location of description file for texture atlas public static final String TEXTURE_ATLAS_OBJECTS = "images/canyonbunny.pack"; ...Read now
Unlock full access