Rev 102 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 32 | chris | 1 | package com.gebauz.pingK.game; |
| 2 | |||
| 65 | chris | 3 | import com.gebauz.framework.util.Vector4; |
| 4 | |||
| 32 | chris | 5 | public class GameConsts |
| 6 | { |
||
| 7 | // General constants |
||
| 43 | chris | 8 | public static final String LOG_TAG = "GEBAUZ"; |
| 9 | |||
| 32 | chris | 10 | public static final float VIRTUAL_SCREEN_WIDTH = 800.0f; |
| 11 | public static final float VIRTUAL_SCREEN_HEIGHT = 480.0f; |
||
| 61 | chris | 12 | public static final float SCORE_BAR_HEIGHT = 60.0f; // height of the menu/score/icon/ad bar in dp |
| 65 | chris | 13 | |
| 76 | chris | 14 | public static final float FADE_TIME = 0.5f; |
| 78 | chris | 15 | public static final float BUTTON_TOUCH_TOLERANCE = 10.0f; |
| 84 | chris | 16 | |
| 17 | public static final float SCREENFLASH_SCORE_TIME = 0.3f; // time for pingk flashing when scoring |
||
| 18 | public static final float SCREENFLASH_BALLSPAWN_TIME = 0.5f; // time for pingk flashing when ball spawning |
||
| 76 | chris | 19 | |
| 65 | chris | 20 | public static final Vector4 PINGK_COLOR = new Vector4(1.0f, 0.0f, 0.6f, 1.0f); |
| 103 | chris | 21 | |
| 22 | // Preferences constants |
||
| 23 | public static final String PREF_NAME = "pingKSettings"; |
||
| 24 | public static final String PREF_AUDIO_ENABLED = "AudioEnabled"; |
||
| 25 | public static final String PREF_MUSIC_ENABLED = "MusicEnabled"; |
||
| 32 | chris | 26 | |
| 77 | chris | 27 | // Title screen constants |
| 28 | public static final float TITLE_FLASH_INTERVAL = 6.0f; |
||
| 29 | public static final float TITLE_POSITION_Y = 50.0f; |
||
| 30 | public static final float TITLE_WIDTH = 500.0f; |
||
| 31 | public static final float TITLE_HEIGHT = 250.0f; |
||
| 32 | |||
| 32 | chris | 33 | // Paddle constants |
| 48 | chris | 34 | public static final float PADDLE_DISTANCE_FROM_EDGE_X = 40.0f; |
| 35 | public static final float PADDLE_DISTANCE_FROM_EDGE_Y = 5.0f; |
||
| 36 | public static final float PADDLE_WIDTH = 40; |
||
| 37 | public static final float PADDLE_HEIGHT = 80; |
||
| 71 | chris | 38 | |
| 39 | public static final float PADDLE_IMPACT_WIDTH = 40; |
||
| 40 | public static final float PADDLE_IMPACT_HEIGHT = 80; |
||
| 41 | public static final float PADDLE_IMPACT_LIFETIME = 0.4f; |
||
| 87 | chris | 42 | public static final float PADDLE_IMPACT_CONCAVE_OFFSET = 25.0f; |
| 71 | chris | 43 | |
| 82 | chris | 44 | public static final float PADDLE_INPUT_ACCEL = 15.0f; |
| 47 | chris | 45 | public static final float PADDLE_HIT_OFFSET = 5.0f; |
| 74 | chris | 46 | public static final float PADDLE_HIT_ZONE_DEVIATION = 0.4f; // angle coefficient for the paddle's bendedness |
| 32 | chris | 47 | |
| 69 | chris | 48 | public static final float PADDLE_AI_TIMEOUT = 5.0f; |
| 49 | public static final float PADDLE_AI_VARIANCE = 10.0f; |
||
| 50 | public static final float PADDLE_AI_VARIANCE2 = 60.0f; |
||
| 51 | public static final float PADDLE_AI_RANDOM_TIMER = 2.0f; |
||
| 87 | chris | 52 | public static final float PADDLE_AI_ACCEL = 7.0f; |
| 82 | chris | 53 | public static final float PADDLE_AI_ACCEL_SLOW = 1.5f; |
| 69 | chris | 54 | |
| 45 | chris | 55 | // Ball constants |
| 56 | public static final float BALL_SIZE = 16.0f; |
||
| 58 | chris | 57 | public static final float BALL_INITIAL_SPEED = 300.0f; |
| 48 | chris | 58 | public static final float BALL_TOP_SPIN_INTENSITY = 0.18f; |
| 63 | chris | 59 | |
| 60 | public static final float BALL_SPEEDUP_TIMER = 1.0f; |
||
| 61 | public static final float BALL_SPEEDUP_INCREASE = 12.00f; |
||
| 62 | |||
| 48 | chris | 63 | public static final float BALL_MAXIMUM_ANGULAR_SPEED = 500.0f; |
| 63 | chris | 64 | public static final float BALL_ANGULAR_SPEED_DECREASE = 10.0f; |
| 65 | |||
| 48 | chris | 66 | public static final float BALL_STEEPEST_ANGLE_HIT_PADDLE_FRONT = 1.0f; // to prevent steep 0°/90°/180°/270° angles that would make the game stuck forever |
| 67 | public static final float BALL_STEEPEST_ANGLE_HIT_PADDLE_SIDE = 1.0f; // to prevent steep 0°/90°/180°/270° angles that would make the game stuck forever |
||
| 68 | public static final float BALL_STEEPEST_ANGLE_REFLECT_FROM_BOARD = 3.0f; // to prevent steep 0°/90°/180°/270° angles that would make the game stuck forever |
||
| 63 | chris | 69 | |
| 58 | chris | 70 | public static final float BALL_TRAIL_WIDTH = 5.0f; |
| 71 | public static final int BALL_TRAIL_LENGTH = 20; // number of points for the trail |
||
| 72 | public static final float BALL_TRAIL_INTERVAL = 0.05f; // interval in seconds at which the trail gets another point |
||
| 60 | chris | 73 | public static final float BALL_TRAIL_MAX_ALPHA = 0.7f; |
| 87 | chris | 74 | public static final float BALL_TRAIL_ELEMENT_LIFETIME = 1.0f; |
| 75 | |||
| 84 | chris | 76 | public static final float BALL_WARP_SIZE_0 = 10.0f; |
| 87 | chris | 77 | public static final float BALL_WARP_SIZE_1 = 35.0f; |
| 78 | public static final float BALL_WARP_SIZE_2 = 60.0f; |
||
| 79 | public static final float BALL_WARP_SIZE_3 = 85.0f; |
||
| 84 | chris | 80 | |
| 87 | chris | 81 | public static final float BALL_WARP_ALPHA_0 = 1.0f; |
| 82 | public static final float BALL_WARP_ALPHA_1 = 0.8f; |
||
| 83 | public static final float BALL_WARP_ALPHA_2 = 0.6f; |
||
| 84 | public static final float BALL_WARP_ALPHA_3 = 0.4f; |
||
| 84 | chris | 85 | |
| 87 | chris | 86 | public static final float BALL_WARP_GROWTH = 120.0f; |
| 84 | chris | 87 | public static final float BALL_WARP_FADE = 1.0f; |
| 88 | |||
| 48 | chris | 89 | // PlayField constants |
| 71 | chris | 90 | public static final float PLAYFIELD_BORDER_X = 5.0f; |
| 70 | chris | 91 | public static final float PLAYFIELD_BORDER_Y = 9.0f; |
| 73 | chris | 92 | public static final float PLAYFIELD_IMPACT_LIFETIME = 0.75f; |
| 70 | chris | 93 | public static final float PLAYFIELD_IMPACT_SIZE = 48.0f; |
| 73 | chris | 94 | public static final float PLAYFIELD_IMPACT_SIZE_GROWTH = 48.0f; |
| 70 | chris | 95 | public static final float PLAYFIELD_IMPACT_OFFSET_Y = 2.0f; |
| 60 | chris | 96 | |
| 65 | chris | 97 | // Score bar constants |
| 74 | chris | 98 | public static final float SCOREBAR_MARGIN_X = 10.0f; |
| 65 | chris | 99 | public static final float SCOREBAR_MARGIN_Y = 5.0f; |
| 74 | chris | 100 | |
| 101 | // Menu bar constants |
||
| 102 | public static final float MENUBAR_OFFSET_X = 10.0f; |
||
| 103 | public static final float MENUBAR_AD_WIDTH_DIP = 320.0f; |
||
| 68 | chris | 104 | |
| 75 | chris | 105 | // Pause screen constants |
| 106 | public static final float PAUSE_TITLE_TEXT_SCALE = 3.0f; |
||
| 107 | public static final float PAUSE_TITLE_TEXT_POSITION_Y = 120.0f; |
||
| 108 | public static final float PAUSE_MENU_TEXT_SCALE = 2.0f; |
||
| 109 | public static final float PAUSE_MENU_RESTART_POSITION_Y = 230.0f; |
||
| 110 | public static final float PAUSE_MENU_QUIT_POSITION_Y = 280.0f; |
||
| 111 | public static final float PAUSE_BG_HEIGHT = 320.0f; |
||
| 112 | public static final float PAUSE_MENU_POPUP_TIME = 0.25f; |
||
| 113 | |||
| 68 | chris | 114 | // Score Display constants |
| 115 | public static final float SCORE_DISPLAY_ACCEL = 3.0f; |
||
| 116 | public static final float SCORE_DISPLAY_SIZE_END = 250.0f; |
||
| 117 | public static final float SCORE_DISPLAY_SIZE_BEGIN = 550.0f; |
||
| 47 | chris | 118 | |
| 73 | chris | 119 | // Monkey/Banana constants |
| 120 | public static final int MONKEY_COUNT_X = 6; |
||
| 121 | public static final int MONKEY_COUNT_Y = 4; |
||
| 122 | public static final float MONKEY_MOVE_SPEED = 1.0f; |
||
| 123 | public static final float MONKEY_MIN_SIZE = 100.0f; |
||
| 124 | public static final float MONKEY_MAX_SIZE = 200.0f; |
||
| 125 | public static final float MONKEY_POSITION_SPREAD_FACTOR = 0.5f; |
||
| 126 | public static final float MONKEY_MAX_INTENSITY = 0.15f; |
||
| 92 | chris | 127 | public static final float FLOWER_MAX_INTENSITY = 0.45f; |
| 73 | chris | 128 | public static final float MONKEY_SPEED_FACTOR = 0.3f; |
| 129 | public static final Vector4 MONKEY_COLOR = new Vector4(0.7f, 0.15f, 0.6f, 1.0f); |
||
| 101 | chris | 130 | |
| 131 | // Crystal Hit counter constants |
||
| 102 | chris | 132 | public static final float CRYSTAL_HITCOUNTER_DISPLAY_TIME = 2.5f; |
| 101 | chris | 133 | public static final float CRYSTAL_HITCOUNTER_SCALE = 3.0f; |
| 134 | public static final float CRYSTAL_HITCOUNTER_SCALE2 = 1.0f; |
||
| 73 | chris | 135 | |
| 92 | chris | 136 | |
| 79 | chris | 137 | // Powerup constants |
| 80 | chris | 138 | public static final float POWERUP_BUBBLE_SIZE = 56.0f; |
| 139 | public static final float POWERUP_SIZE = 50.0f; |
||
| 140 | public static final float POWERUP_WOBBLE_OFFSET = 4.0f; |
||
| 141 | public static final float POWERUP_WOBBLE_SPEED = 5.0f; |
||
| 142 | public static final float POWERUP_RANGE_X = 600.0f; |
||
| 143 | public static final float POWERUP_SPAWN_TIME_MINIMUM = 2.0f; |
||
| 144 | public static final float POWERUP_SPAWN_TIME_MAXIMUM = 3.0f; // 13.0f; |
||
| 85 | chris | 145 | public static final int POWERUP_MAX_SPAWNED = 3; |
| 81 | chris | 146 | public static final float POWERUP_APPEAR_TIME = 0.5f; |
| 147 | |||
| 85 | chris | 148 | public static final int POWERUP_SPARKLE_MAX_BUBBLES = 15; |
| 82 | chris | 149 | public static final float POWERUP_SPARKLE_GROWTH_MIN = 80.0f; |
| 150 | public static final float POWERUP_SPARKLE_GROWTH_MAX = 120.0f; |
||
| 84 | chris | 151 | public static final float POWERUP_SPARKLE_MOVEMENT = 70.0f; |
| 152 | public static final float POWERUP_SPARKLE_MIN_SIZE = 40.0f; |
||
| 153 | public static final float POWERUP_SPARKLE_MAX_SIZE = 60.0f; |
||
| 81 | chris | 154 | public static final float POWERUP_SPARKLE_SPREAD = 10.0f; |
| 75 | chris | 155 | |
| 83 | chris | 156 | // Powerup effects constants |
| 157 | public static final float POWERUP_CONCAVE_TIME = 5.0f; |
||
| 93 | chris | 158 | |
| 87 | chris | 159 | public static final float POWERUP_MOSAIC_TIME = 8.0f; |
| 160 | public static final int POWERUP_MOSAIC_OFFSCREEN_WIDTH = 128; |
||
| 161 | public static final int POWERUP_MOSAIC_OFFSCREEN_HEIGHT = 64; |
||
| 162 | public static final float POWERUP_MOSAIC_FADE_TIME = 2.0f; |
||
| 93 | chris | 163 | |
| 91 | chris | 164 | public static final float POWERUP_FLOWER_TIME = 8.0f; |
| 165 | public static final float POWERUP_FLOWER_FADE_TIME = 2.0f; |
||
| 166 | public static final float POWERUP_FLOWER_PARTICLE_SIZE = 20.0f; |
||
| 167 | public static final float POWERUP_FLOWER_PARTICLE_GROWTH = 30.0f; |
||
| 168 | public static final float POWERUP_FLOWER_PARTICLE_INTERVAL = 0.03f; |
||
| 169 | public static final float POWERUP_FLOWER_PARTICLE_LIFETIME = 2.5f; |
||
| 170 | public static final float POWERUP_FLOWER_PARTICLE_SPREAD = 25.0f; |
||
| 171 | public static final float POWERUP_FLOWER_PARTICLE_FADE_IN = 0.2f; |
||
| 172 | public static final float POWERUP_FLOWER_PARTICLE_FADE_OUT = 1.0f; |
||
| 173 | public static final int POWERUP_FLOWER_MAX_PARTICLES = 200; |
||
| 93 | chris | 174 | |
| 99 | chris | 175 | public static final float POWERUP_SLOWMO_TIME = 4.0f; |
| 93 | chris | 176 | public static final float POWERUP_SLOWMO_FACTOR = 0.3f; |
| 83 | chris | 177 | |
| 100 | chris | 178 | public static final float POWERUP_CRYSTAL_SIZE = 32.0f; |
| 179 | public static final float POWERUP_CRYSTAL_RADIUS = POWERUP_CRYSTAL_SIZE/2.0f; |
||
| 180 | public static final float POWERUP_CRYSTAL_RADIUS_SQR = POWERUP_CRYSTAL_RADIUS*POWERUP_CRYSTAL_RADIUS; |
||
| 181 | public static final float POWERUP_CRYSTAL_PARTICLE_DISTANCE = POWERUP_CRYSTAL_RADIUS*1.5f; |
||
| 101 | chris | 182 | public static final int POWERUP_CRYSTAL_MAX_PARTICLES = 50; |
| 99 | chris | 183 | public static final float POWERUP_CRYSTAL_PARTICLE_FADE_TIME = 0.6f; |
| 101 | chris | 184 | public static final float POWERUP_CRYSTAL_PARTICLE_GROWTH_TIME_MIN = 4.0f; |
| 185 | public static final float POWERUP_CRYSTAL_PARTICLE_GROWTH_TIME_MAX = 8.0f; |
||
| 186 | public static final int POWERUP_CRYSTAL_PARTICLE_MAX_RESPAWN = 3; |
||
| 187 | public static final float POWERUP_CRYSTAL_SHARDS_LIFETIME = 1.5f; |
||
| 188 | public static final int POWERUP_CRYSTAL_MAX_SHARDS = 3; |
||
| 189 | public static final float POWERUP_CRYSTAL_SHARDS_SPREAD = 8.0f; |
||
| 190 | public static final float POWERUP_CRYSTAL_SHARDS_SPREAD_SPEED = 20.0f; |
||
| 191 | public static final float POWERUP_CRYSTAL_SHARDS_ROTATE_SPEED = 5.0f; |
||
| 192 | public static final float POWERUP_CRYSTAL_SHARDS_MIN_SIZE = 16.0f; |
||
| 193 | public static final float POWERUP_CRYSTAL_SHARDS_MAX_SIZE = 32.0f; |
||
| 194 | |||
| 195 | // Powerup probabilities |
||
| 196 | public static int POWERUP_PROBABILITY_CONCAVE = 2; |
||
| 197 | public static int POWERUP_PROBABILITY_MOSAIC = 2; |
||
| 198 | public static int POWERUP_PROBABILITY_FLOWER = 2; |
||
| 199 | public static int POWERUP_PROBABILITY_HOURGLASS = 2; |
||
| 200 | public static int POWERUP_PROBABILITY_CRYSTAL = 2; |
||
| 201 | public static int POWERUP_PROBABILITY_BARRIER_HORIZONTAL = 2; |
||
| 202 | public static int POWERUP_PROBABILITY_BARRIER_VERTICAL = 2; |
||
| 203 | public static int POWERUP_PROBABILITY_BOMB = 2; |
||
| 84 | chris | 204 | |
| 32 | chris | 205 | private GameConsts() |
| 206 | { |
||
| 207 | } |
||
| 208 | |||
| 209 | } |