Subversion Repositories AndroidProjects

Rev

Rev 65 | Rev 69 | Go to most recent revision | 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
 
14
        public static final Vector4 PINGK_COLOR = new Vector4(1.0f, 0.0f, 0.6f, 1.0f);
32 chris 15
 
16
        // Paddle constants
48 chris 17
        public static final float PADDLE_DISTANCE_FROM_EDGE_X = 40.0f;
18
        public static final float PADDLE_DISTANCE_FROM_EDGE_Y = 5.0f;
19
        public static final float PADDLE_WIDTH = 40;
20
        public static final float PADDLE_HEIGHT = 80;
44 chris 21
        public static final float PADDLE_INPUT_ACCEL = 15.0f;
47 chris 22
        public static final float PADDLE_HIT_OFFSET = 5.0f;
49 chris 23
        public static final float PADDLE_HIT_ZONE_DEVIATION = 1.0f;             // angle coefficient for the paddle's bendedness 
32 chris 24
 
45 chris 25
        // Ball constants
26
        public static final float BALL_SIZE = 16.0f;
58 chris 27
        public static final float BALL_INITIAL_SPEED = 300.0f;
48 chris 28
        public static final float BALL_TOP_SPIN_INTENSITY = 0.18f;
63 chris 29
 
30
        public static final float BALL_SPEEDUP_TIMER = 1.0f;
31
        public static final float BALL_SPEEDUP_INCREASE = 12.00f;
32
 
48 chris 33
        public static final float BALL_MAXIMUM_ANGULAR_SPEED = 500.0f;
63 chris 34
        public static final float BALL_ANGULAR_SPEED_DECREASE = 10.0f;
35
 
48 chris 36
        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
37
        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
38
        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 39
 
58 chris 40
        public static final float BALL_TRAIL_WIDTH = 5.0f;
41
        public static final int   BALL_TRAIL_LENGTH = 20;                       // number of points for the trail
42
        public static final float BALL_TRAIL_INTERVAL = 0.05f;          // interval in seconds at which the trail gets another point
60 chris 43
        public static final float BALL_TRAIL_MAX_ALPHA = 0.7f;
45 chris 44
 
48 chris 45
        // PlayField constants
46
        public static final float PLAYFIELD_BORDER_X = 15.0f;
47
        public static final float PLAYFIELD_BORDER_Y = 15.0f;
60 chris 48
 
65 chris 49
        // Score bar constants
50
        public static final float SCOREBAR_MARGIN_X = 30.0f;
51
        public static final float SCOREBAR_MARGIN_Y = 5.0f;
68 chris 52
 
53
        // Score Display constants
54
        public static final float SCORE_DISPLAY_ACCEL = 3.0f;
55
        public static final float SCORE_DISPLAY_SIZE_END = 250.0f;
56
        public static final float SCORE_DISPLAY_SIZE_BEGIN = 550.0f;
65 chris 57
 
47 chris 58
 
32 chris 59
        private GameConsts()
60
        {
61
        }
62
 
63
}